terrain lighting oddity


(evillair) #1

Is there something I can do to fix this?

I have this problem in random places in my map.

It doesn’t get fixed with a full compile + bounces.


(ydnar) #2

Post your terrain shader(s).

It looks to be an alphamap bug rather than a lighting bug, anyway.

y


(evillair) #3

Here you go…

Most of it was generated by EasyGen.

//Terrain Section
//trying the sd shader normalmap stuff
textures/flakcannon/terrain_base
{
q3map_normalimage textures/sd_bumpmaps/normalmap_terrain.tga

q3map_lightmapsize 512 512
q3map_lightmapMergable
q3map_lightmapaxis z

q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
q3map_tcMod scale 2 2
q3map_tcMod rotate 37

surfaceparm grasssteps
surfaceparm landmine
}
//end trying the sd shader normalmap stuff
textures/flakcannon/terrain_0
{
q3map_lightmapMergable
q3map_lightmapsamplesize 256
q3map_lightmapaxis z
q3map_texturesize 512 512
q3map_tcGen ivector ( 234 0 0 ) ( 0 234 0 )
{
map textures/temperate_sd/rock_ugly_brown.tga
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}
textures/flakcannon/terrain_1
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 512 512
surfaceparm gravelsteps
surfaceparm landmine
q3map_tcGen ivector ( 234 0 0 ) ( 0 234 0 )
q3map_baseshader textures/flakcannon/terrain_base
{
map textures/temperate_sd/master_grass_dirt3.tga
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}
textures/flakcannon/terrain_2
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 512 512
surfaceparm gravelsteps
surfaceparm landmine
q3map_tcGen ivector ( 234 0 0 ) ( 0 234 0 )
{
map textures/temperate_sd/dirt3.tga
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}
textures/flakcannon/terrain_0to1
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 512 512
q3map_tcGen ivector ( 234 0 0 ) ( 0 234 0 )

{
map textures/temperate_sd/rock_ugly_brown.tga
}
{
map textures/temperate_sd/master_grass_dirt3.tga
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/flakcannon/terrain_0to2
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 512 512
q3map_tcGen ivector ( 234 0 0 ) ( 0 234 0 )

{
map textures/temperate_sd/rock_ugly_brown.tga
}
{
map textures/temperate_sd/dirt3.tga
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/flakcannon/terrain_1to2
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 512 512
surfaceparm gravelsteps
surfaceparm landmine
q3map_tcGen ivector ( 234 0 0 ) ( 0 234 0 )

{
map textures/temperate_sd/master_grass_dirt3.tga
}
{
map textures/temperate_sd/dirt3.tga
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
}
}

textures/flakcannon/terrain.vertex
{
{
map textures/temperate_sd/rock_ugly_brown.tga
rgbGen vertex
}
}


(hummer) #4

Take

q3map_lightmapMergable
q3map_lightmapsamplesize 256
q3map_lightmapaxis z
q3map_tcGen ivector ( 234 0 0 ) ( 0 234 0 )

Out of each shader except the base. The other shaders should inherit it from the base shader.

Put:

q3map_baseshader textures/flakcannon/terrain_base

in each shader if it’s not all ready there…


(evillair) #5

Awesome, thanks hummer, worked great.

The shading is alot nicer too.

Thanks again.