My first problem is, by default, the texture is a 50/50 blend of the two textures designated in the shader. However, I want just the Primary shader shown by default. In the screen below, outside of the mossy area, there is no alpha stick work, but there is still a 50/50 blend
My second problem is when I try to do 25% primary 75% secondary blends. The primary texture is a light dirt texture. As you can see, it works perfectly when it is 0% primary 100% secondary (the moss) but this is what happens when I do 25/75
Any ideas?
Did you try this out yourself?
Anyway, the first problem is adjusted by this..
q3map_alphaMod dotproduct2 ( 0.0 0.0 1.0 ) It is 1.0 on the Z value.
The second problem looks like a problem with the texture. The alpha channel is really essemtial to DotProduct2 and without it the terrain will have these awkward transitions. Could I see the alpha channels on your texture please.
I'm not sure whether you mean the alpha fade brushes or the shader file. If you want the shader, here it is:
textures/chandrila_outlands/sky1 { qer_editorimage textures/skies/sky.tga surfaceparm sky surfaceparm noimpact surfaceparm nomarks notc q3map_sun 1 0.91 0.79 105 25 80 q3map_surfacelight 250 skyParms textures/skies/dune 512 - }
textures/chandrila_outlands/b_r_m { qer_editorimage textures/yavin/rockwall q3map_nonplanar q3map_shadeangle 150 q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 ) q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 ) q3map_Material Mud { map textures/yavin/rockwall // Primary rgbGen identity } { map textures/yavin/s_mud2 // Secondary blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA alphaFunc GE128 rgbGen identity alphaGen vertex } { map $lightmap blendFunc GL_DST_COLOR GL_ZERO rgbGen identity } }
textures/chandrila_outlands/b_d_m { qer_editorimage textures/yavin/lighturth q3map_nonplanar q3map_shadeangle 150 q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 ) q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 ) q3map_Material Mud { map textures/yavin/lighturth // Primary rgbGen identity
} { map textures/yavin/s_mud2 // Secondary blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA alphaFunc GE128 rgbGen identity alphaGen vertex } { map $lightmap blendFunc GL_DST_COLOR GL_ZERO rgbGen identity } }
textures/chandrila_outlands/0 // Primary texture ONLY { q3map_alphaMod volume q3map_alphaMod set 0 surfaceparm nodraw surfaceparm nonsolid surfaceparm trans qer_trans 1 }
textures/chandrila_outlands/25 { q3map_alphaMod volume q3map_alphaMod set 0.25 surfaceparm nodraw surfaceparm nonsolid surfaceparm trans qer_trans 1 }
textures/chandrila_outlands/50 // Perfect mix of both Primary + Secondary { q3map_alphaMod volume q3map_alphaMod set 0.50 surfaceparm nodraw surfaceparm nonsolid surfaceparm trans qer_trans 1 }
textures/chandrila_outlands/75 { q3map_alphaMod volume q3map_alphaMod set 0.75 surfaceparm nodraw surfaceparm nonsolid surfaceparm trans qer_trans 1 }
textures/chandrila_outlands/85 { q3map_alphaMod volume q3map_alphaMod set 0.85 surfaceparm nodraw surfaceparm nonsolid surfaceparm trans qer_trans 1 }
textures/chandrila_outlands/100 // Secondary texture ONLY { q3map_alphaMod volume q3map_alphaMod set 1.0 surfaceparm nodraw surfaceparm nonsolid surfaceparm trans qer_trans 1 }And here is a picture of my brush placement (deep red is 100/85 alpha, while white is 0 alpha)
Basically, textures/chandrila_outlands/b_r_m { qer_editorimage textures/yavin/rockwall q3map_nonplanar q3map_shadeangle 150 q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 ) q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 ) q3map_Material Mud { map textures/yavin/rockwall // Primary rgbGen identity } { map textures/yavin/s_mud2 // Secondary blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA alphaFunc GE128 rgbGen identity alphaGen vertex } { map $lightmap blendFunc GL_DST_COLOR GL_ZERO rgbGen identity } }
Should be q3map_alphaMod dotproduct2 ( 0.0 0.0 1.0 ) I assumed that this was the floortexture as it looks like your ground is yavins rocktexture. Although it seems like you are trying to blend 2 yavin textures. This wont work because you need to give your textures alphachannels to blend in correctly so that it looks natural.

It is quite hard to tell, but you can see the grass kind of twines between the cracks. Without an alphachannel this wont do.
To create a quick alpha channel, take the texture and convert it to greyscale. Increase the brightness by 100% so the image is many shades of white and grey. If requiring hard edges then increase the contrast value. In Photoshop create a new channel and and then cut and paste the greyscale alpha image into the channel. Save the image as a 32bit TGA file and that should be it.
After doing that, I get this:

This isn't the final result, I'm guessing, but I hazard a guess that I then repeat the process and put *this* as the mask of the original texture. Am I right?
Yes, there is something like that, but how do I move the image into the Alpha channel slot?
You simply cut out the entire image and paste it into the new white alpha channel.
It doesn't work, it pates it into layers rather than channels.