Deforming soft bodies in slow motion is a very appealing subject. In this short tutorial you will learn how to adjust RealFlow's Caronte rigid and soft body's solver to get a smooth simulation with vivid deformations. For this project, the famous Stanford Bunny is used. The OBJ for this project has been downloaded from here:
http://www.prinmath.com/csci5229/OBJ/index.html
The result of this tutorial has been rendered with RealFlow's implementation of Maxwell Render.
Here is the nodes list:
- 4 “Bunny” objects
- 1 “Cube” object (floor)
- 1 “Gravity” daemon
The “Cube” and “Gravity” elements can be added from RealFlow's “Edit” menu:
- Add > Objects | Daemons
The “Bunny.obj” can be imported to your 3D software, cloned and assembled there, and exported as an Alembic or SD file. Alternatively, it is possible to load the OBJ file into RealFlow directly and scale, position, and rotate the bunny. In RealFlow, objects are imported with
- Ctrl/Cmd + I
RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys.
Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD ↔ Curve
Viewport perspective is changed with the 1, 2, 3, and 4 keys.
Shading modes are toggled with the 7, 8, 9, and 0 keys.
The Setup
Import the bunnies as an Alembic, SD, or SD file with the Ctrl/Cmd + I. If not done already, reposition and rotate the loaded objects.
Add a cube object and rescale/position it to your needs. Do not make it too small. This node (“Cube01”) will serve as the ground. The distance between the bunnies and the floor should not be too large (1.5 - 2.0 m are enough).
“Gravity” introduces a force.
Assign different colours to the bunnies under Node Params > Node > Color.
The bunnies are soft bodies, the “Cube01” node is a passive rigid body:
- Selected node > Node Params > Node > Dynamics
The Soft Body Parameters
For each bunny different settings are used. The associated parameters can be found under
- Selected bunny node > Node Params > Soft body
The relevant parameters for a highly deformable behaviour are “Length stiffness” and “Volume stiffness”. The higher their values, the more rigid the objects become:
Enter random values between 0.1 and 0.7 for both parameters.
Change “@ elasticity” to values between 0.5 and 0.7.
The “@ mass” value depends on the size of the imported nodes. If the value is too small, increase it to something between 500 and 800.
Repeat the previous steps for all bunnies in your scene.
Adjust the FPS Rate and Caronte's Quality Level
These settings are made in the “Simulation Options” dialogue: Click on the small triangle next to the “Simulate” button and choose “Options...” from the menu. This panel is the place where you adjust RealFlow's accuracy. This is done with the help of so-called substeps. The more substeps, the better the simulation turns out, but at the cost of longer simulation times.
When you work with very high FPS rates you can normally decrease the number of substeps. As a side effect, the simulation performs much faster and it is very tempting to work with the lowest possible value. But, with high FPS settings, and fast moving objects/particles you might observe a rugged motion with visible steps. To avoid this, it is necessary to increase the number of substeps to get a smooth motion.
First, change the FPS rate for this project under General > FPS output to 400.
Go to the “Caronte” page.
Drag the “Quality” slider” to 20.
Extend the simulation to 400 frames (see below).
Simulate
Create a preview with Playback > OpenGL Preview.
After the images have been assembled, RealFlow's “Movie Player” appears. Stop the movie and enter 25 under “FPS”. Hit “Play” again.
The bunnies' motion is rugged and the objects “jump” from one frame to another. To fix this, open the “Simulation Options” window again:
Caronte > Quality > 75
Simulate, create a preview, and set the player's “FPS” to 25.
Now you have a clean and smooth motion.
How to Extend the Simulation Range?
Between the timeline and the “Simulation” button you can find two input fields. The first one determines the last playback frame; the second one shows the last simulation frame. To change it, simply enter decrease or increase the value.