Missing shadows...


(Tweety) #1

Hi…

I´ve got strange results using lightmap with a gridsize of 4 and version 2.53 but it happens also in earlier versions of the tool. I looked at the lightmap with r_lightmap.

Example: There is a street-lamp that cast´s a fine shadow on the building near by but no shadow on the street. The lamp is 8 units width.
The shaders for the wall and the street are identical, no lightmapscale.

It seems that the gridsize on some surfaces is 4 but the shadows are actually not 4 .When inspecting the map with r_lightmap I can see a fine raster of 4 on both the street and the building.
But the shadows on the street are about 16 or higher. So the lamp casts no shadow on the street.

Is there a limitation for the size of a polygon when using small gridsizes?
The polygon of the street is huge, because it is a long street. But then I wonder about the small grid on this polygon.

in advance :slight_smile:
Tweety


(ydnar) #2

Lightmap textures are 128 x 128 pixels. The maximum usable area of a lightmap is 127 x 127, to account for edge filtering. This means with a samplesize of 4 (note the terminology–gridsize, as you put it, is something completely different), then the maximum size of a brush face without upsampling would be 127 x 4 = 508 units.

If you want to have detailed shadows on parts of your street, then break the street into smaller brushes and place them into different func_group entities, each with _lightmapscale tuned to balance shadow detail and memory usage.

y


(Tweety) #3

Hi…

sorry,…my mistake: I meant samplesize.
Thanks for your explanation, now it works.
:slight_smile:
Tweety