AlexeySmolenchuk / volumelight

Fog shader for Houdini Mantra

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

volumelight

Overview

Fog shader for Houdini Mantra based on this paper. Heterogeneous medium now supported.

cloud beauty tunnel

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).

noise

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)

compare

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).

mis_weights

The beauty channel unclamped and alpha channel doesn’t depend on beauty intensity, only density. You can simply export distributions on per-light basis.

auto_passes tunnel_passes

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.

Limitations

  • Work well only with decaying lights (excluding Environment, Sun, Distant)
  • Rendering time grows linearly with number of lights.

About

Fog shader for Houdini Mantra

License:MIT License


Languages

Language:C++ 100.0%