Professional Documents
Culture Documents
RealFlow 2014
Maxwell Render
Why RealFlow?
Shattered Glass
RealFlow UI elements, Customizing the Layout, Adjusting Axis and Scale, Adding
Nodes
Particle-Based Meshing
Falling Pencils
Floating Objects
RealFlow Preferences
Simulation Settings
Substeps for SPH Fluids, Hybrido Fluids, and Caronte, Simulate and Reset, Updating the Timeline Cache,
Relationships
Page 2
Platige Image
Page 3
RealFlow 2014
Over the last years computers have become more and more powerful, and modern
systems are able to solve complex tasks like simulations, physically-based rendering,
and handling huge amounts of polygons. With increasing computer power, the demand for realistic fluid and dynamics simulation has been growing as well. Today,
you can see fluids ranging from small drops to huge floods and all these elements
are often combined with rigid and soft bodies. There is hardly any commercial or feature film without fluids and many of these effects have been created with RealFlow.
With RealFlow, you can literally dive into this world and create stunning, artist-controllable, and realistic simulations of watery or viscous substances, huge
amounts of interacting rigid bodies, deforming soft bodies, and infinite ocean surfaces. An open pipeline, connectivity plugins, and sophisticated render
tools make it easy to exchange your RealFlow simulations with your favourite
3D software. RealFlow also supports standards like Alembic I/O and OpenVDB.
This document is a quick guide to RealFlows user interface and main tools. Once
you have read through it you will be able to create your own fluid and dynamics
simulations. No matter whether you are a beginner in the field of visual effects
or an experienced, production-proven veteran: you will love RealFlows intuitive
workflow and the endless possibilities this unique simulation tool offers.
Mirada
Page 4
Why RealFlow?
RealFlow has unreached expertise in the field of fluid dynamics. In 1997, Ignacio
Vargas and Victor Gonzalez founded Next Limit and released the first version of RealFlow. Over the years, RealFlow experienced constant development, and has been
equipped with state-of-the art technologies. Soon, RealFlow became the industry
leader in terms of fluid and body dynamics simulations, and has been used in many
feature film and TVC productions. In 2008, the Academy of Motion Picture Arts and
Sciences has granted a Technical Achievement Award to Victor Gonzalez, Ignacio
Vargas and Angel Tena for the creation of the RealFlow software application, recognizing the significant contribution RealFlow has made to the process of making
motion pictures.
RealFlow also has the ability to cover all your simulation needs within a single
package. As a RealFlow user you are able to simulate everything from small drops
to huge ocean surfaces and combine fluids with body dynamics.
RealFlow is fast, very fast, and handles hundreds of millions of particles, thousands
of objects, and complex setups. The softwares intuitive workflow, the flat learning
curve, and its endless possibilities are unrivalled in the world of physical simulations. RealFlow is available for Mac OS X, Linux, and Windows.
These are some of the reasons why the worlds top studios and VFX artists trust in
RealFlow. And they know why: tighter deadlines, shrinking resources, and higher
demands call for reliable and fast tools.
RealFlow has a clearly structured, and customizable user interface, provides a command line simulation engine (which can be triggered directly from the user interface). RealFlows Relationship Editor gives you the freedom to describe interactions between a scenes elements simply by drawing lines between nodes. We have
also included powerful Python and C++ APIs. If you prefer a node-based workflow
no problem: RealFlow Graphs are a complete visual programming interface with
access to nearly any part of our simulation software.
Another, big advantage is that RealFlow can be used with almost any 3D software.
We provide dedicated import/export and render tools for the main platforms: 3ds
Max, Cinema 4D, Houdini, Lightwave, Maya, and Softimage; Modo has built-in import filters. Furthermore we have open-sourced many file formats. This makes it
possible to write your own import tools.
Page 5
Page 6
Daemons
These helpers introduce forces to accelerate particles and object, they are used to
remove particles based on their position in space, but also attributes like speed or
isolation time. Other daemons help you to customize UV data or add particles to
get coherent sheets of fluid.
Meshes
Fluids are simulated as particles, but mostly rendered as solid volumes so-called
meshes. With RealFlows fast and easy-to-use mesh engines it is possible to turn
millions of particles into accurate meshes showing every little detail.
Maxwell Render
With RealFlow 2013 we implemented the core of the Maxwell Render engine. Now
you are able to create high-quality renders from your simulations directly inside
RealFlow.
Scripting and Coding
RealFlows built-in tools help you to do amazing simulations, but there are situations where you have to influence particles or objects manually. Python scripting,
a C++ interface, and a node-based visual programming system let you accomplish simulations which require more artistic freedom.
Tools
In addition to RealFlows core technologies you will also find lots of helpful tools:
A powerful curve editor helps you to create and manipulate animation curves.
Instead of keys it is also possible to define so-called expressions for describing
motions based on simple or complex mathematic formulas.
RealFlows simulation data can be stored in many different file formats
even simultaneously. Later you load these files to your 3D application with
dedicated plugins, where they are shaded, textured, and finally rendered.
Simulations can be post-processed and retimed using RealFlows Simulation
Retime engine. The advantage? You can change timing without re-simulating!
Furthermore, there are four fracture tools. These helpers help you to break any
object into pieces.
And many more...
Pluto
Page 7
RealFlow Standard
This is our main application, equipped with a customizable graphical user interface,
a 3D viewport, and access to all of RealFlows elements. Here you prepare your
scenes, apply tools, watch a simulations progress, record previews, and do highly
realistic renders. The Standard version is also available with a Learning Edition
or a Demo license.
Dvein
RealFlow Nodes
Nodes can be installed on additional computers of a network. A RealFlow Node
does not have a user interface, and is controlled via a manager from the GUI or a
web browser. RealFlow Nodes can be used to run multiple simulations simultaneously or distribute certain parts of a project over a network, for example Hybrido
splashes and foam. Please note that RealFlow Nodes are sold separately.
RealFlow RenderKit (RFRK)
The RFRK is free of charge, available for all major 3D applications, and facilitates
your render tasks. Fluids can be meshed inside your 3D program directly at render
time, but also rendered as individual particles, or volumetric clouds.
Connectivity Plugins
Connectivity plugins are free of charge and available for all major 3D applications.
This set of plugins provides tools for importing and exporting particles, meshes,
geometry, RealWave surfaces, and cameras. You will also find support for a wide
variety of formats, making it easy to exchange simulation data not only between
different 3D programs and RealFlow, but also with other 3D/VFX artists.
Page 8
3D Scene Description
(in RealFlow or 3D program)
Simulation
Mesh Exchange
A mesh is a polygon hull around a particle cloud. The connectivity plugins support
both the import and export of meshes. The RealFlow RenderKit, on the other hand,
creates meshes within your 3D software at render time.
RealWave Exchange
RealWave data is loaded to your 3D program via the connectivity plugins, but it is
also possible to export any object to RealFlow. There you can use it as a RealWave
mesh and displace it with a wave modifier. The RealFlow RenderKit has support for
RealWave surfaces as well.
Texture Exchange
RealFlow is able to write out different types of textures and maps: wet maps,
vorticity and velocity maps, normal maps and Alpha maps. Textures can also be
loaded to RealFlow and applied to objects, but can also be used as emission masks
for emitters, or maps for controlling properties like particle friction. Inside your 3D
application, maps are treated like textures.
Page 9
When you open your licensed copy of RealFlow for the first time you will see a
standard layout with several panels.
Different 3D programs use different axes setups and scales. Both properties can be
adjusted under Edit (OS X: RealFlow) > Preferences > General.
The menu bar provides access to all nodes (a node is an element of the current
scene, e.g. a daemon, an object, or an emitter), tools, and commands.
The tabs below the menu bar are so-called shelves. They are a quick way to
add nodes and launch tools, but also to change simulation states and shading
modes. Shelves are fully customizable.
RealFlows viewport is your work space and contains a 2D or 3D representation of your scene and its nodes.
When a node is created it appears in the Nodes panel and the Relationship
Editor. The Nodes panel is a list containing all nodes. Here you can group
and manage the scene elements. The main purpose of the Relationship Editor is to specify which nodes will be interacting.
Every node has its own set of parameters. Highlight a scene element and
check the Node Params panel. Here you will find node-specific tabs with the
elements properties.
The Messages panel contains important information about the simulation.
Finally, there are several icon bars with the most-used functions.
Adding Nodes
Creating nodes is an easy task. Just open one of the shelves, for example Liquid
- Particles, and click on an icon, e.g. Square. The appropriate element will be
added to the viewport, the Nodes panel, and the Relationship Editor. You can
also use RealFlows position-aware right-click menus under Add there is a list
with all available node types.
A newly created node is always active; other nodes are selected with the Select
tool from the icon bar or any of the transformation tools introduced directly below.
You have two possibilities for transforming a node:
1. Numerically, with exact values:
Node Params > Node > Position | Rotation | Scale
2. Visually, by dragging handles:
Press W for position, E for rotation, R for scaling.
3. By clicking on one of these icons:
Panels can be detached from the user interface with a click on the Window
symbol in the panels headline. If you want to reposition a floating panel take its
headline bar and drag it to a new place. New panels are added from the Layout
menu. Once you are happy with the layout, go to Layout > Save Layout. From
now on the layout will appear under Layout > Apply Layout.
In order to define the current configuration as RealFlows start layout please go to
Edit (OS X: RealFlow) > Preferences > Layout. Click on the ... button next to
Default Layout and select the desired setup file.
The icon bars can be shown and hidden with a right-click on a free area next the
icons: simply choose which icon group you want to see. If you want to change position and/or orientation of an icon bar click on its double-lined separator, and drag
it to a new place. Save the layout as described above.
Page 10
Page 11
Imaginary Forces
Page 12
If one of the transformation tools is active you will also get information about position, rotation, and scale. The node list can be deactivated under:
Edit (OS X: RealFlow) > Preferences > Display > Display info >
None | All nodes | Selected nodes.
1 - Top view
2 Front view
3 Side view
4 Perspective view
Cameras can be imported from your 3D program or created inside RealFlow from
the Display shelf. Once there is a camera press the 5 key to look through it.
Now you will see two blue frames specifying the field of view. The cameras settings
are located in its Node Params panel.
Top, front, and side views are 2D modes and they allow
Panning Middle mouse button + dragging
Zooming Middle mouse wheel + scrolling
Zooming Right mouse button + dragging
Perspective and camera views are 3D modes and provide another degree of
freedom:
Rotating Left mouse button + dragging
When the viewport contains nodes it is possible to change the shading mode
globally for all elements:
7 Bounding box
8 Wireframe
9 Flat shading
0 Smooth shading
Selected nodes can also be shaded individually with the appropriate commands
from the Display shelf. There you will also find icons for hiding an object (Hidden) and showing an object (Visible).
On the left side of the viewport you can see a list with details about the scene
nodes, for example an objects number of polygons and vertices, or an emitters
number of particles.
Page 13
Most of a nodes parameters can be animated not just position, rotation, or scale.
RealFlow also supports key- and vertex-based animation from imported objects.
Parameters can also be animated with expressions. An expression is a mathematic
function and often used to describe repeating motions, e.g. circles or up and down
movements.
New keys are created with just a few clicks and actions:
Go to the animations first frame.
Keys for position, rotation, scale can be added at once with the K key.
For individual XYZ transformations, click on the Key button and choose
position, rotation or scale.
RealFlows main element for animation is the timeline. It is located at the bottom
of RealFlows user interface. To its left and right you can see three number fields:
0, 200, 200 (please see image below). The
first number (1) represents the start frame of the simulation/playback
second field (2) is the maximum playback frame
third number (3) stands for the simulations maximum frame.
Individual transformation and parameter keys (e.g. a particle sourcess emission speed) are created with a right-click on the parameter value. Choose
Add Key from the context menu.
The timeline slider (4) can be dragged to any frame, but it is also possible to enter a
specific frame number manually. If the scene contains imported objects you will see
a yellow line (5) indicating the last animation frame. The orange progress bar (6)
shows the simulations cached frames. Cached means that RealFlow has written
simulation data to disk. In order to update the already written cache files press
Alt + U or click on the Update Time Line Cache (7) button. With the second
button (8) you can jump to the last cached frame directly, e.g. if you want to resume
a simulation.
The timeline control buttons let you scrub through time, but you can also use the
arrow keys on your keyboard, or the commands in the Playback menu.
Page 14
Zoom tools
Break/unify/flatten tangents
Page 15
RealFlows Preferences
One of the most important elements of RealFlow is the Preferences section.
You can open it from the Edit (OS X: RealFlow) menu.
The window is subdivided into several sections, and settings made here will be
applied to every project they are default values. Many preferences (e.g. General
and Simulation) are discussed and explained in the chapters of this guide, but
there are also a few ones you should take care of in any case:
Display
This is place to configure RealFlows basic user interface. The 3D viewports grid is
adjusted here, but also colours. RealFlow uses the OpenGL for displaying a scenes
elements. If you experience problems with the viewport please consider disabling
Use Vertex Buffer Objects. We also recommend keeping your graphic card drivers
up to date.
Backup
Saving several copies of a simulation project is always a good idea and we recommend enabling RealFlows auto backup function. When you backup the project file
in FLW format you will be able to load and use the backup directly. XML files, on the
other hand, have to be imported with Import > Import Nodes from XML. Please
bear in mind that the demo version does not support XML parsing. XML files are
smaller than FLWs and they are easy to exchange.
Preview
Previews play an important role in RealFlows workflow. In most cases, the amount
of simulation data is too large to maintain realtime playback. Therefore it is often necessary to playback the simulation and create screenshots from every frame.
Such an image sequence is then assembled in the Movie Player window where
you can watch the simulation.
Command Line
Simulations via the command line are typically 30% faster then inside RealFlows
user interface. When a simulation is performed in command line mode you will see
a terminal window showing you the current progress. The settings of this preferences panel allow you to define global settings. You can, for example, determine
how many CPUs or cores you want to use: if your simulations are not very complex
and only contain a few thousands of particles then it is often better to reduce the
number of threads. Of course, all these settings can be applied for every scene separately under Command line options... (see next page, first image).
Emanuele Niri
Page 16
Simulation Settings
A click on the Simulate button triggers a simulation. With Reset all simulation
data and parameters will be reinitialized to perform another simulation. As long as
you did not start a new simulation, the data can be restored completely with the
Alt + U shortcut.
Next to the Simulation button you can see a small triangle. When you click on it,
a menu appears. Choose Options... for access to the current scenes simulation
settings.
Finally, there is the Caronte tab for adjusting rigid and soft body simulations.
The most important parameters are controlled with sliders. Quality has the same
effect as substeps: higher settings lead to better results, but also increased simulation time. In many cases, a value between 20 and 30 is sufficient. Jittering avoids
unwanted motions before or after an event, e.g. when a pre-fractured glass pane is
being hit by a stone. In a setup like that the pieces might show some slight initial
motion which can be suppressed with a Jittering value of 0.
As mentioned above, all settings made here will only affect the currently opened
project. If you want to define standard values, valid for all scenes please go to Edit
(OS X: RealFlow) > Preferences > Simulation.
This image shows the Simulation Options start screen. The remaining tabs can
be opened with a click on Hybrido or Caronte:
The first tab lets you specify the current frame rate and the number of processors
you want to use. Under Stepping you find two parameters for adjusting the simulations accuracy. There is a simple rule of thumb:
With higher numbers of substeps simulation time increases, but you will also get
more accurate results in reward.
If you can see instabilities like misbehaving particles you should consider increasing MAX substeps. For quick previews and tests, on the other hand, it is often
enough to simulate with 50 MAX substeps. Simulations with elastic or highly
viscous fluids work best when MIN substeps and MAX substeps are equal.
In simulations without fluids, but rigid/soft bodies only, both parameters can be set
to 1.
HyFLIP fluids and their secondary elements (splash, foam, bubbles) are controlled
with the parameters of the Hybrido panel. In many cases it is not necessary to
make any changes here.
Page 17
Relationships
In RealFlow simulation it is very common to specify which nodes are able to interact: a daemon should only act on a specific fluid emitter, selected objects should
not collide etc. These interactions can be configured freely with the Relationship
Editor. Every node is represented as a symbol with connections to other nodes.
These connections determine whether a node is able to interact with other elements of the simulation or not. Nodes, which are connected via a hub, influence
each other this way it is possible to connect many nodes without drawing the
individual connections.
RealFlow simulations are stored in various cache files. These cache files are used by
RealFlow in order to display the simulation in the viewport, but also for resuming
a suspended simulation. Furthermore, the cache file formats can be read by the
connectivity plugins and the RealFlow RenderKit they can be seen as the bridge
to your 3D software.
In order to remove a connection, select it with a click, and use the Del key. Now
hit the Ctrl (OS X: Cmd) key, keep it pressed, and drag a new line from one node
to another with the mouse. RealFlows Relationship Editor shows you which
elements can be connected by dimming and highlighting the icons.
When you press the Tab key you will get a menu listing all RealFlow nodes. Simply
choose an entry to add a new scene element. It will then appear in the viewport
and the Nodes panel.
RealFlow is capable of exporting many other file types, e.g. Alembic, Arnold Scene
Source, OpenVDB, Maya Particle Disk Cache, and OBJ. Some of them can act as
cache files. This means that they can be used to replace RealFlows standard file
formats like BIN (default format for particle-based fluids) or RPC (default type for
Hybrido fluids).
Finally, it is possible to write out a wide variety of image formats: displacement
textures are saved as TIFF sequences, wet maps as TGA or PNG (to name but a few),
vorticity and velocity maps as EXR files.
All these export resources are centralized under Export > Export Central
(F12). The window is subdivided into groups, where you will find aliases of the
scenes nodes. This means that you can define the export resources for each node
individually. Of course, it is possible to write out several resources simultaneously,
for example BIN, Alembic, and Arnold Scene Source files.
Export Central does not only let you decide which file format you want to save,
but also where. The entries in the Path column are editable with a double click,
and can be replaced with your own paths. By default you see a token named
$(SCENEDIR). This variable represents the entire path to the current scenes directory followed by the subfolders for objects, particles, images etc.
Alternative paths are a convenient way to prevent you from problems with insufficient disk space. Simply specify other local or network volumes in addition to your
primary drive. Only if this drive is out of space will RealFlow use the alternative
paths in the specified order.
Page 18
Mr. X
Page 19
After the completion of the simulation, the files can be imported to your 3D program. For this purpose you can install the free connectivity plugins. This set of
tools provides everything for loading particles, meshes, objects, RealWave surfaces.
The basic workflow is easy and straight forward:
BIN
BIN
BIN
BIN
SD
SD
Alternatively (or in combination) to the connectivity plugins you can also use the
RealFlow RenderKit (RFRK).The RFRKs mainly works with particles: particles can
be treated as pure particles, for example to render foam or spray. The RFRK
has sophisticated tools for facilitating your particle-render tasks; it also supports
volumetrics and displacement maps.
Another important field of application of the RFRK is meshing the toolset provides the same meshing engines as RealFlow with exactly the same functionality.
This means that you can load particles from SPH or Hybrido simulations to create
meshes directly within your 3D software. The advantage is that you will save lots of
resources, because the mesh files will not be saved a mesh only exists as long as
it takes to render it. The RealFlow RenderKit provides the following tools:
Both, connectivity plugins and the RealFlow RenderKit are completely free of charge, and can be downloaded together with your copy of
RealFlow from our Customer Gateway:
https://portal.nextlimit.com
We also support your work with comprehensive manuals for the connectivity plugins and the RealFlows RenderKit:
http://support.nextlimit.com/display/rfrk/RealFlow+RenderKit+and+Plugins+Home
RFRK Particler imports and renders particles from any fluid source.
RFRK Particle Mesh imports particles from particle-based simulation and
creates meshes. It also possible to load RealWave surface with this tool.
RFRK Hybrido Mesh imports particles from Hybrido simulations and creates
meshes.
RFRK Cloud imports particles from any fluid source and renders them as
volumetrics.
RFRK Displacement imports displacement maps and projects them on any
geometry.
Page 20
Maxwell Render
RealFlow offers an implementation of Next Limit Technologies Maxwell Render
a physically-based render engine. With this state-of-the-art tool it is not only
possible to create quick previews, but also complete renders in studio quality
directly inside RealFlow. The workflow is the same as with any other renderer: you
create your scene, apply materials, adjust lighting and camera view, and start the
image creation process. For shading purposes, every physical scene nodes has its
own Maxwell Render panel for applying one of the predefined materials. Other
Maxwell materials can be downloaded freely from the Maxwell Render material
repository under
http://resources.maxwellrender.com
Preview from the current frame are triggered with the FIRE button (first icon)
from the Display shelf.
All viewport transformations (zooming, rotating, panning) are considered and rendered in realtime. Frame, topology, and material changes are recognized automatically, and the render process is reinitialized. Lighting (physical sky model, sky dome,
image-based lighting), image quality, motion blur, and channel output are adjusted
in the Maxwell Scene Preferences (second icon above) from the Display shelf.
All settings made here are also applied to the render in realtime with a click on
Apply. Once you are happy with lights, materials, and camera, the final render
can be started with the Display shelfs Maxwell Preview button.
Fake Graphics
Page 21
First of all you must enter a Project name. By clicking on the CREATE A NEW PROJECT button, RealFlow generates a set of different folders, where the simulation files will
be stored later. All these folders are grouped under the projects main directory, carrying the name you have entered before. If you did not specify an alternative path, everything
is stored under the programs default location, which is printed one line below. Full path displays the entire path to your scene including the previously entered project name.
A scene can be opened with the appropriate button on the upper right or via the Recent projects list. To open a file from this list, simply double-click on the desired project.
As long as the "Project Management window is visible, it is not possible to access the underlying windows or panels. You first have to either close the window or define/open
a project. Now enter a name of your choice, e.g. Vase Filling, and click on CREATE A NEW PROJECT, or directly define a new path to a custom directory and then create
the project.
Page 22
You can start to add emitters, objects and forces immediately and start your first simulation. We want to go through these very first steps with you. In this basic scene a vaseshaped object should be filled with fluid particles. The first object will be the vase: in the upper part of the programs interface you can see tabs with different icons. A click
on these symbols either triggers an action or creates a simulation element, also called node. To add the desired node, please look for this icon in the "Geometry shelf and
click on it:
After you have chosen the Vase object you will recognize that it has been added to the viewport, but also to the Nodes window and the Relationship Editor. Position and
scale of the newly created objects are fine and we do not have to change anything. The second node is a particle emitter and this will be the fluid source. A list with RealFlows
emitters can be found in the "Liquid - Particles shelf. Please choose the "Circle emitter:
The emitters viewport symbol shows an arrow pointing downwards this arrow indicates the direction of emission. To make everything a little more interesting, the emitter
will be moved upwards and rotated. Change the view to Front with the 2 key. The emitter can easily be repositioned with the Move tool that is activated with the W
key. Now you can see three axis for each spatial direction. Click on the axis, pointing upwards, and move the node roughly 1 grid unit. A rotation is performed with the R key.
Once this tool is active, the emitter shows three circles. Again, each circle represents one direction in 3D space: X, Y and Z. Click on the red circle (= X) and drag the mouse
until the emitter has a rotation of approximately 45 degrees. In the upper left corner of the viewport you can see the current rotation. With the T key it is possible to scale the
emitter. Click on the small yellow cube in the middle of the axis and drag the mouse until the "Sx, "Sy and "Sz parameters in the upper left viewport caption show a value
around 0.4. Finally, go to:
Circle01 > Node Params > Particles > Resolution > 25.0
The last node is a Gravity daemon. This node can be found in the "Daemons shelf:
Page 23
Gravity adds a force to the scene that acts globally. This means that it is not restricted to a certain area or volume. The force acts everywhere in the scene with exactly the
same strength and you can place the emitter at any point in the scene without changing its properties. Now you already have everything for your first simulation. Click on
Simulate and watch the particles, how they become accelerated and fall into the vase. There, they form drops and splashes and fill the object. After 200 frames, the simulations automatically stops and you can scrub the timeline back and forth to evaluate the result. Here is a screenshot from RealFlows viewport with all scene elements:
To get an impression of the simulation in realtime, it is a good idea to create a preview. Go to the "Main Menu and choose:
Playback > Video Preview
Now, RealFlow will go through the cached simulation data and take a screenshot from each frame. Once all frames have been captured, a preview movie will be assembled
and sent to the Movie Player. There you can enjoy your first simulation!
If you want to have a look at the projects directory and the stored simulation data, choose the following entry from the "Main Menu:
File (OS X: RealFlow) > Open Project Folder...
This command opens an external window from the operating system to check whether all files have been created.
Page 24
Page 25
1 Cube object
1 Square emitter
1 Container emitter
1 Gravity daemon
1 k Volume daemon
1 Surface Tension daemon
1 Filter daemon
The Setup
Please follow these steps:
Add a cube object and rescale (W key) until you get a long basin. This node
(Cube01) will hold the fluid.
Add a Square emitter and place it near one end of the cube.
A Container node will be used to store the foam particles.
Place a k Volume to delete (eventually) escaping particles.
The Gravity daemon introduces a force.
With Surface Tension daemon the fluid looks more liquid, because it amplifies
the particles tendency to form drops.
Create a Filter daemon.
Page 26
Page 27
When a particle collides with the cube object it is transferred from Square01 to
Container01, and removed from the source emitter simultaneously. With the Split
option, the filter creates 3 additional particles per filtered foam particles. This way it is
possible to increase the amount of foam and get a denser look.
Adjusting the Surface Tension Daemon
This daemon acts globally on all of the scenes emitters. This means that it will affect
both the Square01 emitter and the particles in the Container01 node. To get nicely
shaped drops and strings, use the following settings:
Surface_Tension01 > Node_Params > Surface Tension > Strength > 100
Balanced > Yes
The Simulation
Click on Simulate to see the results. Play with the Volume settings of the Square
emitter to get splashes of varying strength. You can also also add a second Filter
daemon and filter against the particles Pressure value to introduce a second criteria
for the creation of foam.
Page 28
Page 29
The Setup
Please follow these steps:
Start with the Sphere and Cylinder nodes, and arrange them randomly.
Change the cylinders length to a value around 4.
The Cube node serves as a ground object.
Add a Linear emitter and rotate it by 90 degrees so that its emission direction is
parallel to the X axis.
Linear01 > Linear > Height > 10.0 (or greater)
Linear01 > Linear > Length > 2.5
Page 30
Page 31
The change to fixed substeps will increase the simulations stability drastically. Furthermore it is now possible to use higher emitter Resolution settings (= more particles).
It will also help to keep simulation times moderate, but you should be aware that RealFlow has to perform very complex calculations and they simply take time. The more
particles, the more likely it is that you will see instabilities.
The Simulation
Now start the simulation. If you can still see highly accelerated particles increase the number of fixed substeps and/or decrease the emitters Resolution. It also happens from
time to time that the particles tear apart and form small holes when they interact with objects. These holes are often only visible when you create a mesh. In this case, a good
option is to make the tissue more rigid with the Spring parameter. By the way, the collision objects properties (e.g. friction) can be adjusted with:
Object selection > Node Params > Particle Fluid Interaction
Please bear in mind that RealFlows elastic particles do not consider self-collisions like dedicated cloth simulation tools.
Page 32
Start the simulation without the influence of the k Speed and Drag Force daemons.
Fill the object until the desired water level has been reached and let the simulation run for a few more frames.
Set the emitters Speed parameter to 0.
Create an initial state and activate Reset To Initial State; reset the scene.
Add a k Speed daemon.
Page 33
Node Params > k Speed > Limit & Keep > Yes
Max speed > 1.0
Max speed > right-click > Add key
Shift the timeline slider to frame 200 (the fluid disappears).
Max speed > 0.01
Max speed > right-click > Add key
Reset (the fluid reappears).
Add a Drag Force daemon.
Under Drag Force > Drag Strength create two keys with values of 0 (f = 0) and 75 (f = 200).
Simulate. At frame 200 the fluid should be calm and relaxed.
Create a new initial state for your final simulation as described above.
Reset.
Make an initial state with Node Params > Initial State > Make Initial State.
Set Use Initial State to Yes.
Activate the Reset To InitialState option with a click on the triangle next to the Reset button.
Optional: backup your previous data or apply a new export name for the emitter.
Reset the scene to load the initial state at frame 0 (or any other specified frame).
Simulate, using the initial state.
This procedure will help you get an even fluid surface you can use as a starting point for a new simulation. Depending on the number of particles, this process can take a
while. We therefore recommend disabling the viewport during simulation (Alt + D) or using the Command Line version:
Click on the small triangle next to Simulate > Command line
Page 34
Shattered Glass
Page 35
Shattered Glass
One of the most famous RealFlow scenes is a shattering glass after being hit by a bullet. The idea behind this setup is very interesting, because it is a combination of fluids,
rigid bodies, and slow motion effects. In this tutorial you will learn how to recreate this simulation with RealFlows built-in tools. Please note that this simulation is split into
two parts: in the first simulation a resting and calm fluid is created. Then, the interaction between the fluid and the smashing glass is done in a separate action.
Here is the nodes list for the first part the relaxed fluid:
1 glass object
1 Gravity daemon
1 k Volume daemon
1 k Speed daemon
1 Drag Force daemon
A very important thing to check is the glass objects Liquid - Particle Interaction panel:
Change Collision distance to 0.01. This will bring the fluid particles closer to the objects surface.
Page 36
Click on the small lock icon to left of the timeline. With this action, RealFlow neither counts frames
(no matter how long you simulate, the timeline slider will remain at 0), nor writes out any files.
This mode is perfectly suited to fill the glass.
Simulate.
If you think that the glass is properly filled (between one half and two thirds) stop the emission of particles:
Click on the small triangle next to the Reset button and enable Reset To Initial
State.
Reset
For the relaxation process, two more nodes are required:
Add a k Speed daemon.
Node Params > k Speed > Limit & Keep > Yes
Max speed > 1.0
Page 37
Page 38
The last two parameters are used to control the transition from the impact zone to the outer areas of the glass. Both settings avoid that the glass will be broken into lots of
very small, almost uniform, pieces. If you are not satisfied just delete the newly created object, and repeat the fracturing process with other values.
The Rigid Body Parameters
In this step, the dynamics properties will be activated and adjusted. Lets start with the fractured glass node:
Node > Dynamics > Active rigid body
Rigid body > @ object friction > 0.5
Rigid body > @ elasticity > 0.5
Then the ground object (Cube01):
Node > Dynamics > Passive rigid body
Finally, the bullet (Sphere01). This node will be animated, but has rigid body features as well:
Node > Position > X (the first value from the trio)
Create a key-framed animation from right to left (or left to right) using the method from Relaxing the Fluid. The bullet should be fast to get a vivid splash: 20 m in 70-80
frames is a good value.
Node > Dynamics > Passive rigid body
The combination of animation and rigid body properties is interesting, because the
bullets motion path and speed can be controlled manually, but it is still able to
interact with other rigid bodies. In this state, the bullet has infinite force.
Joining the Pieces
Currently, the fractured glass will fall apart and the fluid will pour out, because the
pieces are not connected. There has to be a way to reconnect them, but these joints
have to break when the bullet hits the glass. The solution is MultiJoints all panels are
located under the MultiJoint01 elements Node Params:
Page 39
The Forces panel contains a @ Max force parameter and adjusting this value is
the most difficult part. The joints have to be strong enough to resist the glass bodys
own weight and the weight of the fluid. Start with a rather high value, e.g. 250,000 and
trigger the simulation. Let it run for around 5-10 frames:
If you can see orange or red joints then the forces are not strong enough and the
links break. In this case you have to increase @ Max force.
Go to Statistics > @ Max force used since creation. This read-only field gives
you a hint of the occurring forces, and can be used as a starting value.
Do not use the displayed value 1:1, but add a 10-20% buffer and transfer the value
to @ Max force.
Reset and simulate again. If all joints are green and intact you can go on simulating. Otherwise you have to further increase @ Max force.
For the rendered image at the beginning of this tutorial, @ Max force has been
set to 150,000 with a @ Max force random value of 100.
The Simulation and Previews
It is very likely that you will have to create different versions until you get the desired
result and these versions have to be compared. The easiest way to do this is to use
RealFlows preview engine:
Adjust the point of view by rotating, zooming and panning the viewport.
You can add a camera, but this step is not mandatory.
Go to frame 0, and click on Playback > OpenGL.
RealFlow goes through the simulation and records the viewport frame by frame.
If the timeline slider stays at frame 0 please check if the maximum preview frame is not 0.
Once the frames have been recorded, a Movie Player window is opened automatically. After a few seconds you can watch the simulation in real-time.
Click on the players Save icon, and write the movie to disk.
Page 40
Particle-Based Meshing
Page 41
Particle-Based Meshing
If you went through the fluid tutorials you might have been missing one thing: mesh creation. In this workshop you will learn how to mesh the results from the Foam with
SPH Fluids lesson.
Here is the nodes list:
Page 42
Settings
A very good and reliable way to start with RealFlows Particle mesh is to use very similar settings for Polygon size and Radius:
Mesh > Polygon size > 0.02
Field > Radius > 0.03
Now, make one more adjustment to get a better representation of the particle cloud
Mesh > Weight normalization > Yes
Click on the Build Mesh button from the "Mesh" shelf to create the mesh for the
current frame. As you can see, the result is already very good. If you need a higher level
of detail just decrease Polygon size. The meshs borders are a little too round, and
this is something that can be fixed with the entries from "Filters:
Steps tells the engine how often the relaxation filter will be applied. With higher
settings the borders become sharper. With settings greater than 100 you can often observe the look of liquid metal which completely destroys the impression of a watery or
milky fluid. Always start with moderate values between 8 and 32. In this case, "Steps"
should not be too high, because otherwise the mesh will shrink, and you might lose
the connection between the mesh and the foam particles. This results in visible gaps in
the final render (see Foam with SPH Particles for more information about the simulations foam pass).
Channels
Channels are essential for realistic rendering and they help you to visualize changes in speed, age, or density to name but a few. With a velocity channel, for example, it is
possible to create the whitening effect of a rapidly moving fluid. RealFlows Particle mesh engine provides a wide variety of attributes to save with the mesh:
Open Particle Channels.
Enable/disable the appropriate channels with Yes and No.
Page 43
For the second step, the channels have to be exported with the mesh files:
Export > Export Central
Open the PARTICLE MESHES branch. There you will find several file formats to
choose from.
BIN is the standard format and supports only a few basic channels.
ABC (Alembic) can store the entire range of channels.
MD provides the most sophisticated method, because here you can also decide
which channels you want to include. Of course the channels have to be activated
under Particle Channels before otherwise they remain empty.
Enable Mesh sequence (.md) and leave Mesh cache (.bin) activated, because
it is required by RealFlow.
Uncheck the unused channels, but leave normal and texture active!
Click on Done
Build Mesh Sequence
Now, the mesh sequence can be created:
Select the ParticleMesh01 node.
Shelves > Mesh > Build Mesh Sequence
This action can be stopped with the Esc key, but it might take a short while until the process is interrupted, because the current mesh will be finished first. All files will be
written to the projects mesh folder.
Page 44
Falling Pencils
Page 45
Falling Pencils
In real life, even identical objects have slight variations in mass, friction, elasticity etc. These differences are often essential for a realistic simulation. But, changing the physical attributes for dozens or hundreds of objects manually is an unrewarding task. This tutorial shows you how to do this with a basic script from the RealFlow manuals
"Python - An Introduction section.
Here is the nodes list:
40 50 identical objects, e.g. pencils
1 Cube object
1 Gravity daemon
All scene elements can be added from RealFlows Edit menu:
The Setup
The pencils positions and rotations have been prepared in a 3D program, and then
exported using the connectivity plugins SD Exporter tool. This helper converts
the objects, so they can be used with RealFlow. Instead of RealFlows native SD format, the objects can also be stored as an Alembic file. Alembic (ABC) is a common,
platform-independent format and supported by all major 3D applications. Please mind
the scale when you work with Alembic files; the exporter plugin will do this conversion
automatically.
Page 46
If you are not happy with the pencils please go back to your 3D program (do not close RealFlow):
Adjust the objects positions, and export everything again. Just overwrite the existing file.
In RealFlow, press Ctrl/Cmd + U to update the SD file.
Preparing the Script
This is the tutorials most important part and you will learn how to use and extend an existing Python script. The idea is to enable the pencils Active rigid body feature,
because they are meant to move and fall onto the Cube01 ground object. When an objects RBD attribute is active RealFlow will calculate a mass value. Since all nodes are
identical here, they will share exactly the same mass value. @ object friction and @ elasticity are both set to 0.3 by default.
Currently you will not be able to locate these values, because the pencils Active rigid body mode is not enabled.
The task is to randomize these values automatically with the help of a so-called batch script. This script type is perfectly suited to complete repetitive tasks:
Please open the following page from RealFlows online documentation: Random Mass Change
Copy the script at the end of the page (So the entire script looks like this...).
If you are interested in the scripts details and how it works please read the page.
Go to RealFlow and open a Batch Script editor from the Layout menu.
Paste the clipboard to the editor.
From the editors menu choose Script > Syntax check. The script should not contain any errors.
Do not run the script, because by now only the pencils mass value will be changed, but we also want to randomize object friction, elasticity, and this is new the bodies
initial velocity. The latter step avoids the pencils moving at the exact same speed. Mass is already processed by the default script, but the remaining parameters are treated
similarly. For every parameter a random value is required. Lets say:
@ object friction should range between 0.15 and 0.25
@ elasticity should be between 0.9 and 1.0
@ Velocity should be between -2.0 and -1.0 to make them fall
The corresponding commands are:
randomFriction
= random.uniform(0.15, 0.25)
randomElasticity = random.uniform(0.9, 1.0)
randomVelocity
= random.uniform(-2.0, -1.0)
The result from this operation is simply used to specify the nodes properties. The appropriate command is just: node.setParameter(parameter name, parameter value). The
final notation is:
node.setParameter("@ object friction", randomFriction)
node.setParameter("@ elasticity", randomElasticity)
Page 47
When you take a look at @ Velocity you will see that it contains three values it is
a so-called vector. The pencils should fall, and therefore only the vertical component is
required. Since most 3D programs work with different axis systems you have to know
which axes serves as the height (= vertical) axes. Then it is possible to assemble the
complete vector. Of course, only one of the commands is required:
Y setup: newVelocity = Vector.new(0.0, randomVelocity, 0.0)
Z setup: newVelocity = Vector.new(0.0, 0.0, randomVelocity)
Now, the new value can be set following the same principle as before:
node.setParameter("@ Velocity", newVelocity)
Add the new lines to the existing script. Please mind the indents and use the Tab key to
create them, because otherwise you will get syntax errors! Your final program should
look like on the following page.
Running the Script and the Simulation
With just a few lines of code and an existing script we have automatized the complete task of randomizing dozens of objects. Imagine how long it would have taken to do this
manually. If you want to change other parameters, e.g. @ air friction, you just have to follow the instructions before.
Select all pencil objects and only the pencils from the Nodes panel.
Go to the Batch Script editors menu and choose Script > Run
Wait until you can see a note in the Messages window similar to this:
Process finished...
Elapsed time: 7.544235 seconds
Maybe your pencils are moving too far, leaving the ground object. In this case you have two simple options:
Cube01 > Node > Scale > increase the horizontal values (= make it bigger)
Cube01 > Rigid Body > @ object friction > 0.7
Page 48
= clock()
= 10
= scene.getSelectedNodes()
mass", newMass)
object friction", randomFriction)
elasticity", randomElasticity)
Velocity", newVelocity)
endTime = clock()
diffTime = endTime - startTime
scene.message("\nProcess finished...\nElapsed time: "+str(diffTime)+" seconds")
Page 49
Floating Objects
Page 50
Floating Objects
Some object shapes seem to be unusable with RealWave, in particular long objects which should float upwardly between the waves of a RealWave surface. For a few moments
they seem to behave correctly, show some up and down motion, but then they turn over. The reason for this behaviour is the objects' centre of gravity. RealFlow provides are
very easy method to shift this point and make it visible.
This tutorial does not only work with RealWave surfaces, but in every situation where you have to prevent floating objects from turning over.
Here is the node list for this tutorial:
1 RealWave object
3 Cube nodes
1 Gravity daemon
All scene elements can be added from RealFlow's Edit menu:
The Setup
Add a RealWave surface (please bear in mind that there cannot be more than one
RealWave node in a scene).
Rescale the surface to your needs with the R key or the parameters under Node
Params > Scale. The surface should be a squared mesh.
Right-click on the RealWave01 node and choose Add Wave > Fractal
Add a Gerstner modifier
Create three cubes and change their vertical scale to values of 2.0, 2.5, and 3.0
(Node Params > Node > Scale)
Spread the cubes randomly over the RealWave mesh with the W key and shift them
downwards so they intersect the wave surface. About 2/3 of the cubes should be
above the water level.
Add a Gravity daemon.
Page 51
Select Fractal01 > Node Params > Fractal and make the following settings:
Height > 0.7
Octaves > 7.0
Slope > 1.5
Fractal speed > 0.5
Select Gerstner01 > Node Params > Gerstner and make the following settings:
Dir wave > 15
AmpWave 0.1
LengthWave > 5.0
Speed > 5.0
Page 52
@ CG values are relative to an object's size. This means that 0 represents the body's
midpoint, while the total length is considered 1. When you enter a value of -0.5 the
CoG will be the object's bottom; with 0.5 it is its top. With values greater 0.5 or smaller
-0.5 it is possible to shift the CoG outside the object. This is an easy way to control the
object's floating behaviour.
The Simulation
Click on Simulate. According to your settings the cubes will float. With a CoG close to
a node's midpoint it may happen that the body is still tipping over. Play with different
@ CG values and change all three parameters (XYZ).
Page 53
Add the first Cube node, scale it to 30 x 8 x 7.5 metres. Cube01 acts as a container to include the fluid.
If your axis setup is ZXY (see "Preferences - General") then the scale is 30 x 7.5 x 8 metres.
Add the second "Cube" node and create a ramp for the water. This prevents the fluid from being reflected at the container's right wall. Rotate the cube with the E key.
Add the thrid Cube node, scale it to 5.0 x 3.0 x 7.0 (5.0 x 7.0 x 3.5) metres. This object will serve as the Hybrido fluid emitter. Place it somewhere inside Cube01 and
apply the same rotation as for "Cube02".
The tyres and oil barrels can either be created inside your 3D program or downloaded from a 3D model resource site. The best workflow is to save the tyres with the
platform-independent Alembic format. Alternatively, the nodes can be exported in SD format using the connectivity plugins. Export these models to the RealFlow project's
objects folder.
Import the tyres and oil barrels with Ctrl/Cmd + I.
If necessary, reposition these models. Please note that you have to unlock them first with the objects' SD <-> Curve button.
Reposition Cube03 if necessary.
Add the Gravity daemon.
Page 55
Now, the domain will be created. For this step you always need two nodes:
Add a Hybrido Domain
Create more splashes with Node Params > Fluid Dynamics > Vorticity boost > 2.0
Node Params > Particle Sampling > set all "sampling control" parameters to "No".
These are the settings for the "HY_Emitter01" node:
Create a Hybrido Emitter node, and choose Cube03 from the nodes list. The fluid will be created inside this volume.
Create some initial velocity with Node Params > Emitter > Initial velocity > Constant.
Node Params > Emitter > @ speed > 2.5
Node Params > Emitter > @ speed variation > 0.5
Node Params > Emitter > Surface particle sampling > 3
Node Params > Emitter > Core particle sampling > 3
Page 56
The last two parameters are used to increase the number of particles per grid cell. This way you will get a better splash simulation. The difference to the domain's sampling
settings is that the values here will be applied once and remain constant during the entire simulation. When you adjust sampling via the doamin the number of particles will
be varying.
Adjusting the Scene's Environment and Objects
This step includes various settings to make everything work correctly. The first actions affect the Cube01 node:
Node Params > Volume > Mode > Solid inside creates a hollow cube to enclose the fluid
Node Params > Dynamics > Passive rigid body
Node Params > Rigid body > Collision side > Inside
The imported nodes (tyres and oil barrels) are adjusted as follows:
Node Params > Node > Dynamics > Active rigid body
Node Params > Rigid body > @ mass > enter different values for each node
Don't make the objects too heavy. Values around 100 for the barrels, and 15 for the tyres should work.
Hybrido works with cells, and every cell has a certain size which determines the simulation's level of detail (LOD). All scene elements are rasterized in RealFlow internally
including the objects. This means that the objects provide a Cell size value as well. By default, this value is 0.3.To change it for the entire scene, go to the Scale options
button:
Cell size scale > 0.3334
All Cell size values in the scene are multiplied
with this factor: 0.3 * 0.3334 = 0.1
Export Resources
A very important part is to adjust the imported objects'
export resources. Open Export Central with F12.
There you will see a branch, called OBJECTS. Spot
the imported nodes and check the following resources
for these nodes:
Please take a look at the image on the next page.
This action is important, because it will help us to reload the motion data in the splash simulation. ANIMATION (.sd) and CACHE (.bdc) can be disabled.
Page 57
During the simulation leave the RealFlow GUI open, because there you can monitor the
simulation's progress by pressing Alt + U. This shortcut will load the already simulated
files, and you can scrub the timeline to see the result.
The Setup - Splash
When the Hybrido simulation is finished the splash elements will be added:
Add a Splash node.
In the viewport a green box appears indicating the splash domain's dimensions.
Scale (R) and reposition (W) the "HY_Splash01" domain. It should not cover the
right part where the Hybrido fluid is released from the emitter.
Create a k Volume daemon.
Click on k_Volume01 > Node Params > k Volume > Fit to object
Select Cube01 from the nodes list to adapt the daemon to the fluid container.
In the next step, select the HyDomain01 node:
Node Params > Node > Simulation > Cache
With this option, the already simulated Hybrido fluid is loaded to the scene, but not
re-simulated. This helps to save lots of time.
The imported tyres and barrels have to be set to Cache as well. Please do not forget
this!
Adjusting the Splash Emitter
The number of splash particles depends on various parameters. They are located in the
Splash Creation panel under Node Params. You have to play with these settings to
get a satisfying amount of particles and the desired behaviour.
Page 58
On the right you can see the settings. Please bear in mind that it is very unlikely that
you will be able to use exactly the same setting they are just meant to give an idea.
Another, very important, decision is the choice of particle type. Dumb particles are
simulated very fast, but may lack realism. Liquid - Particles creates realistic results,
but takes its time. A good alternative is Liquid Hybrido:
HySplash01 > Node Params > Particles > Type > Liquid Hybrido
The Splash Simulation
Now, that all nodes and elements are adjusted, the scene can be simulated again.
The Hybrido fluid is simply loaded (it is set to Cache), and only the splash particles
will be created from the pre-simulated core fluid:
Reset
Simulate
Page 59
Page 60
Page 61
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.
Page 62
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.
Page 63
MultiJoint Crane
In this scene, a MultiJoint is used to lift some cargo similar to a crane.
Here is the nodes list:
Page 65