B: RealFlow Fluid Simulation.
- Extract RF4_start_tutorial.zip file to a local directory and open the directory. Copy the scene data file that you created previously: ‘water_sphere_tutorial.sd’ into the ‘objects’ sub directory.
Alternatively, you may create a new RealFlow scene and copy the scene data file: ‘water_sphere_tutorial.sd’ into the ‘objects’ directory. In this event, you will need to change the following settings in RealFlow: scale: 0.10
, animation length: 40
. - If you haven’t done so already, start RealFlow. Under the File menu, select import > import object and import the copied scene data file into RealFlow. As you can see, the sphere object we created in 3DS Max now appears in RealFlow.

- One more step you should perform before making further changes is to ensure that the axis setup setting is configured for your 3D application. In the General tab under File > Preferences, select the axis setting that corresponds your 3D application. If you do not see your 3D application displayed in the drop down menu, leave the setting as it is.

- Select the sphere object in the Nodes panel to bring up the Node Params panel. Under Nodes, the position information should tell you the sphere location within the RealFlow environment. If the position is not at origin, i.e., 0,0,0, we need to change it so it can align with everything else we will add to the RealFlow scene. Click the SD < – > Curve button once to allow editing by RealFlow and change the position settings to 0.0 for all three axes.

- The sphere represents the volume that the fluid will occupy. However, as the fluid will be in motion, it should not occupy the entire volume of the sphere. We, therefore, have to create fluid that, initially, only partially fills the spherical volume. The ‘Fill Object’ emitter can fill the volume of a mesh object with fluid particles. Add a ‘Fill Object’ emitter to the scene by clicking the ‘Add Emitter’ icon
and selecting the ‘Fill Object’ emitter.

- Make the following changes to Fill Object emitter parameters:
- Under Particles:
- Resolution: 30
- Density: 500
- Viscosity: 1
- Under Fill Object:
- Object: Sphere1
- Fill Volume: Yes
- Fill Z ratio: 0.3

By setting the Fill Z Ratio to 0.3, we are filling 30% of the spherical volume with fluid as shown in the figure below.

- Under Particles:
- If we were to leave the settings as entered so far and run our fluid simulation, we will have created a fluid simulation that is not too exciting. If you want, you can try this by hitting the SIMULATE button just to see what happens. The particles representing the fluid will rise slowly and that’s about it. It is evident that this is not a very realistic simulation of typical fluid behavior. There are no forces acting on the fluid so it simply floats there in a manner somewhat similar to fluid behavior in a zero gravity environment. So let’s add some of the forces that we expect would typically affect fluids.
- The first force we’ll add is Gravity. Click the “Daemons” icon
, and choose ‘Gravity’ to add a realistic gravity force normal for a real world environment.


The position of the daemon isn’t too important as long as the arrow is facing down. If you were to run the simulation again (by rewinding the timeline and clicking SIMULATE), you would see that the fluid particles no longer rise as before although they still move around. This is a little closer to what we would expect from a contained body of standing water. Again, not too exciting. So, what other forces could we add to stimulate fluid motion?
- RealFlow contains several daemons that simulate the effects different types of forces on fluid behavior. In this tutorial, we will introduce a daemon with a random force vector acting upon our fluid to make its behavior more interesting. Go ahead and click the “Daemons” icon again and, this time, select a ‘Noise Field’ daemon. Change the “Strength” parameter to 25.0.


- Adding a Noise Field daemon introduces an element of random variance to the motion of our fluid particles that is similar to the random turbulence created by wind or shear effects in our simulation. With unpredictable behavior comes the possibility that the movement of some particles may carry them outside the predefined space of our sphere. In order to maintain some element of control over the spherical boundary of our fluid motion, we can also add a daemon to our simulation that will remove those particles that move outside the volume of the sphere. In this tutorial, this step is superfluous because of the relatively simplicity of our simulation. RealFlow can make all the required calculations for particle motion and volume containment without sacrificing accuracy or speed, due to relatively low particle count, particle velocity and primitive mesh object. However, in a more complex simulation, it is a good idea to add a Killer daemon to destroy particles that fall outside a predefined space. This step eliminates unnecessary calculations for unwanted particles.
Click on the Daemons icon and add a kSphere daemon to the simulation. Use the “Fit to Object” setting to position and size the daemon to our sphere and set the radius to 0.77.


- Re-run the simulation again, and you should get something similar to the figure below. At this point, you may disable the display of the sphere object by changing the sphere’s Visible setting to No, in order to view the fluid particles more clearly.


- Hopefully, our fluid particles look more interesting now than before. Now that we have our particle simulation, we need to create a kind of ‘skin’ for it so our fluid can have a visible surface. In RealFlow, this is done with a 3D fluid mesh that is built from the particles in our simulation. To create the fluid mesh, click the “Add mesh” button
. In the Mesh section under Node Params, change the Polygon size to 0.03.

- Right click the ‘Mesh01’ node and select ‘Build’ to generate the mesh. You can view a solid rendition of the mesh by right clicking any view and selecting Shading > Smooth.

- Reset the simulation by clicking the RESET button and run the simulation. The mesh should now be displayed in each frame of the simulation.

- By default, RealFlow saves a 3D model of each mesh generated simulation under the ‘meshes’ directory of the scene folder. To ensure that this happens, you can check the export setting in ‘Export Central’ under the Export menu. With the fluid mesh exported to the meshes sub directory, we are ready to return to our 3D application.
You may view the completed RealFlow scene by opening the ‘end_tutorial.flw’ file in RealFlow.

Leave Your Response