Mirrors and DOOM III global illumination

Rodéric

a.k.a. Ingenu
Moderator
Veteran
I'm still working on my 3D engine (ok it's been a long while now).
I hit a problem with mirrors, in correct shadowing using DOOM III gobal illumination system.

With a light, a mirror and an object, the object being between the light and the mirror.
You have photons hitting the object and 'casting' shadows, this shadow zone is mirrored, you also have a shadow cast by photons bouncing from the mirror. That is, for one light you have 2 shadow volumes.

The question is : Do anyone know how to manage this, or how DOOM III handles mirrors (stencil or rendertexture) ?
 
I would have thought you can handle it by adding a virtual light (at the position the reflected light appears to be in the mirror). The intensity of the virtual light is modulated by the mirror's reflectance.

All shadow volumes from the virtual light need to be clipped to the mirror edges, of course.

Could be quite a cool effect, with moving mirrors.
 
That won't solve my problem.
I must NOT clip shadow volumes since I need to have the reflected shadows, both the primary and secondary volumes.

Can't explain well, but a little scheme shows the problem, although my drawing skills are laking so I can't build any, for the web.
 
Why can't you apply the same geometric transform as you do to world geometry to shadow volumes at the surface of the mirror?
 
Back
Top