Hey everyone, Matt again with the Maya Learning Channel.
Today, I want to do a quick breakdown of a Smoke Trail effect done in the Bifrost Graph.
If you’re just getting started with it for the first time,
I recommend watching my basics skills video first by clicking the link on your screen
and then coming back to this tutorial after.
Also note that you can find a finished version of today’s effect in the Bifrost Browser.
This effect is ready-to-use. Just import it into your scene.
You can then sub in any mesh you’d like to emit smoke from here.
That said, it’s still a good exercise to build the effect yourself,
in order to understand and even expand on its various moving parts.
To start this scene, I’m going to load one of the assets available in the Content Browser.
The file is called trilobotCrash,
and uses the older Bifrost Fluids feature to create a splashing water effect.
Feel free to keep this around if you want –
just make sure to disable it for the time being
so it doesn’t impact performance while we create our smoke effect.
Now to create our smoke effect, I’m not going to use the old Bifrost Fluids feature
but rather the newer Bifrost Graph.
So to start, I’ll go to Create > Bifrost Graph…
As usual, this opens the Bifrost Graph Editor and gives me a starting graph
with just an input and output.
Now the easiest way to get started on any aero-type effect like smoke or steam
is by creating a basic_aero_graph.
This gives me a starting compound without any inputs or outputs.
To see it’s contents, I’ll right-click and Explode it.
Now I can see the compound is made up of four parts…
Simulate_aero is the engine that drives the simulation,
using complex math to draw either a volume or set of points representing particles of smoke
or steam.
However, in order to work it requires information
about the air conditions around it (source_air)…
…the objects in the scene that can interact with it (collider)…
…and other miscellaneous quality settings.
The first thing you always want to check in a Bifrost simulation
is that your scene scale is correct.
In this case, 1 grid unit is equal to 1 meter,
which puts our Trilobot here at about 2-3 meters wide and 3-4 meters long.
Just a bit smaller than a compact car.
I’m okay with that, so no need to change anything here.
That means I can move onto actually emitting my smoke.
In order for a Bifrost simulation to show up in the Viewport,
it needs to be hooked up to an Output node.
In this case, I’ll wire its aero-volume plug to it.
On the flipside, I also need some kind of input object to act as an emitter.
I could use the trilobot itself, but I don’t really want smoke to emit from its whole body –
just from the thrusters in the rear.
So I’m going to create a cube and place it behind the trilobot instead.
Then I'll parent it to the appropriate controller so it moves along with the trilobot.
And once that's done, I'll middle-drag it into the Bifrost Graph,
creating a new input node.
Then I'll just hook that up to the geometry plug of the source_air node.
And that's it! Now if I play, I should get smoke.
Now this is just the default basic aero simulation.
It looks okay, but we’re definitely going to want to spruce it up.
The first and easiest way to do that is to step up the density of smoke
via the source_air's “Fog Density” property.
This controls how much smoke is pumped into the voxel space around my emitter.
I’ll also change the manner in which that smoke is pumped in via the Fog Density Mode.
By default, this steadily adds an even rate of fog over time.
But if I set it to Max, then I can instantly get my maximum Fog Density right from the start.
Next, let’s add some directionality by inheriting some of the emitter’s velocity.
Since I want the smoke to shoot out of the boosters behind the Trilobot, let’s set this to -10.
Mm, for something a bit more dramatic maybe I'll go with -25 instead.
Nice. Now that the density is better, it’s time to turn our attention towards the shape,
which is way too uniform.
To change that up, I’m going to add some external influences to push and prod the smoke
in other directions.
The first of these will be Vorticity.
This adds small scale spinning forces that help smoke appear more turbulent
instead of so smooth.
To apply it, I just wire it into the influence plug.
And now if I replay you can see that the smoke is looking much less cube-like.
Next, I’m going to introduce some drag into the simulation,
to represent air in the atmosphere.
Interestingly, I can also plug this into the same spot as the vorticity influence,
since the incoming plug is this dotted “fan” plug that accepts multiple inputs.
And if I play back the scene again, you’ll see the effect of that drag on my simulation.
There’s a bit TOO much drag right now, which is essentially keeping my smoke
at a standstill. So I’m going to reduce it quite a bit.
Much better.
Now, here’s something to consider:
Notice how these two influences are feeding the smoke simulation in parallel.
That means they have no idea the other exists, even though they’re affecting the same smoke.
However, I could also hook them up in series like this…
Then, not only will air drag act on the smoke,
but it’ll also affect the turbulent vorticity influence acting on it as well.
This is more scientifically accurate than having them in parallel.
Contrast this with another influence like Dissipation,
which only makes sense to add in parallel
since it controls the decay rate of whatever its plugged into.
While smoke may dissipate into the air over time,
forces like air drag and vorticity tend to stay pretty constant.
So looking at this now, the shape is coming along pretty nicely.
If I had one last major complaint, it’s that the consistency of my smoke
is still a bit too uniform.
Recall up here that I set the Density to 30.
But if you think about it, real smoke tends to fluctuate in density
rather than always staying the same.
To mimic that, I’m going to add a “vary_source_property” node to the graph.
This randomizer allows me to vary up the value of the property I choose from frame to frame.
In this case, I want to choose “fog_density”…
And then bounce anywhere between 0 to 30.
Then I’ll rearrange the graph to place it between my source_air and my emitter.
And now the density thickens and thins at random!
We’re at a point now where the effect is usable – we could pack up and call it a day.
But the beauty of Bifrost is that I can keep experimenting and layering on top of this.
For example, I could play with different Aero Solver styles,
to give the smoke a much fluffier or whispier look.
Or I could add another “vary” node to change up the “Inherit_Velocity” value
the same way I changed up the fog_density.
That’ll get the smoke speeding up and slowing down at random, adding even more variation.
I’ll just make sure to rename each of these vary nodes so I don't get them confused.
And I’ll add a backdrop for an extra layer of clarity.
And one for my Influences as well.
Finally, I want to touch briefly on the quality of the effect.
If I go back to my source_air node,
you’ll see that Geo Detail Size and Fluid Detail Size are set to 0.05.
These determine the minimum size of a voxel in my simulation,
and thus are the gatekeepers to the number of voxels I can fit.
If I reduce the size of the voxels then I can fit more of them into a space,
which will increase the fidelity of my sim.
Since these values are usually linked,
I’m going to create a new Value node...
...and wire it into both of them.
Then I'll rename it, and add a backdrop.
Now I can control the resolution of my sim from one place.
I’ll also set the Resolution Mode to Absolute.
This forces the emitter’s voxel size to match up with World Space,
rather than adjusting its proportions in relation to the emitter size itself.
Absolute mode typically gives you a more detailed simulation, but at the cost of speed.
And that’s all there is to it!
Of course, this is just one of many possible smoke effects
you could generate using Bifrost.
Feel free to continue experimenting with different settings,
or perhaps even adding color or some colliders.
Or, check out one of my other videos on the Bifrost Graph
to continue your effects journey in Maya!