I’m messing around with creating realistic looking terrain and blending textures. Thanks to Sock his lovely articles I managed to get it to work. Not precisely like he did it, but hell it works for me.
Only problem is that as soon as I apply my method [well not mine, Donkey explained it to me] to vertical brushwork it looks stretched.
Let’s illustrate a bit. This is a shot from my test map. As you can see the ground looks normal but the rockwall looks stretched.
This is the shader I used for it:
textures/inf_dm1/moss_mud_blend
{
//qer_editorimage textures/inf_dm1/moss_mud_blend.tga
q3map_lightimage textures/inf_dm1/moss.tga
q3map_nonplanarq3map_shadeAngle 179
q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
q3map_lightmapAxis z{
map textures/inf_dm1/mud.tga
alphaFunc GE128
rgbGen identity
}
{
map textures/inf_dm1/moss.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen identity
alphaGen vertex}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}textures/inf_dm1/moss_rock_blend
{
//qer_editorimage textures/inf_dm1/moss_rock_blend.tga
q3map_lightimage textures/inf_dm1/moss.tga
q3map_nonplanarq3map_shadeAngle 179
q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
q3map_lightmapAxis z{
map textures/inf_dm1/rock.tga
alphaFunc GE128
rgbGen identity
}
{
map textures/inf_dm1/moss.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen identity
alphaGen vertex}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
Now I know it has to do with the ivector thingie. I just don’t know where to ad it and which values I should use. Any suggestions ?