I’ve been trying to get this to work, but now I’m getting the same ol’ orange and black grid. This time the grid is scaled larger so I know the shader is activating, but something still isn’t right. Here’s the shader I’m trying now. Note that I’m trying different scaling as an experment because I need to change the scaling in my final product.
textures/mars/terrain_base
{
q3map_lightmapMergable
q3map_lightmapaxis z
q3map_lightmapsize 512 512
q3map_globalTexture
// q3map_normalimage textures/sd_bumpmaps/normalmap_terrain.tga
surfaceparm landmine
}
// Jizaboz basic dirt
textures/mars/terrain_0
{
q3map_baseshader textures/mars/terrain_base
q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
map textures/mars/jiz_dirt1.tga
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}
// Scaled up Mars dirt 2 (2 times normal)
textures/mars/terrain_1
{
q3map_baseshader textures/mars/terrain_base
q3map_tcGen ivector ( 1024 0 0 ) ( 0 1024 0 )
{
map textures/mars/marsdirt_2.tga
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}
// Scaled up Mars Dirt (2 times normal size)
textures/mars/terrain_2
{
q3map_baseshader textures/mars/terrain_base
q3map_tcGen ivector ( 1024 0 0 ) ( 0 1024 0 )
{
map textures/mars/marsdirt.tga
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}
textures/mars/terrain_0to1
{
q3map_baseshader textures/mars/terrain_base
q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
map textures/mars/jiz_dirt1.tga
}
{
tcMod scale 0.5 0.5
// tcMod transform 1.0 0.0 0.0 1.0 0.5 0.0
map textures/mars/marsdirt_2.tga
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}
textures/mars/terrain_0to2
{
q3map_baseshader textures/mars/terrain_base
q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
map textures/mars/jiz_dirt1.tga
}
{
tcMod scale 0.5 0.5
// tcMod transform 1.0 0.0 0.0 1.0 0.5 0.0
map textures/mars/marsdirt.tga
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}
textures/mars/terrain_1to2
{
q3map_baseshader textures/mars/terrain_base
q3map_tcGen ivector ( 1024 0 0 ) ( 0 1024 0 )
{
map textures/mars/marsdirt_2.tga
}
{
tcMod scale 0.5 0.5
map textures/mars/marsdirt.tga
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}
textures/mars/terrain.vertex
{
q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
map textures/mars/jiz_dirt1.tga
rgbGen vertex
}
}
I’ve noticed this script produced a build error I had not seen before, whereas I usually see “Cannot find image for shader terrain_, etc” For some reason there are now 0000’s and 0001s, etc added to the ends of the paths on the errors. I’ve got no idea what’s wrong, but I’ll keep tweaking and trying. In the meantime, perhaps someone will read this and find an error.