lightmap problem in 2.5.11


(flagella) #1

I’m having a problem with the lightmap showing light where there shouldn’t be any. Light seems to randomly show up around the edge of brushes. Examples:

This is using q3map2.5.11. My compile switches are -light -fast. I had no problems compiling with 2.5.7 but upgraded to 2.5.11 to add a skyportal.

The compiler gave me a few of these warnings, don’t know if they’re relevant:
WARNING: ProjectSurfaceLightmap: Chose a 0 valued axis

Has anyone else seen this or know how I might fix it?


(ydnar) #2

That’s an odd one. I’ve seen it before, a long time ago.

Does your map have ambient or _minlight?

y


(flagella) #3

I have a _minlight of 4. I removed it and recompiled but got the same result.


(RabidCow) #4

I have been having lightleak problems since 2.5.11 as well, Ydnar. Here is an example, a map that was fine with earlier versions (I just did a controlled test of q3map2.5.6, q3map2.5.7, q3map2.5.10-test1, and q3map2.5.11. The results were as mentioned above…here are a couple of screenies…

q3map2.5.10-test1

q3map2.5.11

Thanks for all of your help and support Ydnar!
RC


(ydnar) #5

Can you try with -light -fast -debug?

Also, if anyone can provide a map using standard Q3 textures (a small one, preferably) that reproduces this bug, that’d be ace.

y


(seremtan) #6

I’ve had this too (with 2.5.11) - custom textures i’m afraid - in a map consisting of one large (Padmanesque) room, with sky portal outside. I suspected it might be the skybox light leaking in (I’m using your nifty skybox, ydnar - from your skyportal example map), so I tried enclosing the entire room with textured outer walls, which helped a little (but didn’t remove the ‘leaks’ entirely) but then I noticed this:

Shadow leaks? I thought it was just my lighting/construction but now I hear other people having the same issue… Similar artefacts occur elsewhere. I am using a low minlight value.

BTW, in the screen the corridors are the ‘tunnels’ inside a pool table. The ‘tunnels’ are detail, but the outer table structure is structural, and it’s well away from the skybox.

Compiled with:

-fast -patchshadows -samples 3
-fast -patchshadows -samples 3 -bounce 3
-faster -patchshadows

same thing each time.


(RabidCow) #7

Ok, here is the -light -debug screenshot of a problem area with 2.5.8

Here is a screenie with the same settings with 2.5.11

 RC

(ydnar) #8

OK, it seems to be an issue with the skybox entity. I’m looking into it.

y

Edit: found the bug with a sample map from PJW. It’s fixed now. You can download a build of Q3Map 2.5.12 here. You’ll also need MSVCR71.DLL in your windows/sytem32 directory to run it.


(seremtan) #9

:clap: excellent! Thanks!


(RabidCow) #10

Awesome! Thanks Ydnar!


(RabidCow) #11

hmm, still testing but no joy :(. The same issues exist with 2.5.12. The problem areas look exactly the same as with 2.5.11.
RC


(ratty redemption) #12

same here, Im still getting light leaks in the 2.5.12 version you just posted, but Im also getting some very weird, dark shadows appearing on cliff faces above where I have caves entrances.

I could ul a pic to the jolt wolf mapping forum and link to it from here, if that would help? …or can someone can recommend a good free host for ul images to? …the small ftp site I got with my isp is full as I use it for backing up.

anyway, my brush work is different size trisouping, which used to be func groups using alphamaps, but now all moved to worldspawn, and I removed all ref to the alphamaps as I`m now using the dot product2 and penumbra lighting.

every thing else in the map is lighting fine, other then the odd light leak.

but when I checked the external lightmaps generated with q3map_lightmapsize and q3map_lightmapmergable, the weird dark shadows stand out very clearly and cover the same area as the cave widths below, but have shapes like large crosses and dots in them, and not shapes I would expect the brush work to cast.

I`m not using any sky portals or buildings, mountains that could be blocking the light from the sky shader like this.


textures/_water_test/day_sky
{
	qer_editorimage textures/_water_test/sky.tga
	q3map_sunext 1 0.8 0.6 230 150 35 2 16
	q3map_lightmapfilterradius 0 64
	q3map_lightrgb 1 0.8 0.6
	q3map_skylight 60 3
	q3map_globaltexture
	q3map_backsplash -1 -1

	fogvars ( 0.02 0.02 0.02 ) 0.000001
	surfaceparm nolightmap
	surfaceparm noimpact
	surfaceparm nodlight
	skyparms - 400 -
	{
		map textures/skies/newclouds.tga
		tcmod scroll -0.001 -0.003
		tcmod scale 6 6
	}
	{
		map textures/skies/assa_clouds1.tga
		tcmod scroll 0.0005 0.00
		tcmod scale 2 1
		blendfunc blend
	}
}

and the terrain shader...

textures/_water_test/terrain1
{
	qer_editorimage textures/_water_test/terrain1_base.tga
	q3map_lightmapsamplesize 64
	q3map_lightmapsize 256 256
	q3map_lightmapmergable
	q3map_shadeangle 180
	q3map_tcmod rotate 35
	q3map_lightmapaxis z
	q3map_nonplanar
	q3map_alphamod dotproduct2 ( 0 0 0.85 )
	q3map_tcgen ivector ( 512 0 0 ) ( 0 512 0 )
	surfaceparm grasssteps
	{
		map textures/terrain/dirt_m03.tga  // dirt
		tcgen vector ( 0.00390625 0 0 ) ( 0 0.00390625 0 )  // 256
		//rgbgen const ( 0.6 0 0 )
	}
	{
		map textures/_water_test/ratty_mxrock3_a.tga  // rock 1
		alphagen oneminusvertex
		alphafunc ge128
		blendfunc blend
	}
	{
		map textures/_water_test/ratty_mxrock0b.tga  // grass
		alphagen vertex
		alphafunc ge128
		blendfunc blend
	}
	{
		map $lightmap
		tcgen lightmap
		blendfunc gl_dst_color gl_zero
	}
}

I`m compiling for wolf, using -meta -light -fast -patchshadows -samples 2 -fastgrid

when I change the direction, angle of the sun these dark shadows change but our always above the cave entrances, and a lot darker then the other shadows.

also is there a way to stop my bsp loading the q3map2_mapname.shader and just use my original shader files?

I dont mind a temporary shader being created during compiles, but if I then want to tweak rgbgen values or other things which shouldnt need recompiles, then it`s annoying having to alter two shader files, or alter the q3map2 one then remember to update the changes in my original.


(ydnar) #13

Don’t use q3map_lightmapSize in Wolf unless you want to use external lightmaps and generated shaders.

Only ET has native support for large/external lightmaps.

y


(ratty redemption) #14

ah, ok that solves my generated shader problem, thanx ydnar :slight_smile:

but although my dark buggy looking shadows have changed, they are still there… and I had to lower the brightness values for q3map_sunext and q3map_skylight as the wolf lightmaps must be brighter then those external ones ment for et.

really I can`t work out why shadows from a cave should appear on top of a hill, or mountain when the only lights are coming from the sky shader.


(ydnar) #15

Get rid of q3map_lightmapAxis z in the shader you’re using on the rocks. That directive is only useful on non-crossing meshes, such as terrain. Things like caves or arches which have undersides need normal lightmap projection.

y


(flagella) #16

Thanks ydnar. The new version cleared up most of the problem. But it seems I actually had two bugs that look alike manifesting themselves. The problem of light along the stairs in the first shot I posted remains, and it seems to be this “light leaking” problem that the others are having.


(ratty redemption) #17

I`m still getting the odd buggy shadow, but their not really dark or very unnatural looking like previously, so thanx a lot ydnar, your latest suggestion has made a big improvement :slight_smile:

btw, some of the lighting leaks Im still getting are thin shadows, and are happening where my detail cave walls are touching the structual brushes, blocking off the back of the unfinished caves... Ive also checked all my shaders and none are using trans that shouldn`t be.


(flagella) #18

I ripped out a part of my map that was having this problem and replaced it with base textures. You can download it here

screenshots: 2.5.7 (not necessarily the last good version, just the last version I had):

2.5.12:


(ydnar) #19

Can you zip up that map? Your server won’t let me download it.

y


(flagella) #20

zipped it here