Lightmap wierdness


(|NV|S) #1

Hi all, I have been playing catch-up here on the forums with all the changes that have come about since I’ve been gone. (about a year). I downloaded the latest stable version 2.5.16 and here are my compile switches

-bsp -meta, -vis fast, -light -fast -compensate 4 -gamma 2 -patchshadows -samples 3

here is my skybox shader


textures/airport/airport_skybox
{
	qer_editorimage textures/airport/airportsky.tga
	surfaceparm sky
	surfaceparm noimpact
	surfaceparm nolightmap
	q3map_globaltexture
	q3map_lightsubdivide 256
	q3map_surfacelight 88
	q3map_sun 1 1 1 99 55 48
	skyparms env/airport/airport - -
}

my _woldspawn settings are

_color 1 1 1
_minlight 5
_MinVertexlight 10
ambient 2

here is what the lightmaps look like, notice the pixelation on the walls, and the wierd discoloration on the floor

/r_lightmap 1

/r_lightmap 0


(ratty redemption) #2

I recommend using the q3map_sunext for your sky lighting, do a forum search for it and it should help.


(Q.) #3

Nice shadow. :moo:


(obsidian) #4

Q3Map2 sky shaders have changed dramatically. Not sure what the issue is in your screenshots, but utilizing new Q3Map2 sky shaders may resolve the issue with better looking shadows to boot.

See here:
http://shaderlab.com/q3map2/shader_manual/apI.html


(ydnar) #5

Are you using a normalmap on your wall shaders?


(|NV|S) #6

I changed over to the new q3map_sunExt and it seems like the blotches got replaced by wierd artifacts and discoloration in the lightmaps…Im not sure what the heck it is at this point. No Randy I dont have normalmaps on the wall shaders, the textures on the wall are just simple textures with no shader attached.

here are some more shots of what seems to be happening now.

-bsp -meta, -vis fast, -light -fast -compensate 4 -gamma 2 -patchshadows -samples 3

here is my skybox shader


textures/crenshaw/crenshawsky
{
	qer_editorimage textures/crenshaw/crenshawsky.tga
	surfaceparm sky
      surfaceparm noimpact
	surfaceparm nolightmap	
      surfaceparm nodlight
      
      nopicmip
      nomipmaps
       
    	q3map_sunExt 1 1 1 150 0 0 3 32
    //q3map_surfacelight 100
      q3map_lightmapFilterRadius 0 8
      q3map_skylight 5 6
	skyparms env/crenshawsky/crenshawsky 1024 -

}

my _woldspawn settings are

_color 1 1 1
_minlight 2
_MinVertexlight 5
_noshadersun 1

SUN LIGHT
_sun 1
light 60

Notice the Green shading in the shadows…quite odd


(obsidian) #7

Well, there you go… your worldspawn settings are disabling the sky shader lighting. Remove those worldspawn keys and recompile.


(|NV|S) #8

what keys would those be?


(thegnat) #9
_noshadersun 1

This will ignore all definitions you made in the shader, trust obsidian and delete it.


(obsidian) #10

I would delete all those worldspawn keys. I don’t see any need for them in your map.


(|NV|S) #11

ok, deleted, recompiled, same result.


(Hewster) #12

mmm… looks like your in-game gamma is way to high ?
Try resetting your game cfg, and then compile with:
-bsp -meta, -vis fast, -light -fast -compensate 2.25 -gamma 1.75 -patchshadows -samples 3
to lighten the map use radiosity (-bounce 8 -fastbounce)
if your player models are too dark, try this in your worldspawn:
“_mingridlight” “8”
and bounce the grid in the light phase too (-bouncegrid)

you may also want to create a lightimage for the sky shader,
a simple 128 x 128 1 colour image the same colour you wish your
sky light to be, and call it “airport_skybox_light.tga”

Then use this as your sky shader:


textures/airport/airport_skybox
{
	qer_editorimage textures/airport/airportsky.tga
	q3map_lightimage textures/airport/airport_skybox_light.tga
	surfaceparm noimpact
	surfaceparm nomarks
	surfaceparm pointlight
	surfaceparm sky
	q3map_sunExt 255 255 245 100 55 48 3 16 
	q3map_skyLight 60 4
	skyparms env/airport/airport - -
}

Hope this helps

Hewster


(obsidian) #13

Or just use q3map_lightRGB. Specify the colour that you want your sky light to be by setting the normalized R G and B parameters.

Examples:
q3map_lightRGB 1.0 1.0 1.0 //pure white light
q3map_lightRGB 8.0 8.0 1.0 //light blue

BTW, did you delete all your worldspawn settings. Do this at least temporarily so that we can determine if it’s a problem with your worldspawn settings or if it’s your shader. Hard to test both at the same time.


(|NV|S) #14

I have no more keys in worldspawn except the Message key and That green tint is still showing up in my lightmaps. Ill try the lightmap image, but isnt that already called out in q3map_sunExt here?

q3map_sunExt 1 1 1 150 0 0 3 32


(|NV|S) #15

still no idea what this is. talked to Rabidcow at SID and he says that this is a known problem with Skylight and Sun ent…any ETA on when this could be addressed? I dont want to go back to an older version of q3map2 that actually lights correctly because I like the alphamod volumes…


(The5thHorsemen) #16

I had a similar thing happen to me but it was my vid card going bad .