PDA

View Full Version : alpha_0 problem or is it q3map2?


sodsm live
16th November 2005, 00:54
hi. great forum and i've learned quite a bit from you guys. i just recently started mapping for ET(couple months ago), my only other mapping exp was with Q2. after a while i needed to learn how to blend textures - road to gravel, grass to dirt, basic beginner stuff right? i found a couple tutorials on the subject and followed them precisely, only to discover it wouldn't work cuz i was using the default q3map2 that came with gtkradiant 1.4.

i started hunting for more recent q3map2s(.15 or .16) for linux. all searches lead to shaderlab.com. i thought i had gone mental cuz i couldn't find it there anywhere. a couple weeks ago i discovered what happened with that website and so i started looking elsewhere. i couldn't find it so i downloaded gtkradiant and grabbed the q3map2 out it(.16).

to my surprise the texture blending worked immediately so i started tweaking the shader to get the effect i was looking for. after a couple tweaks everything broke. no matter what i changed, the blend was always the same - backwards and on the wrong face. i decided to take a break for a while and get back to work on the geometry of my map.

cut to a couple days ago. starting fresh with a new test box map and clean script directory i gave the blending another try. following the same tutorial that i had working once before, i created a new alpha_0 shader and texture and a new grass to dirt shader and texture.

the problem is the alpha_0 shader isn't working at all. the grass to dirt shader works just fine(though it isn't blending but that's because alpha_0 isn't working). both of the shaders have been added to shaderlist. in game, the brush that has the alpha_0 shader applied shows up as a solid brush with the old black with orange grid pattern texture. this is the code i've been using for it(from the groundplan texture blending tut):

{
qer_trans 0.75
q3map_alphamod volume
q3map_alphamod scale 0
surfaceparm nonsolid
surfaceparm nodraw
surfaceparm trans
}

i've also tried the blend tut from dime1622 at priceofpeace forums. the only difference on his alpha_0 is the qer_trans is at .5 which i'm sure only has to do with the editor anyway. i've seen q3map_alphamod as q3map_alphaMod and thought that was the problem but then i read that q3map commands are not case sensitive.

as a test i replaced just the code between the brackets with some simple code i wrote for a transparent fence i made. it worked like it was supposed to so it's finding and using the shader just fine.

i have no idea where to go from here other than throwing in the towel and not making maps with blending which would suck. any help would be appreciated.

The Wanderer
16th November 2005, 01:56
replace q3map_alphamod scale 0 with q3map_alphamod set 0

sodsm live
16th November 2005, 12:38
@The Wanderer, thanks alot. i have it working now and i have no idea why it wasn't. i rewrote the map shader from scratch and it somehow fixed itself.

what's the difference of set and scale? just wondering cuz visually they are the exact same at my current stage of compiling(i'm slowly working my way through the shader manual).

EB
16th November 2005, 13:37
q3map_alphaMod scale N.N
Used in conjunction with q3map_alphaMod volume. Scales the vertex alpha by N.N.


q3map_alphaMod set N.N
Used in conjunction with q3map_alphaMod volume. Sets the vertex alpha (regardless of any previous alpha values) to N.N * 255.


q3map_alphaMod volume
This was created as a way to explicitly set the amount of vertex alpha-blending by altering the alpha values of vertexes contained within a brush volume marked with this shader directive. Applies all other q3map_alphaMod directives to each vertex inside a brush textured with this shader, allowing large faded scrolling fire shaders, waterfalls, marquees, explicit dotProduct terrain blending control, etc.