Ive implemented stencilled shadow volumes into my renderer, using the depth-fail approach (aka Carmacks reverse), but as youd expect, the shadows are all just as dark as each other, at each point in them.
Does anyone know of how one would make volumetric shadows fade with distance, as they do in Doom3 and the Quake1 mod, Tenebrae?
I am not sure if the shadows actually fade with distance. Maybe you are noticing an effect caused by light attenuation? In other words, I do not think it is the shadow that is fading, but the light.
It appears to be the shadow, the area directly behind the shadow-caster is quite dark, but the areas in the same shadow but further away from the object arent quite as dark.
Well actually the shadows don’t fade but the light fades…
So the further you are off a lightsource the less light object recieve so everything gets darker and thus the shadows seem to “fade”.
This is called atenuation and can be done in various ways. Dunno about doom3 but tenebrae uses 3d textures (on gf4 & radeon9700)
[This message has been edited by Pentagram (edited 11-04-2002).]
Yes they do fade. The occluded area very close to the occluder sees very little ambient light. As you move further away the shadow lightens as more ‘ambient’ light becomes visible and the occluder takes up less of the ‘sky’. Of course the most important effect in penumbra
Pocket, We are not discussing real shadows, but shadows in Doom 3 and Tanebrae Quake
I do not believe (100 percent do not believe) that they fade in those engines, mainly because of how difficult it would be to do occluder distance faded shadows like yours with stenciled shadow volumes.
Just a comment. The demo I put up on the board a couple of weeks ago uses stencil shadows and correct calculation of umbra/penumbra so it is not that difficult to do it… If you forgot it you can look at the demo at www.tooltech-software.com (softshadow)
Yep, the light fades with distance not the shadow. Other sources of illumination may make the shadow appear to fade as the light is attenuated and the secondary contribution increases. This effect can be simulated by adding more than one light source to the scene and accumulating the illumination terms accurately.
What about some shadows like this ?
Originally posted by pocketmoon:
[b]What about some shadows like this ?
Can you make the image big enough to see?
The correct thing is still to accumulate light even for the volumetric effect.
The (fast) method described to do this in a couple of papers is to shade the enclosing light volume with depth and subtract front depth from back face depth. Attenuating that contribution with other parameters is also described.
[This message has been edited by dorbie (edited 11-04-2002).]