Rendering VolumesΒΆ

Guerilla Render renders various volume primitives like, infinite volumes (fog, mist, underwater), volume inside meshes (liquids, sea surface, translucide objects), and voxels (smoke, fire, explosions..).

Infinite Medium

To simply add an infinite volume to a project, one can add an InfiniteMedium primitive using "Create -> Infinite Medium" and assign it to a volume shader.

All the space will be filled with this volume.

The InfiniteMedium doesn't cast shadows with the distant lights and the environment lights. Those shadows would be fully opaque anyway.

Volume Mesh

You can add a volume Shader to any meshes. Simply assign the Volume shader with or without Surface shader and it will be filled with the volume.

Assign a Volume shader

In the RenderGraph, drop the object you want to assign a Volume shader.

Add a Materials/Volume node.

Connect the new nodes to the RenderGraph flow (here in override mode).

If your object is only a volume, set the Volume -> Mode to "Set Material", it will put an empty Surface shader. If it is both a Volume and a Surface, set the mode to "Set Volume".

Uniform or Heterogeneous Density

A volume density can be uniform or heterogeneous. The uniform density volumes have a constant density everywhere, like a constant fog or a homogeneous liquid. The heterogeneous density volumes have a varying density, like all the voxel primitives, mist (fog coming from the ground), noisy density.

Uniform volumes are faster to render.

By default, all the volumes are assumed uniform. To turn them into heterogeneous density volumes, use the RenderGraph Attribute node and uncheck the "Volumetric -> Uniform Density" attribute.

The heterogeneous density volumes are sampled using ray marching. The ray marching size is controlled by the RenderGraph Attribute node in "Volumetric -> Ray Marching Step Size". This step is expressed in world space. The maximum step count allowed is controlled by "Volumetric -> Ray Marching Max Steps".

If the step size is zero, the ray marcher will use the attribute "Ray Marching Max Steps" for every rays.

Volume Shader

Library/Materials/Volume for all the details about the default volume shader.