Download as pdf or txt
Download as pdf or txt
You are on page 1of 98

Layer Height

Layer Height
Layer Start
What values to choose?
● Do some quick research on
types of clouds
● Stratocumulus look like your
normal everyday puffy
clouds
● They start at around 0.5-2km
Using real world values
• On a walk, I saw
clouds hitting the
top of this mountain
range
Using real world values
• On a walk, I saw
clouds hitting the
top of this mountain
range
• I found my rough
location and
direction on the map
Using real world values
• On a walk, I saw
clouds hitting the
top of this mountain
range
• I found my rough
location and
direction on the map
• Verified the view
using 3D maps
Using real world values
• On a walk, I saw
clouds hitting the
top of this mountain
range
• I found my rough
location and
direction on the map
• Verified the view
using 3D maps
• Saw that the range
was 800m (0.8km)
Using real world values
• Layer Start of 0.8km
• Layer Height of 0.6km
Using real world values
• Layer Start of 0.8km
• Layer Height of 0.6km

• Means we have to
change our tiling
Using real world values
• Layer Start of 0.8km
• Layer Height of 0.6km

• Means we have to
change our tiling
Using real world values
• Layer Start of 0.8km
• Layer Height of 0.6km

• Means we have to
change our tiling

• Now the layer height is


thinner, but the density
is the same, so increase
density
Using real world values
• Layer Start of 0.8km
• Layer Height of 0.6km

• Means we have to
change our tiling

• Now the layer height is


thinner, but the density
is the same, so increase
density from 0.0005 to
0.0025 (5x)
Using real world values
• Some adjustments

• Not immediately
intuitive

• Shadow Tracing
Distance is set for large
clouds
Using real world values
• Some adjustments

• Not immediately
intuitive

• Shadow Tracing
Distance is set for large
clouds 15km to 2km
Using real world values
Simple Erosion for
details
Detail Noise
● Using a 3d tiling noise
is usually best

● Swiss cheese method

● Subtractive - takes
away density from
existing regions

● Try and stay


normalized
Detail Noise
● Now we have two
scales for separate
detail UV control
Detail Noise
● Now we have two
scales for separate
detail UV control

● Then sample a
secondary detail
texture

● Cuts holes at a higher


frequency
Warping input space
for details
Vector Noise
● Instead of subtracting,
we warp/displace
where the original
cloud is sampled from

● Similar to advection in
fluid dynamics
Vector Noise
● If we sample the noise
and then use that to
offset our original UV
location, it warps the
clouds

● Great for edge detail


Vector Noise
● We introduce a third
UV scale output
Vector Noise
● We introduce a third
UV scale output

● An 3D vector noise is
first sampled and
subtracted from
main UVs

● Introduces a
dependent texture
read
Conquering your
Atmos-fear
Atmosphere Settings
● So far, most of the
control we have has been
through the volumetric
cloud component and
material

● There is another aspect


to this system we can
explore

● Atmosphere!
Atmosphere Settings
● Mie Scattering

● Scattering of
light due to
particles in the
Air

● Water, Dust,
Pollution

● Great for
achieving
overcast looks
Atmosphere Settings
● Mie Absoption

● General
Attenuation due to
those paricles
Atmosphere Settings
● If you are increasing
Mie scattering, then
it might make sense
to reduce the
contrast and soften
the edges on the
main clouds

● Ties it all together


Atmosphere Settings
● Rayleigh Scattering

● Also scattering due


to particles in the
atmosphere!

● Great for beautiful


scenes with yellows
and blues

● The way I
remember which
kindis which is that
Rayleigh is Rayleigh
Atmosphere Settings
● Rayleigh Scattering

● Also scattering due


to particles in the
atmosphere!

● Great for beautiful


scenes with yellows
and blues
Atmosphere Settings
● Be careful if you
want beautiful
sunsets!

● More scattering
means that less
light reaches
destination due to
scattering along the
longer path through
the atmosphere
Atmosphere Settings
● Be careful if you
want beautiful
sunsets!

● More scattering
means that less
light reaches
destination due to
scattering along the
longer path through
the atmosphere
Alternative to 3D
textures
Basic Shaping of the Clouds
● Idea is to use 2D texture
maps to control macro
coverage

● Then use Falloff curves to


shape the height

● Use noise to erode macro


shapes
Basic Shaping of the Clouds
● 2D projection shows the
straight lines

● Want a nice way to fade the


bottom and tops of clouds

● Common approach is to use


curves (which we will see
how to do in a bit)

● For now, let’s use maths!


Mathematically describing shape
● We want 0 at bottom and
top, 1 in the middle, with a
nice curve in between

● A ‘U’ shape?

● Any simple mathematical


equations give that shape?
Mathematically describing shape
● We want 0 at bottom and
top, 1 in the middle, with a
nice curve in between

● A ‘U’ shape?

● Any simple mathematical


equations give that shape?

● Squaring to our rescue


Inventing functions visually
● Start with a straight line
Inventing functions visually
● Abs to make all positive
Inventing functions visually
● OneMinus to flip vertically
Inventing functions visually
● Raise to power to apply a curve to make it nonlinear
With great power comes great responsibility
● Quick warning!
● Pow clamps input before it raises the base to the exponent
● If you are using this for a mask, then abs before the power op.
With great power comes great responsibility
With great power comes great responsibility
To do:show 2D clouds
Controlling Look
through Advanced
Ouptut
Advanced Volumetric Output node
● Phase Functions
● Occlusion
● Scattering
Every cloud has a silver
lining*
● Depends on the direction you
are looking at the cloud from
relative to the sun direction

● Phase Functions have an


effect on way light scatters
Occlusion & Scattering

● Controls how much light is


occluded as we march
through the clouds
Balance between density and occlusion
• You can have soft
clouds but high
occlusion

• Or dense clouds with


low occlusion
Balance between density and occlusion
• You can have soft
clouds but high
occlusion
• Or dense clouds with
low occlusion
Using Volumetric
Displacement
Vertical Displacement
● Instead of Carving in
2D and fall off in height,
we can use noise
textures to shape the
height

● Uses noise value as a


vertical offset
Vertical Displacement
● Idea is that we use the
texture values to
warp/offset the space
within our normalized
range

● If we the current
position is beyond the
threshold, it counts as
cloud
Displacement – single worley frequency
Displacement - worley fBm
Displacement
● Worley/Voronoi works
best

● Avoid discontinuities
and keep smooth

● Vertical displacement
only

● Good for macro


shapes, apply detail as
per usual
Horizontal Displacement
● Great for large scale
‘fluid warping’

● Help reduce visible


tiling repetition
Horizontal Displacement
● Take a 2D map and do
a 2D projection in the
world

● Use that to offset the


main Uvs used for all
sampling
Horizontal Displacement
Horizontal Displacement
Horizontal Displacement
Clouds Types
Types of Clouds
● Cumulus
Multiple Clouds Types
Manging UV Space
● So far have been
setting a single layer
height for each clouds
type and working within
that one 0-1 UV space

● How do we have
multiple cloud types
with their own 0-1 UV
space?
Layer Height
0-1
Layer Height

0-1
Layer Height
0-1

0-1
Layer Height
0-1

0-1

0-1
Remapping
Remapping
● Operation that takes an input
range and transforms or
1.5
maps it to a new ouput range

-0.333
Remapping
● Operation that takes an input
range and transforms or
maps it to a new ouput range

2.71828

1.5

-0.333

-3.14159
Remapping
● We can use our 0-1
normalized input and pick
from within it any ‘inner’
range we want

● Just have to specify the


desired min and max

● Can do this multiple times

● Means we can leave the


component alone
Layer Height
0-1
Layer Height
0-1
Layer Height
0-1
Mapping Multiple Range Layers
Mapping Multiple Range Layers
Layer Height
0-1
Signed Distance Fields
Signed Distance Functions
● Volumes

● Instead of storing density,


stores a scalar/floating
point value that states the
distance to some surface

● A way of storing a surface


volumetrically

● Aka implicit fields / level


sets
Signed Distance Functions
● Implicit Functions

● ‘Closed’ equations

● Describes a condition that


is met

● Don’t ‘give’ an answer


Signed Distance Functions
● Can store a ‘sampling of
the function’ as a set of
discrete values

● Once we sample the


values, the analytical
function is gone

● It’s now a volume texture


that ‘represent’ that
function discretely
Optimization 1
Conservative Density
● Help unreal know where
there are no clouds so it
knows to skip empty
areas

● This prevents the material


from being evaluated for
empty areas
Conservative Density
● Conservative Density slot
is a float4 slot

● Red/First channel is what


we need to set to indicate
that there is ‘stuff’ there

● Material will be evaluated


there.
Conservative Density
● Your strategy should be to
make the input to this slot
as cheap as possible to
run

● Approaches can be

● Only run the 2D projection


stage of the overall shape

● Sample the macro texture


at a higher mip

● Skip all detail erosion


Conservative Density
● We can access that
density value when the full
material is evaluated
through a different node

● Volumetric Advanced
Input
Revisiting Remapping
Remapping Distance Values
● You can selectively pick a
range, and ‘Map’ it to your
desired Cloud shape

● With distance values, you


reverse the direction that
you remap in

● Gives finetuned control


over your cloud size AND
edge softness
Coverage Control
● Even a scalar noise
texture can be remapped
to control how much
cloud occupies the sky

You might also like