Fluid dynamics
Tutorial by James Mahoney
Topics
Bifrost Fluids
Emitters
Solvers
Fields
Passive Colliders
Save Initial State
Exercise
Part A - Filling a Dish
Create a new empty scene and give it a good name, set your shelf to “FX”
Add a physical sky and bump up the intensity as usual
Make sure the playhead is at frame 1 and that right click on the timeline and make sure that the Playback Speed is set to one of the “Play Every Frame” options.
Create a polygonal dish ( I used a hemisphere with extruded faces and shaped with the object scale tool) Keep it simple.
Select the sphere inside the dish and with it selected click on Bifrost Fluids>Liquid
This sets up a fluid simulation and sets the selected object as the emitter (not too different than nParticles but there’s now a bifrostliquid simulator instead of a nucleus
BifrostLiquid has a child node called “liquidShape1” select that and in the attributes you can increase the Particle Display>Point Size to about 3 or something so you can see it better
Select the dish mesh object and then select the bifrostLiquid node
Then make the dish a collider with Bifrost Fluids>Add>Collider
In the bifrostLiquidProperties node you’ll find under Resolution the most important parameter which is “Master Voxel Size” make this small for a higher resolution simulation. (but it takes longer) 0.15 or 0.2 is a good compromise in most cases)
Also important is under the bifrostEmitter node you’ll find “Continuous Emission” which converts the emitter to something more like a faucet - it just keeps generating more fluid
Now hit play to run the simulation - you should see the blue particles fill the dish - if some spill out you can either raise the edges, lower the emitter or add a “Kill Plane” below the dish so that the simulation doesn’t continue to waste time on unnecessary particles
Let the simulation run a while until the particles settle down a little.
Hiding the dish and sphere and rendering should give you something like this.
Open up the Hypershade to find that Bifrost created a new aiStandardSurface material automatically. You can edit this to adjust the material (“Coat” color is a nice effect on this)
Select the bifrostLiquid node and find Bifrost Fluids > Set Initial State (you cannot change Master Voxel Size after doing this)
Part B - Making a Splash
There are many things you can now do with this pool of water
For one you can now animate this bowl and the fluids will respond somewhat like a normal fluid
Open up the transform node for the bowl and right click on the translation and rotation inputs and select “Set Key”
Then move down to about frame 15 (½ a second) and move and rotate the bowl (just a little is usually best) Set a keyframe as before
Rewind the simulation and hit play.
Alternatively, you can try dropping another collider into the pool to make a splash (this is a bit easier I think)
Make a new sphere or box and position it above the fluid. Make it a collider just as the bowl
Set a keyframe for its position on frame 1
Then move the playhead to frame 15 and set a keyframe in the fluid and rewind the playhead and run it again.
*note: you can right click on a key and choose delete. Also, dot and comma keys advance the playhead by keyframes and shift and click to select a range and then click and drag to move keys around.
Have fun!