Shadow problems


(megaman) #1

Sorry if this came up before, my search didnt turn anything useful up.

ive got problems with weird shadows - i dont know what causes them.


using q3map_2.5.6

brushes are all mittered, etc. map’s build using caulkhull method.

would be extremely cool if someone could help me.


(MuffinMan) #2

what lightmap-scale setting are you using? the rounded patches get the light values of the sorrounding brushwork which is behind the wall simply dark - so you have to make smaller lightmaps/lightmapscale for your curves… that’s my guess


(megaman) #3

default lightmap size. nothing fancy in that map, as its mainly gameplay oriented :slight_smile:


(megaman) #4

Nobody besides Muffinman? :confused:


(ogun) #5

Why don’t you try giving _lightmapscale a lower value to those patches.


(kat) #6

what’s the func_grouping like on the curves?? Try grouping the whole lot together into one F_G including the floor sections. I know this sounds odd but give it a go and see what happens as you can sometime ‘remove’ shadow artifacts by trying different group combinations.


(ydnar) #7

OK, thought long and hard before posting on this thread… :slight_smile:

Seam shadows like that are caused by empty space between the occluder (the wall casting the shadow) and the surface recieving the shadow.

Usually this occurs with patch meshes, but occasionally it can occur with thin or improperly bevelled brushes.

Q3Map2 does some fairly exhaustive testing to figure out the best place to sample light from for each lightmap pixel (luxel). Because there’s just empty space behind the patch meshes, it considers that a valid sample point and it ends up being in shadow.

These types of shadows can be minimized using a number of techniques, such as using -samples N or -super N or -filter on the light commandline. The -samples N switch does “smart” antialiasing, the -super N switch does NxN uniform supersampling, and the -filter switch applies a 3x3 gaussian blur filter to the lightmap data.

You can use -super in concert with -filter for decent results. Using -filter with -samples is more or less pointless, as the filtering blurs any antialiased shadow edges created by the supersampling anyway.

An alternative is to group the patches with the problem shadows into a func_group and add a _lightmapscale key to the func_group with a value of 0.5 or less. Try values 0.5, 0.25, 0.125 and 0.0625.

Cheers,
y


(megaman) #8

Ah! Thanks ydnar, now i understand the problem :slight_smile:

ill try i minimize the empty space behind those brushes.

would using q3map_lightmapsampleoffset (n.n) be an option? it sounds like it would sample in front of the surface then (which would be lit).

All the others thank you, too!


(ydnar) #9

Yes, that would be a valid option as well.

You could also use q3map_splotchFix if you don’t anticipate having any purely black shadows on the patches/brushes using the special shader variant.

y