[Music]
hello and welcome to part two of the
chaos phoenix basics series
this video picks up from where we left
off in part one of this series so make
sure to watch that first if you haven't
in this part we will take a closer look
at how phoenix works under the hood and
introduce several powerful features for
shading and shaping your simulations
this includes the particle shader for
shading particles as well as phoenix
textures and phoenix forces which can be
used to enhance and further manipulate
your simulations to create even more
advanced scenarios
on that note let's go ahead and get
started
when phoenix simulates grid channels are
written to each cache file that
represent the properties of the
simulated fluid at that frame
technically grid channels are the values
contained in each of the voxels in the
simulation grid such as smoke
temperature liquid velocity rgb and so
forth depending on what you're trying to
simulate you can choose which grid
channels to export to the cache files
based on your needs for example to
simulate multiple colors of smoke you
would want to export the rgb grid
channel so that each of your smoke
sources emitting different colors of
smoke would have their rgb color
information saved in that sims caches
phoenix's grid channels also have
different ranges depending on the type
of grid channel when you use them in
rendering for shading or during
simulation for masking it is good to be
aware of the minimum and maximum values
that a grid channel can have
for example phoenix smoke usually goes
from 0 to 1. the phoenix source won't
stop you from emitting smoke above one
and it would look thicker in rendering
but you could also achieve the same
result using the volumetric shading
options in the render rollout
meanwhile the temperature channel is in
kelvins and typically goes from 300
kelvin to 2000 kelvin or up to a few
thousand
300 kelvin means the smoke will neither
rise nor fall down
higher values than 300 kelvin will rise
meaning if you wish to simulate cold
smoke that flows downward you can lower
the temperature below 300 until you
reach zero
you can find more information about the
other grid channel ranges in our docs
as mentioned briefly earlier phoenix can
also simulate particle systems for fire
and smoke simulations phoenix can
simulate drag particles for liquid
simulations phoenix can simulate liquid
particles as well as secondary particles
such as foam splash
mist and wet map particles
these secondary particles exist so that
you can achieve a variety of different
liquid scenarios
each particle type has its own life
cycle with rules for when and how they
are born and die off
in addition you can control which
particles you need to simulate given the
scenario
for example a beach scene may use every
single one of these secondary particle
types to achieve its effect while
simulating wine pouring into a glass
could use only liquid particles without
any secondary particles at all
you can create particles using a source
such as the fire source for drag
particles or create liquid particles
using the liquid source as well as using
a script
foam splash and mist particles can be
created using a source as well but they
can also be born automatically based on
conditions set in the simulator's
settings and the fluid's properties and
behavior
using the simulator settings you could
create a variety of different scenarios
from the splash and foam needed for a
large wave to the wake from a ship and
so forth
unlike liquid particles note that to
render any type of secondary particles
you must shade them using the phoenix
particle shader you cannot shade them
using a standard render material let's
take a look at some of the fundamentals
of particles to understand them better
just like grid channels particle systems
also contain different particle channels
or fluid properties for each particle
there are different types of particle
channels such as position
size
age id velocity and so forth when
simulating with phoenix you can choose
which channels to write to the cache
files depending on your needs
once more phoenix's particle channels
also have different value ranges
depending on the type of particle
channel
it can be helpful to know the minimal
and maximal ranges that the particle
channel types have
for example the particle age channel is
in seconds not to be confused with
frames
it cannot be a negative value it always
starts from zero when a particle is born
and it increases over time
meanwhile the velocity channel is in
voxels per second so its range depends
on the simulator's grid size and grid
resolution
once again you can find more information
about specific particle channel ranges
in our docks
lastly phoenix has a particle shader
that is used to shade phoenix particles
such as splash and foam the particle
shader contains multiple shader modes
which can be used to shade these
different particle types these shader
modes have been designed with specific
particle types in mind for example the
splash shader mode is typically used to
shade splash particles
however phoenix also offers the
flexibility to use any mode to shade any
secondary particle type so that you can
achieve a wide variety of effects
in addition the particle shader can also
shade non-phenix particle systems in
order to render particles from 3ds max's
particle flow
tie flow thinking particles and even n
particles in maya
simply create a particle shader node add
a phoenix particle system by picking the
phoenix simulator or pick any other
external particle system that you wish
to render and the particle shader will
shade it using the cache data from the
sim
since the particle shader is a separate
node you can also use multiple particle
shaders with different settings in order
to shade multiple particle systems
within the same simulation this way you
can create different fine-tuned
appearances for splash and foam
particles when rendering and achieve
even more realistic looking effects
you can also import caches from other
simulators and shade and render standard
particle systems that were not simulated
with phoenix
you might be wondering why not render
each particle as geometry using a
material instead
the reason is that the particle shader
has been optimized to render very fast
in comparison to a traditional material
shader while still being capable of
achieving a large variety of different
effects
once more it also provides several
different shading modes for more
sophisticated results which enable you
to quickly achieve realistic-looking
particles for different scenarios
for example it can draw particles as
points a variety of different bubbles or
even voxelized particles into a grid
using the fog mode which enables you to
render particles using the volumetric
shader
there are also three different bubble
style modes available bubbles cellular
and splash which are intended for
different scenarios
for example when rendering foam you can
use the cellular mode to render
polyhedron like cells that look very
similar to real foam these make it
possible to shade foam that is close up
to the camera and have it look
convincing it would be very hard to
achieve a similarly convincing result
using a standard material shader now
let's switch gears to briefly talk about
another important part of simulations
which are forces
forces can be used to change a
simulation's behavior for example to
make smoke appear more turbulent or flow
along a predefined path
phoenix has a number of forces that can
affect simulations as well as supports
the use of native 3ds max and maya
forces including important ones such as
vortex wind and drag forces
there are five different phoenix forces
available
that can be used to create more complex
simulator behaviors these are the plane
force body force follow path wave force
and turbulence let's go over them
briefly
the plane force pushes the fluid in a
specified direction simulating wind or
gravity
the dynamics are controlled by two
parameters that balance between
predictability and natural behavior the
strength of the force and drag
note that the drag determines how much
the fluid's behavior is suppressed or
how closely it follows just the plane
force while preventing the fluid from
continuously accelerating forever
meanwhile the body force creates a force
to pull the fluid toward or away from a
geometry object
a positive strength value produces a
force that pulls fluid toward a geometry
object and can be used to make the fluid
form the shape of the geometry for
example making a liquid simulation form
the shape of a letter number or logo for
an interesting effect
meanwhile negative strength values repel
the fluid away from the geometry object
follow path is another force that pushes
a fluid but this time along a spline
quite literally this force can be used
to make smoke or liquid particles follow
the path of a spline for example to make
fluids move on a swirling invisible
spline around some geometry
the degree of force is controlled by a
virtual pipe around the spline
for points outside the virtual pipe the
force pushes the fluid toward the spline
and for points inside the pipe the force
pushes the fluid along the spline in one
direction
the wave force meanwhile produces real
simulated waves inside a liquid
simulator and is primarily used for
ocean simulations this is an alternative
to the render time displacement that you
can achieve with the phoenix ocean
texture which we'll discuss in a moment
when we cover phoenix textures
essentially the way force allows you to
control how strictly the fluid will
follow the ocean texture or how much
freedom the fluid will have to splash
and swirl around
there is also a massive waveforce toggle
which allows for even more control over
the waves produced by the wave force and
is especially helpful for creating large
waves
finally the turbulence force is fairly
self-explanatory and adds movement
similar to fractal noise for example it
can help to break up large and smooth
clumps of smoke into more chaotic
frenzied and randomized looking results
next let's take a look at phoenix
textures which can be found in the
material editor in 3ds max
or the hypershade in maya
phoenix provides several textures for
use in simulations and rendering which
can be helpful for creating more
advanced simulation effects
first there is the grid texture it
generates a procedural texture from a
simulator's grid channel data for use in
shading the simulation
a typical application of this texture is
for shading the measures of simulated
liquids that were exported with an rgb
grid channel
you could also use it as a blending mask
where the grid texture can be used to
read the rgb color of the simulator
which can then be used as a blending
factor between two different materials
this texture is typically found in more
advanced setups so for a more detailed
explanation an example of a use case you
can check out our existing tutorials
that utilize this workflow such as the
lava flow or milk and chocolate
tutorials
meanwhile there are also two water
textures available which are
specifically used with water effects to
make them look more realistic
the ocean texture is an infinite and
non-repeating procedural texture for
representing a realistic ocean
it displaces a water surface at render
time to add wave details and can easily
be used to create an infinite ocean mesh
however if you want to actually simulate
waves interacting with geometry rather
than being a non-interactive render time
displacement you can also plug the ocean
texture into a wave force to drive the
simulation of waves based on your
settings in the ocean texture
meanwhile the foam texture is designed
to be used with the ocean texture to
create the effect of foam forming at the
crests of the waves
since the foam is generated at render
time it is quite fast and can be helpful
when you prefer to avoid simulating
actual foam particles which can be time
consuming to simulate especially for
larger scenes
lastly there is the particle texture
which is a 3d texture that is similar to
the grid texture in that it reads data
but the particle texture specifically
reads particle channels for example it
is commonly used to read wet map
particles to emulate a wet surface
wet map particles are created at the
point of contact between the liquid and
the scene geometry and can be used to
drive shaders through the phoenix
particle texture when used with a blend
material the particle texture acts as a
mask to blend between two materials for
example a wet material and a dry
material this way geometry covered by
wet map particles can appear wet and the
rest of the geometry can appear dry
the particle texture can also shade a
particle's color based on its age or
speed so that you can change the
particle's color over time based on the
behavior of those particle channels you
can even turn the particles into a 3d
mesh by using the particle texture as a
surface channel texture in the render
settings this gives you additional
flexibility for shading particles to
achieve more advanced effects for
example you could use the particle
texture to mesh specific particles based
on their color which would make it
possible to mix together solid and
transparent liquids using the two meshes
alright now you've seen how grid
channels and particle channels represent
the various fluid properties of your
simulations
in addition we discussed particles and
how the particle shader can be used to
shade particles as well as the different
modes available for shading such as the
variety of bubble types or the fog mode
we also covered the phoenix forces and
phoenix textures which can be used to
create more advanced effects and further
manipulate your simulations to your
desire
thanks for joining me for this lesson
and i hope to see you next time
[Music]
you