Fog shader for Houdini Mantra based on this paper. Heterogeneous medium now supported.
It works similar to Lit Fog shader. Create Atmosphere object and assign volumelight shader to it. Shader works only for primary rays, it simple, adjustable, animatable and has a built-in noise to modulate albedo (not density).
Unlike Lit Fog it physically correct and takes into account Beer–Lambert law. It uses modern algorithms such as Exponential sampling (works well in most cases, but noisy near the lights) Equiangular sampling (well in areas around lights, but noisy in shadows)
Multiple Importance Sampling (select the preferable sampling stategy Eric Veach, Leonidas J. Guibas. I use the power heuristic). Heat map of distributions (green - exponential, red - equiangular).
The beauty channel unclamped and alpha channel doesn’t depend on beauty intensity, only density. You can simply export distributions on per-light basis.
For better sampling set Max Distance carefully. I recommend to render volumelight separately by turning objects to matte shading. You can set Color parameter greater then 1. Although it’s not physically correct sometimes it help to achive needed visual effect. Use IES profiles for better look.
- Work well only with decaying lights (excluding Environment, Sun, Distant)
- Rendering time grows linearly with number of lights.