hey everyone matt here with the Maya Learning Channel so have you been
following my most recent videos you should have a pretty good handle on
building effects graphs with the new Bifrost plugin however that still leaves
two questions once you've built the graph how do you cache it and render
your final shot so here I have the same trilobite crash scene from my other
tutorials I like the way the smoke looks but the playback speed is very slow also
I can't scrub the time slider either since the effect is being calculated
live to mitigate this I'll need to go into the Bifrost graph and cache the
effect now there's a few different ways to do this but all of them basically
boil down to running the sim through a write node once for each frame saving
them to disk and then switching to a read node after the cache is complete to
switch Bifrost from calculating on the fly to reading from the cache depending
on the type of format you want to output to you'll need to use different read and
write notes too or rather than dealing with all that you can just use the file
cache node instead this handy little compound handles all this complexity for
you allowing you to switch between reading and writing in all three formats
with some easy-to-use parameters instead to use it I'll plug it between my
simulation and output nodes exactly where I would have put the individual
readwrite nodes now that everything is hooked up let's take a look at the file
cache itself first I want to point out that it's what's called an experimental
compound as evidenced up here by the orange icon this just means that the
compound is in an earlier state of development so you'll want to keep an
eye on it to make sure it's working as intended and you may see changes to it
later down the line as for the properties themselves they are mostly
self explanatory use the mode to set whether the compound
will write to or read from the cache there's also a lazy mode which will
write automatically if it doesn't detect any cache files in the file name
directory and read if it does just note that you can't partially write a cache
then read from it then start writing again later once lazy mode stops
writing it switches to read mode and never goes back if you really want to be
sure I recommend sticking to read write mode exclusively obviously I'm gonna set
it to write mode since I don't have a cache yet there's also a pass-through
mode which just passes the simulation through the node without doing anything
to it this more or less acts like an off switch next we have the filename unlike
a lot of other file name fields in Maya this one won't automatically default to
your current project folder but rather to the home folder that it's set by your
operating system on windows this is the My Documents folder by default however
I'd prefer to put my cache files in the cache directory of my project folder
this is also where I control the type of cash file produced Bob or Bifrost object
is the default native format but you could also change this to dot V DB open
V DB or dot ABC Alembic I'll get into the advantages and disadvantages of each
later on in this video but for now I'll stick to Bob in the properties field I
can designate specific properties to be cached but how do I know what properties
are available use a watch point by default all these properties are cached
but that can make our file size unnecessarily large since I'm using this
for rendering the only properties I really need are voxel fog density voxel
temperature voxel velocity voxel component and voxel tile tree note that
those last two are added automatically when using B dB
and finally I can designate a specific frame range if I only want to cache
specific frames now I'm ready to start writing my cache before I do though let
me show you a little trick to speed up the process if I just hide the smoke in
the viewport it won't have to evaluate and thus will play faster however for
this to work you need to have at least one other unhidden BIF object in your
scene as well this is because if all your bits are hit in my won't ask
Bifrost to evaluate anything and thus nothing would cache and then I'll play
so nothing the cash is complete I'll just flip the toggle on my file cache to
read mode and unhide my Biff object and now playback is faster and I could scrub
back and forth without losing the smoke
if I ever want to change the simulation I can set this back to pass through then
make and test whatever simulation adjustments I want before returning to
right mode to overwrite the previous cache so now that the simulation runs a
little faster I'm ready to render my final result to prepare for that I can
sub in a nicer model and add a sky dome light with HDR then I'll do a test
render
now this looks okay but it's just using the default dumb shader this is just a
flat color that doesn't take into account any of my Bifrost simulation
data let's smarten it up with an Arnold
volume shader instead to assign a new material to any Bifrost output object I
need to use the assign material node I'll put this after my file cache in the
chain then plug it into the same output port now I need to create a material for
the smoke which I'll do in the hypershade in this case the most
appropriate material is an AI standard volume shader and once that's done I can
middle drag it into the graph just like a transformer shape node then I'll just
wire it up to the volume material port here
this process would be the same if I were assigning a surface or displacement as
well we're not quite done yet though because a volume shader requires a bit
more information so I'll need to change the density channel to the simulations
voxel fog density and set emission and temperature channels to voxel
temperature soon we hope to make only the temperature channel necessary note
that you can also use the Bifrost Aero preset up here to set all these for you
at first the smoke appears white but that's just because of the default
temperature setting now if I were to change the density or temperature of my
smoke the material would properly reflect that
all that's left now is to batch render my finished animation
you