lightmap bug?


(ratty redemption) #1

Im using q3map2 2.5.16 on a ja test map, all the lightmaps have been working as normal, except when I cast a spot light on this part of my cave wall, then it looks as if the lightmap is being projected from another angle on two of the brushes, ie its very streaky.

pic 1

pic 2

the same spot light works fine if I move the info_notnull to point anywhere else… I also rebuilt the brush work of the two tris that are being shaded wrong, all the cave`s brushes are snapped to 8 map units min.

oh and this doesnt happen if the func_groups _lightmapscale is above 0.6 which makes me think it`s the lighting code that might be buggy?

here`s the compile options:

bsp -meta -light -fast -fastgrid -gamma 1.4 -samples 3

I also tried moving the ja misc model out of the way of the light entities, but that didn`t fix this.

here`s the light entities values:

{
"radius" "256"
"target" "t5"
"classname" "light"
"origin" "800 -7804 -1472"
"light" "750"
"_color" "1.000000 0.996700 0.700000"
"spawnflags" "1"
}

// the above light is used for the outer spot circle

{
"radius" "128"
"_color" "1.000000 0.996700 0.700000"
"light" "5000"
"origin" "800 -7792 -1484"
"classname" "light"
"target" "t5"
"spawnflags" "1"
}

// and the inner spot circle, I have other working spot lights where they share info_notnulls, is that ok?

{
"classname" "info_notnull"
"origin" "784 -8004 -1280"
"targetname" "t5"
}

and the shader:

textures/_ratty_terrain/base3 // lm, rotate, dp, ivector z
{
	q3map_lightmapsampleoffset 16
	q3map_shadeangle 120
	q3map_nonplanar
	q3map_tcmod rotate 33
	q3map_alphamod dotproduct2 ( 0 0 0.84 ) // biased towards walls
	q3map_tcgen ivector ( 512 0 0 ) ( 0 512 0 )
}

textures/_ratty_terrain/rock1_z_dirt_z_rock1_y // rock1 z floor, rock1 y wall, dirt transitions
{
	qer_editorimage textures/_ratty_terrain/qer_grey01_y.tga
	q3map_baseshader textures/_ratty_terrain/base3 // lm, rotate, dp, ivector z
	q3map_material gravel
	surfaceparm nodlight
	{
		map textures/_ratty_terrain/ratty_dirt.tga
		//map textures/_ratty_terrain/qer_red.tga // uncomment to debug
	}
	{
		map textures/_ratty_terrain/ratty_rock01.tga // rock1 floor
		alphagen vertex
		alphafunc ge128
	}
	{
		map textures/_ratty_terrain/ratty_rock01.tga // rock1 wall
		//map textures/_ratty_terrain/qer_green.tga // uncomment to debug
		tcgen vector ( 0.001953125 0 0 ) ( 0 0 0.001953125 ) // 512 y axis
		//rgbgen const ( 0 0.5 0 ) // uncomment to debug
		alphagen oneminusvertex
		alphafunc ge128
	}
	{
		map $lightmap
		blendfunc filter
	}
}


(LowLife) #2

Hey, just wanted to say that i have the same problem in several places, all with spotlights near, and compiled with -lightmapsamplesize lower than default.

BTW: Shouldnt spotlight target info_null, info_notnull stays in bsp i think.


(ratty redemption) #3

@lowlife, thanks, I havent been here for a while, so only just noticed your post, but Ill try that next time I`m mapping et, ja.

btw guys, I havent stopped mapping for the q3 engine games and am still working with gerbil, just been taking a few months off to do some doom3 box room test maps and lots of mini mods to learn about that engine, although Im not going to seriously map with it until I`ve finished the et and ja maps and upgraded my pc.


(G0-Gerbil) #4

\o/ :wink: