q3map_tcGen ivector projects your texture onto your brushes at compile time. So you don’t have to align all the grass brushes and fit the texture, the compiler will do it for you.
Here’s an example:
textures/stealth6/ter_moss1_3
{
qer_editorimage textures/stealth6/ter_moss1_3.tga
q3map_nonplanar
q3map_shadeangle 60
q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
map textures/stealth6/ter_moss1_3.tga
rgbGen identity
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
That’s for on the floor and it has phong shading. The numbers behind q3map_tcGen ivector are how the texture will be projected.
(x y z) (x y z)
So in my example it’s X and Y and the texture is stretched to 512 units. So every 512 units the texture wil repeat along the X & Y axis.
Doing walls is slightly trickier since it can be along the Z X axis or the Z Y (or maybe even something in between is possible? I never experimented with that)
textures/stealth6/rock_wall_northsouth
{
qer_editorimage textures/temperate_sd/rock_ugly_brown.tga
q3map_nonplanar
q3map_shadeangle 60
q3map_tcGen ivector ( 512 0 0 ) ( 0 0 512 )
{
map textures/temperate_sd/rock_ugly_brown.tga
rgbGen identity
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
That’s for walls that run north to south.
textures/dinitext/rock_wall_eastwest
{
qer_editorimage textures/temperate_sd/rock_ugly_brown.tga
q3map_nonplanar
q3map_shadeangle 60
q3map_tcGen ivector ( 0 512 0 ) ( 0 0 512 )
{
map textures/temperate_sd/rock_ugly_brown.tga
rgbGen identity
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
Wall from east to west.
I don’t think using q3map_tcGen ivector will effect the blending, but it makes doing terrain way way easier. Phong shading is just these 2 lines:
q3map_nonplanar
q3map_shadeangle 60
You can change the angle to get different effects as I said before:
http://www.simonoc.com/pages/articles/phongshading3.htm
I think what Mateos was saying is that maybe you’ve applied the wrong texture in radiant, but you can’t see it because they all have the same appearance in radiant? By changing:
q3map_editorimage textures/theutis/myterrain1.tga
You change the image used in radiant as to make it clearer which texture is dirt, rock wall and which one is inbetween.