We now need to define the boundaries of our simulation by creating some additional geometry to stop the particles falling and flying off into infinity. You could prepare some geometry within 3ds Max with your scene and import it, or we could create some basic shapes within RealFlow itself.
Create a cylinder from the Geometry menu within RealFlow. Use the Transform and Scale tools to position and resize it. Note the cylinder appears in the Nodes and Global Links tabs.
Whatever objects appear in the Global Links tab do just that – they are all globally linked – meaning that they will all interact and participate in the simulation. The cylinder will act as a ground place and container to the particles. Also note the options available under Parameters when the cylinder is selected. You can adjust tolerances and behaviors such as friction and how sticky the cylinder surface might be (Fig.06).
Let's add a new daemon called K Volume to our scene. This is a simple container daemon that will further help to keep our particles under control. Any particles that escape boundaries/volume of this daemon are killed off. Use the Translate and Scale tools to move the K Volume daemon into place (Fig.07). Hit Simulate again.
The fluid is emitted from the figure and is interacting with the ground and other geometry in the scene. Now the basic scene is set we can start altering some parameters and refining the fluid simulation. To speed up testing the simulation, select the object emitter node and, under Resolution, reduce this number to 1 or less. Resolution is an important parameter that defines how many particles are emitted into the scene. Generally the more particles you have, the more realistic and detailed the simulation will be.
Let's add another daemon called Surface Tension. This daemon will help to keep the particles together and stop them separating too much. Run the simulation again for a few frames to see the results. Also try altering the Emission speed under the object emitter node to get different results. Enter a value under Randomness to encourage a more random emission pattern from the figure. Set Randomness to 1 and Jitter to 0.6, then hit Simulate (Fig.07).
Now let's animate the emitter as we want the figure to stop emitting fluids. By right-clicking on the desired parameter whilst the emitter is selected you will bring up a menu where we can add animation keys. To set the speed to 0 at frame 0 – right-click on the Speed tab and add a key. At frame 30 – set the speed to 2, right-click and add a key. Go to frame 180 and add another key. Move to frame 190 and set the speed to 0 and add a final key.
Hit Simulate and see how the fluids emit and then stop. You may wish to alter the key frames or values. Right-click on the Speed tab again and select Curves. This opens a typical animation curves rollout/graph where we can see animation keys and interpolation. Adjust the curves to your liking.
Select the object emitter again and raise the Resolution to 1. Let's also change the Internal and External Pressure values; set Internal to 1 or .98 and set External Pressure to 3.
You may also wish to try different values for Viscosity depending on what effect you are after. The default of 3 or 4 will behave like water – something like 8 will begin to move much more like slime or lava.
Some of the particles during the simulation may appear to shoot off occasionally due to high speeds/velocities. We can keep our scene clean by adding a K Speed daemon to it. This daemon has some tolerance parameters that will evaluate how fast particles are travelling and kill them should they be going too fast! We need to find out how fast our particles are travelling to be able to put a useful value into the K Speed daemon. Select the object emitter and under the Node parameters, look under the Display menu for the total.
By default you will see the velocity and as you scrub the timeline you can see the particle min and max speeds (Fig.08).
If your particles have an average speed of 15, for example, enter 20 or more under the K Speed daemon Max Speed value and hit Simulate. There should be a visible reduction of stray single particles that leave the main body of fluid. The particles' speed is tested and if they exceed the max value, they are deleted.
Other daemons you could add are Drag and perhaps a Noise daemon. Drag is a useful feature that adds a level of resistance and dampening to the speed of the simulation, as if the particles are being affected by air resistance. The Noise daemon can be useful in creating some randomness to the shapes and flow of the fluid over time. Again, these daemons can be animated to only affect the particles at the desired time in the simulation.
Let's now increase the resolution of the object emitter to 8. This will mean a much larger amount of particles will be created in the scene so we can get better detail and a clean surface/mesh. The simulation time will also now increase. Hit Simulate and allow the sim to complete. How long this takes can depend heavily on your system/hardware. The more processors and RAM you have available, the faster your RealFlow simulation will go.
However, there are some optimizations we can make within RealFlow to help speed things up.
Click on the arrow next to the Simulate button and select Options from the drop down menu. This menu has a min and max Substeps value, which defines how accurately the simulation will perform. By default, the maximum value is often too large a value for many simulations. Lower the maximum Substeps to 166.
In this menu you can also alter the frame rate of your fluid simulation. Setting higher FPS values can make fluids move more slowly and appear larger when played back at more conventional frame rates such as 24p (Fig.09).
Review the completed simulation. Now let's create a mesh within RealFlow that can be brought into 3ds Max. Click on the meshing and select Particle Mesh. This will add a mesh node to the Nodes tab. RealFlow will automatically assign the object fluid emitter in the scene to the particle mesh. Right-click on the particle mesh node and select Build.
After a few seconds the mesh will appear around the particles. Meshing within RealFlow can be somewhat an art in itself and it's a matter of playing around with the values and node parameters to get a good result. Of course, there are also alternate methods for meshing the particles within 3ds Max, such as third party plugins like Frost and Glu3D, both of which I take a more detailed look at in the accompanying video.
Once you are happy with your mesh and have created the mesh for the sequence, each frame of the mesh, as well as the particles, will be saved out to disk and ready to load into 3ds Max. Hit F12 to bring up the RealFlow Export menu. Here you can see a list of all data that can be exported from your scene. If you have created additional emitters and data, ensure you enable the appropriate check boxes in this rollout to ensure it is saved out to disk.
Back inside the 3ds Max scene let's import the fluid mesh sequence. Under the RealFlow Import menu select Create BIN Mesh object and a dialog box will open to allow you to select the mesh BIN files. Select a file from the sequence
and hit OK.
You should now see your mesh that was generated in RealFlow appear inside 3ds Max and be at the correct scale in relation to the other objects in the scene. This mesh can now be assigned materials and even other modifiers, like any other 3ds Max object.
I hope you enjoyed the tutorial and introduction to getting scene data into RealFlow, creating a simulation and exporting it back into 3ds Max. Of course there are numerous other options for bringing in the data, both the mesh and raw particles, some of which I briefly look at within the downloadable video (Fig.10).
< previous page