God rays, or, more scientifically,
volumetric lighting occurs
when lights hit
airborne particles in the air
and create beams of light.
They can help
to add depth
and realism to your visuals.
But how do we create them
and visualise?
Prior to 2024,
it was easier to use Nvidia MDL
materials to accomplish the god rays.
However,
since DSPBR’s were released in 2024,
the process has become far easier.
First, you need a light source.
This is best
if the light has direction
to achieve more light beams
rather than just solid fog.
Spotlights or IES profiles work
well as well as directional lights,
especially if there's
some geometry to break up
The light beams like these blinds.
You may also need to turn your scene
brightness down
so the photometric
light has more impact.
Next thing to do is
add a volume that covers
the entire area
where you want the atmosphere
or fog to be.
Primitive shapes from the model
tab can be used
for these
translate scale and rotate as needed.
One thing to note is
your camera must be outside
of this cube for the fog to work.
Time to turn the block into fog.
We can add a new material
by right
clicking and select Edit
Assign New appearance.
If you're in the model selection mode.
We need to view all the settings,
so change the new appearance
type to the enterprise
PBR shading model.
We want to ensure
the outside of the box is not visible
or reflective,
and the inside has volume.
To do this,
we set the translucency
to one, the transparency to one,
and the specular to zero
under volume.
Untick thin walls
and change
the index of refraction to one.
Our cube will now be invisible.
Then comes
the three options
that will actually create
the atmospheric effect.
These will be edited
in a trial and error basis,
as the values will change
depending on the size of the model
and the light used.
The first thing to change
is the subsurface colour.
This determines
the overall colour of the object.
After multiple scattering events,
essentially, if you are mimicking fog,
then you want this to be white
or slightly gray.
If you are mimicking water,
you may want it to be light blue.
Almost black can be used
if you are trying to fade
the background out to black.
Great for a dramatic shots.
We will make it white
and if needed edit it later.
Actuation colour
is the
colour of light
inside the volume of the object.
Set this to medium grey
to start off.
This colour value
will be manipulated later
along with attenuation distance,
but the closer
the colour is to black, the thicker
the fog will get.
The closer to white, the thinner
the fog will get.
However,
we need to set the attenuation
distance to something sensible
before really seeing the effect.
Attenuation distance
describes the density of the volume
and impacts the intensity
of the attenuation colour.
A value of zero
makes the surface opaque.
This parameter is dependent
on the size of the object.
You may need to adjust
the value accordingly.
Start off
with something like one
and see what it looks like.
You may need to increase it
as much as 100 or more,
or decrease it to 0.01.
Once you see the fog, play around
with these three values
until you are happy.
Ensure
the noise is on to prevent very pixelated
looks while editing.
Be aware
that you will need a higher pass count
and your render will take 20% longer.
When using these
volumetric appearances.
Be sure to check out our visualise
standard and professional courses
to learn more about appearances
as well as many other
elements of visualise.