Brain Dump

Shadow Volumes

Tags
computer-graphics

An approach to calculating shadows which relies on the [see page 10, volume] of space a projection produces.

Try to represent the invisible volume of space that a shadow creates.

The idea being there's a light source on one side of an object and a shadow on the other side.

Take the silhouette of an object to create a cone (volume) Any object within this cone is in a shadowed region. See [see page 12, here]. We can detect whether this is the case using a simple ray counting approach. Once the ray intersects the cone increment it's value by one, once it leaves decrement it by one. Any object the ray meets whilst it's counter is not 0 is in shadow.

See the [see page 14, 3D example].

We can [see page 15, layer] multiple cones for a complex object over each other to generate umbra and penumbra.

Note: shadow volumes support self-shadowing. Objects can cast shadows on themselves.