Well, when I started Blender nobody said there was going to be any math…
Clipstart defines the distance to the virtual plane where the calculation for shadows begins. 3 guesses what Clipend is for! Everything after ClipSta and before ClipEnd can cast a shadow from that lamp.
Why moving ClipSta away from the lamp can improve the shadows is a complete puzzle to me. Like I said, it’s a math thing.
Intrigued by all this I decided to test changing ShadowBufSize, and as it turns out improvments were easily seen all the way up to the maximum limit of 5120 (kB, I assume it means).
The improvment from the default low value to the maximum was massive!
(The larger buffer size gave much better defined shadows and cleaner and brighter non-shaded areas.)
Thanks all for your help!
Now on to trying to get those environment maps actually do domething…
the postnuke template system is either a piece of shit, or the people that make them are too lazy to change the layout, but somehow all postnuke/phpnuke pages look THE SAME.
A shadow buffer is basically an image rendered from the light source’s point of view. However, it only renders the depth of each pixel (i.e. like a z-buffer).
During final rendering, each pixel of the final image is transformed to the correct position in the shadow buffer view. If the the depth of that final-image-pixel is further away than the depth of the shadow-buffer pixel, then it is considered to be in shadow (otherwise it is not).
However, because there is only a single depth stored for each pixel in the shadow-buffer, it can’t accurately represent surfaces that are diagonal (in terms of depth) relative to the shadow-buffer. This can cause self-shadowing problems (where a point on a surface casts a shadow on itself). This would be easier to explain with pictures, but for now just take my word on it.
To solve this, you can artificially push the depth of all the pixels in the shadow-buffer deeper. This is what the “bias” value is: the amount by which each shadow-buffer pixel is pushed deeper.
Of course, this causes problems in and of itself, because this may cause some objects that should be in shadow to be lit. So, one should always choose as small a bias value as possible without causing self-shadowing artifacts.
In Blender, the bias is relative to the distance between ClipSta and ClipEnd (I have no idea why), thus pushing them closer together effectively reduces the bias.
I hope this helps. I really need to make a web-page that explains all this with pictures and such…
I just whipped up a web-page that explains (in a simplified way, but that is still completely useful) how shadow-buffers work, and what the various parameters do. And it uses pictures! Yay!