Project Description
Real-time Shadows
Lighting is a subject that passionate me, so do shadows. I am interested in all sort of shadow systems or tricks that help reaching high fidelity shadowing whether it is for realistic or stylized graphic style.
I experimented two ways of computing real-time soft shadows bot with their advantages and inconvenient.
Percentage-Closer Soft Shadows
The PCSS technique, introduced by Nvidia is based on regular shadow mapping, but by doing a blocker search we achieve to estimate the penumbra size based on the distance between the occluder and the receiver. Lastly, by applying some filtering, we get nice soft shadows.
I made this experiment in Unity and achieved to implement this shadowing technique for multiple light types (point, spot, direction) in the built-in render and inspector.
Capsule Soft Shadows
Inspired by the awesome work of Michał Iwanicki and Krzysztof Narkowicz I integrated a capsule based shadow technique inside Unity. This kind of shadowing system is especially used to approximate soft shadows on characters.
With this technique, we approximate to shape of the character using capsules and trace cones against those capsules. More precisely we trace cones against a sphere placed inside a capsule and nearest to the evaluation point on the surface.
I also developed an editor extension that ease the placement, scaling and tweaking of each capsule. A very useful extension would have been to automatically place and scale capsules based on bones.
This character’s shape approximation helps saving a lot of performance while having the ability to control the penumbra size using the cone angle.