Volumetric Light Beams

One of the latest additions to Carbon surrounds the creation of our custom volumetric beam material. I was approached to create a volumetric alternative to UE4 current system that would enable artists to create a light beam that could react and stretch a gobo while maintaining all of the behaviors and visuals you expect from a real light.

Default UE4 Volumetric Limitations

The volumetric fog system innate within UE4 is an incredibly powerful tool that can produce some stunning visuals. It uses a form of temporal reprojection to generate a volumetric fog that reacts to lighting information passing through it. The innate issue we found with this system, is that it reacts poorly to fast-moving lights. Due to the volumetrics working with a temporal anti-aliasing system that buffers information on alternating frames, information from moving lights often lag behind on their previous frame. This effect can be addressed by reducing the grid pixel size and lifetime of the volumetric particulate, however this comes at a huge performance cost when you have potentially hundreds of lights moving at a rapid pace.

UE4 Volumetric Temporal Lag:

We found a solution to these issues by controlling the volume bounds within a custom mesh and using logic embedded within an additive material to mirror its visuals and behaviors to that of a real light. This method enabled us a great amount of control over how we could expand on volumetric behavior, although moving a translucent volume to a static mesh had its own problems.

The first problem involved controlling the shape and bounds of the static mesh we attached our material to. We needed a method of controlling the “attenuation”, “source radius”, and “zoom angle” parameters common moving head light beams utilize. This was achieved with a mix of dynamic world-scale transforms, and a world offset material.

Custom Volume Attenuation:

Custom Volume Lens Radius:

Beam attenuation and source radius can both be controlled easily enough with world-scaling, however we need to get a little tricky when it comes to setting a zoom angle for the beam to expand out from our light fixture. For this, we use a world offset embedded within the material. Using trigonometry from a truncated cone, we can calculate a zoom based on a dynamic source radius. Apply the results out to the world offset parameter of a UE4 material, and we have a working zoom!

By combining these functionalities, we have a volumetric that can move as fast as it needs without the worry of temporal lag, and allows us to control its shape with much greater control than a default UE4 spotlight. In part 2 of our blog on custom volumetric solutions, I will go into more detail on what we can do within this volume to imitate particulate, falloff, and edge softness.

-Joe Bonura