hey, I’m having trouble getting lightmapped terrain working.
Here’s what I did:
Followed everystep from both…
http://www.nibsworld.com/rtcw/tutorial_lightmapped_terrain.shtml
http://shaderlab.com/q3map2/lmt.txt
So…
I have the base
textures/gc_terrain/radarbase
{
q3map_tcGen ivector ( 32 0 0 ) ( 0 32 0 )
q3map_lightmapaxis z
surfaceparm grasssteps
q3map_lightmapsampleoffset 8.0
q3map_lightmapmergable
}
the normal terrain shaders
textures/gc_terrain/terrain_0
{
q3map_baseshader textures/gc_terrain/radarbase
q3map_lightimage textures/gc_terrain/gcgrass.jpg
{
map textures/gc_terrain/gcgrass.jpg
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}
and the blends
textures/gc_terrain/terrain_0to1
{
q3map_baseshader textures/gc_terrain/radarbase
q3map_lightimage textures/gc_terrain/gcgrass.jpg
{
map textures/gc_terrain/gcgrass.jpg
}
{
map textures/gc_terrain/gcgrass2.jpg
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
}
}
The shader file is added to shaderlist.txt.
q3map_terrain is added to the common/terrain shaders.
cell and q3map are added to the scripts dir.
The results are, what I’d assume, still vertex lit. When I type r_lightmap 1 the terrain stays textured, and the shadows are typical of vertex lighting.
Oh, I also changed the key words in the terrain func_group… (shader = _shader ect)
In Nibs RtCW tut… i noticed he had rgbGen identity & alphaGen vertex still in the shader… removing or keeping made no difference (to me).
any help?
cheers