Basic Concepts

RealFlow can simulate highly complex interactions between various objects to mimic natural phenomena, such as fluids, collisions or deformations. Though there is an enormous amount of physics and maths behind these simulations, the user actually does not have to be proficient in natural sciences. Everything is done by the software and the included tools. Nevertheless it is definitely useful to have a basic understanding of natural processes and some fundamental physics. This understanding will help you to get a feeling for motions, scales and the plausibility of your simulations. Another reason is RealFlow’s mode of operation, because many parameters have a physics background, for example density, mass or friction.

One of the main ideas behind RealFlow is the possibility to simulate interactions between the different elements. Users can freely combine particle fluids with objects, objects with RealWave surfaces and splashes, let forces act on Hybrido fluids and influence almost any node or parameter with Python scripting or C++ programming. For this purpose, RealFlow provides comprehensive SDKs and APIs to these popular programming languages.

Connectivity

You have to bear in mind that RealFlow is not a plugin, but a so-called stand-alone program. This means that everything happens within a user-friendly and fully customizable user interface, independent from other software tools. It is virtually possible to run RealFlow without any other supporting software. It is even possible to create rendered images directly within RealFlow's environment. You can add fluids, waves, or objects and simulate their interactions. RealFlow is especially tailored for fluid and object dynamics, and therefore lacks functions you know from other 3D programs, like modeling and complex animation tools, as well as texturing, or UV manipulation features. All these tasks are done outside RealFlow. To establish a connection between both worlds, Next Limit offers free plugins for the following packages:

  • Autodesk’s 3D Studio Max

  • Autodesk’s Maya

  • Autodesk’s Softimage

  • Maxon’s Cinema 4D

  • Newtek’s Lightwave

  • Side Effect’s Houdini

These plugins have to be downloaded and installed separately into the appropriate folder of your 3D software. Once installed, they are used to process the simulation data, meshes and fluid particles for final texturing and rendering. This workflow guarantees best compatibility, since the results can be rendered directly within your favourite application. Another advantage is seamless integration into VFX pipelines.

The whole process can be subdivided into two stages. The first one concerns the simulation process. During this step the entire project is prepared and calculated. The second stage is to establish a connection between RealFlow and your favourite 3D application. For this purpose RealFlow provides

  • various file formats for data and image transfer

  • a set of plugins to import and export simulation and geometry data


The Foundry's Modo (version 601 and higher) software has integrated support for RealFlow particle data in its BIN file importer. The Alembic (.abc) format can also be used to interchange geometry caches.

RealFlow RenderKit

The RealFlow RenderKit, RFRK, can be seen as a bridge between RealFlow, a 3D software and the final image. It provides powerful tools to render millions of particles, create meshes from particle sequences directly at render time, add displacement to wave surfaces and a volumetric shader for cloudy structures like mist or splashes. With the RFRK the users is able to manage the entire shading and render process of fluids within a suite of just four tools. Sophisticated and unique features provide fantastic possibilities to manipulate particle, mesh and volumetric data. The RealFlow RenderKit is available for all major platforms. For some 3D programs, e.g. 3DStudio Max and Cinema 4D, the RFRK can be used with any render engine, because the tools are standalone applications, providing full integration with the hosting software. A slightly modified version of the RFRK is also part of Next Limit Technologies' Maxwell Render package.

Graph Editors

A visual workflow is provided with the “Relationship Editor”, the “Batch Graphs” and “Simulation Flow” editors. These node-based systems give you full control over all elements within a project and the used connections. The “Batch Graph” and “Simulation Flow” editors help programming novices to get started with custom tailored solutions to influence simulations - without writing a single line of code. Everything is clearly arranged on a canvas with graphical elements. Interactions no longer have to be established with scripts, but can be achieved by simply dragging connections between the relevant parameters. The “old-style” programming interfaces are still available.

Dynamics and Animation

These both methods are fundamentally different, though they share a common characteristic: motion. Animation is a manual (or semi-automatized) process of recording certain properties at particular points in time. This is method is also known as keyframing. At each point a new key is set, containing the new values. The differences between the current and the previous key are interpolated by the software, resulting in a motion. RealFlow can handle both imported animation keys from 3D applications and RealFlow’s tools. On the other hand, dynamics does not need manually set keys. The user simply defines starting values for various parameters (for example velocity, position, mass etc.) and adds forces. The simulation software then calculates the entire motion of the objects, based on real physics. With dynamics it is possible to simulate interactions between different objects in a physically correct way. With manually set keys this would be a really tricky task requiring an enormous amount of experience.

Of course, the dynamics simulation is recorded, too, to enable playback or export the data to a 3D software, but actually this is not absolutely necessary. With identical starting values we could repeat the calculation again and again, and the result would always be the same – at least theoretically. Another idea is to write an animation key for each change in position and rotation. This method is called baking and can be performed either with Python scripting or inside some 3D applications.

A third type of motion recording is the usage of expressions. An expression is a formula that tells an object how to move or – more generally – behave. With expressions, animation keys are not needed and it is not necessary to introduce forces. Expressions can also serve as a starting condition and the object’s motion becomes influenced by forces on its way. Expressions are a very convenient way to create repetitive motions, for example, without the need of Python scripts. Another advantage with expressions is the fact that they are multi-threaded, while Python can only use one processor of a computer. Expressions also support conditions to give user the possibility to trigger certain events. All these properties make expressions are very versatile and powerful instrument.

Forces

A force causes an object to change its velocity. This brief definition already contains everything you need to know. Whenever there is a force acting, then the particle (which is here considered as a very small object) or object becomes accelerated and changes its previous position. There is only one binding condition: the object must have mass, because a massless object is not affected by forces. In RealFlow an external force can be introduced by adding one or more daemons to a scene. Very popular forces are gravity, wind, drag and vortex. A big plus is that all these forces can either act globally on the entire scene, or locally on selected objects within a defined volume. Forces can affect particles as well as Hybrido fluids and objects. In RealFlow it is possible to add as many daemons as required and combine them without limits.

Hybrido Fluids

In contrast to RealFlow's particle fluids, Hybrido fluids are mainly suited for mid- and large-scale simulations. The particle fluid concept is perfectly suited for smaller scenes, where a certain amount of details is needed, but with large-scale simulations it quickly reaches its limits. To overcome this restriction, RealFlow can make use of grids with customizable resolution. The idea is to create just the “core” of the fluid at a lower level of detail, making it possible to rapidly solve the fluid equations. Whenever a higher amount of detail is required, RealFlow can detect these areas and add standard splash particles to refine the simulation. Splash particles are again generated within certain areas, defined by the user.

This sophisticated hybrid technology makes it possible to adjust the quality and level of detail exactly to your specific needs at maximum simulation speed. Another advantage is RealFlow’s ability to generate secondary particles, for example splashes, from cached simulation data – even over a network. With this workflow it is much easier to create large-scale simulations, because you can keep the core fluid particles and develop several versions with splashes and mist, or write out everything in several passes for better pipeline integration and post-processing.

GPU-based Simulations

Over the last years the development of ultra-fast graphic processors lead to completely new possibilities for physical simulations. RealFlow's Hybrido 2 fluid solver also supports simulations on GPUs. Nevertheless, not every computer can profit from GPU-based simulations, because the system's performance strongly depends on the used hardware and the available amount of RAM. At the current stage, many graphic cards with OpenCL 1.1 support can be used with RealFlow.

Particle Systems

Particles are generated by emitters and their total amount represents the fluid. Each particle can be seen as a point in 3D space with certain properties, like velocity, position or mass. Though it is possible to address each particle individually (e.g. with scripting), it cannot be discussed as a single object. However, a particle has a physical dimension and is capable of influencing other objects. The final shape of the fluid is a result of the total amount of particles and forces acting

  • between the particles and

  • on particles from the outside.

Particle-based simulations are mainly suited for small- or mid-scale projects where a high level of detail is required. In contrast to Hybrido fluids, particle simulations do not support the automatic creation of secondary elements, for example foam.

Meshes

RealFlow provides several mesh engines to translate particle clouds and Hybrido fluid surfaces into polygonal hulls. These meshes are then used to represent the main body of fluid and apply shaders or textures for the final render process. There are currently three meshing engines with different possibilities and feature sets. The RenderKit engine can also be found in RealFlow's RenderKit – a suite of tools for processing and rendering fluid data in 3D applications.

Simulation Data Export

During a simulation RealFlow generates a very large amount of data, for example positions, rotations, velocities, temperatures or pressure. With Hybrido fluids, field data are created to represent the fluids surface. Additionally, RealFlow provides export for meshes, RealWave surfaces, soft body deformation as well as platform- oder property-specific information, for example for Thinkbox Software's Krakatoa. Volumetric and density-based data are also stored and it is possible to export various textures and displacement maps. Previews can be stored as well. A novelty is support for the Alembic and OpenVDB file formats.

RealFlow's export capabilities can be seen as one of the core concepts, because it provides all necessary data for realistic shading and rendering.

RealFlow Nodes

In order to calculate simulations, RealFlow needs objects – so each item that is inside a scene could be considered as a node. But this kind of definition is not enough, because the objects have different functions. Some are used to create particles, others add forces or waves. It makes sense to group the RealFlow objects according to their functionality – for example emitters, daemons or RealWave surfaces. These groups also include “traditional” objects, like spheres or vases. Traditional objects are different from RealFlow’s other object groups, because they consist of polygons and vertices, representing the shape you finally see. Emitters or daemons also have a graphical representation, but that is only for visualizing their location and dimension, because an emitter cannot collide with a daemon, for instance. The emitter node itself is not able to interact with a cube either, but the particles, spilled out from this emitter, can do so.

Real or traditional objects also have the ability to act as simple collision objects for fluids, as rigid bodies with physical characteristics, or as ductile soft bodies. It does not matter if they are native RealFlow objects or imported. No objects have this ability. These are the node classes you can use: domains, emitters, daemons, polygon objects, meshes, wave meshes and cameras. All these types and their functionalities are explained later.

All RealFlow nodes can be accessed from different “sources”, e.g. from the “Nodes Editor”, the viewport or the “Nodes” window. They can be grouped or exclusively linked to restrict the interaction to selected nodes.

RealFlow Command Line Version

RealFlow can be run in two different modes: GUI and NOGUI. GUI stands for “Graphical User Interface”. The command line version is not a separate program, it is just a different way to simulate with RealFlow. Without the GUI you can speed up many processes, because RealFlow does not spend CPU power for updating the viewports. With this mode of operation, RealFlow’s simulation speed can be increased up to 30%. To make use of this version, the first simulation stage has to be subdivided into two separate parts again. The first part is the assembly of the scene and the adjustment of all parameters, including the export and file format options. This has to be done within the standard GUI version. In the second part the previously created project file is simulated with the command line version. Finally, these data are imported into your 3D program again to become textured, shaded and rendered.

The NOGUI version can either be launched from a terminal application with a command line string including the path to the scene and optional flags or directly from RealFlow. Next to the “Simulation” button, a command is provided to trigger the simulation via the command line application automatically. It is also possible to create previews with the integrated Maxwell Render engine via the command line version.

Scene Scale

Scene scale is one of RealFlow’s fundamental concepts. Beginners often struggle with the proper handling of different scene scales. Scale can be described individually for basic geometry and overall scale, as well as for force daemons acting on particle fluids, Hybrido fluids and objects. Scene scale is also represented by the supporting world grid in RealFlow’s 3D viewport. One grid square is exactly 1 m x 1 m with a standard scene scale of 1.0. Scale strongly influences the credibility of a simulation and also simulation time. Your global scales can be adjusted under "Preferences":

Menu Bar > File > Preferences > General

There you can find the individual settings for geometry and force scales. These values should be specified only once and then remain untouched. They are valid for each and every scene you are going to create and that is why they are called global values. Actually you just have to adopt “Geometry scale” to your favourite 3D application. “Daemon force” related scales should also be left at 1.0. Please keep in mind that “Daemon force” scales work independently from “Geometry scale”. If you have to use a “Geometry scale” of 0.01, force scales should still be 1.0, because it is not necessary to compensate “Geometry scale” with higher or lower force scale settings.

It is certainly sometimes unavoidable to change scene scale on a local level for a particular scene. For this purpose there is a button giving you the possibility to change scale whenever necessary. These local settings override the global preferences and will be saved with your scene. So you do not have to repeat your adjustments each time you are opening the project.

Geometry Scale

Geometry scale” is of special importance, because it influences your simulation in many ways. One reason for using different scales are the various software packages supported by RealFlow. Internally a 3D program works with its own particular scale and this has to be compensated for RealFlow. Some programs work at very large scales and there, scale is one hundred times larger than RealFlow's. As a result, objects appear very large inside RealFlow and the ratio is 100 : 1. To compensate this, RealFlow offers a “Geometry scale” setting. In this case, scale has to be reduced to 0.01. Only with this compensation it is possible to work at reasonable scales without the need of very large particle amounts: an object being one hundred times bigger than a RealFlow object at scale 1.0 will need much more particles to become filled! If possible, you should always try to avoid scene scale changes. 

Please note that many 3D programs already provide methods and settings to work at real-world scales. It is therefore possible that the standard scale conversion (1:1, 1:10 or 1:100) does not match anymore. In such a case you have to modify the scale either directly in your 3D application (downscaling, RealFlow export plugin scale converter) or in RealFlow with the "Scale options" menu under "Preferences" for all RealFlow scenes or the "Scale, Mesh, LOD" section for the currently opened project.

Geometry scale” can be seen as a magnifying glass. You can scale up or down a scene without changing the physical dimensions of the included objects. Imagine a glass on a table that fills with water. When you are relatively far away you can only see some bigger splashes and the rising fluid level. By approaching the glass it is possible to observe more and details, small splashes, droplets and maybe some sparkling. When you get closer, the glass (and the fluid) also appears bigger but, of course, it does not change its size! It still has the same dimensions as before, but now you are closer. That is actually the idea behind RealFlow’s “Geometry scale”. By raising “Geometry scale”, RealFlow internally works with a larger object making it possible to achieve a higher level of detail. Conversely you can scale down to make a scene more realistic. This method is non-destructive, because the objects are not really affected and you can export your fluids to a 3D program without any changes or further steps.

A scale change influences your entire scene! When altering “Geometry scale”, “Collision distance” will be adapted and the objects appear bigger or smaller. On the other hand, emitters are not affected. They will remain exactly as you have created them. This means that you have to adopt emitters manually and this mainly influences resolution and the emitter’s physical dimensions. The number of particles can drastically increase or decrease, additionally the fluid will behave different. So if you have to perform “Geometry scale” changes, always be careful and start with moderate values! Scale changes also have a huge impact on simulation times and the number of particles.

Daemon Force Scales

You can adjust forces for particle fluids, Hybrido fluids and objects independently from each other. Because of the Hybrido fluid solver, it became necessary to introduce this differentiation. Hybrido fluids are normally used for mid- to large-scale simulations, while standard particle fluids are perfectly suited for small scenes, due to their high level of detail. To compensate this difference, it is now possible to apply individual force scales to the solvers.

The key with this feature is that one daemon can act completely differently on Hybrido fluids, particle fluids and objects. It is not necessary to introduce three force daemons and make them exclusive to the related nodes. By setting different scales for the various solvers you will be able to adjust everything to your needs without having to alter all the daemons individually each time. Higher force scale values create higher accelerations, lower settings have the opposite effect.

Scripting

Scripting is a really fantastic extension and once you have started with it you will never look back. Of course, it is not easy for beginners to learn the basics of a new software and a scripting language. Python scripting was introduced in RealFlow version 4, giving the users a powerful tool to influence RealFlow independently from most of its technical restrictions. Next Limit chose Python, because it is an easy-to-learn and freely distributable language.

Scripting does not only allow the user to influence particles or objects, it makes it possible to automatize certain repetitive tasks, change various parameters from thousands of items in a single pass, write out text files, bake dynamics, create customized simulation data files, or turn simulation and dynamics properties on and off, to name but a few.

 

Creating Python scripts under RealFlow is discussed separately, since it is a very important and versatile feature. You can find a basic course here.

The Third Dimension

RealFlow’s workspace is three dimensional. This means that the position of an object or particle is always described by three coordinates, named X, Y and Z. This concept is not only valid for positions, but also for rotation, scale and many other characteristics, like the pivot point. In terms of dimensions, e.g. for a cube, the coordinates are also known as length, width and height.

To specify an object’s coordinates it is important to have a reference point. This special point is called “origin” and is located at the scene centre of the scene. Following the XYZ notation, a particle with coordinates of [ 0,0,0 ] is directly located in the origin. In RealFlow the XYZ space is displayed as a system of three axis which represent a so-called coordinate system. A set of two coordinates (XY, XZ or ZY) is called a plane and is always two dimensional. It is also possible to create a coordinate system from just two axis. In this case the origin’s coordinates are [ 0,0 ].

A three dimensional domain gives the user the possibility to look at an object, or an entire scene, from all sides. This is also called perspective view and you can virtually walk around the objects. RealFlow also knows two dimensional views, like front, top or side. There, the point of view is fixed and can only be altered within two dimensions. This change of view is called panning.

The 3D space is the place where your simulation happens. It includes a grid to let the user know where the origin is. Typically, a 3D scene also includes a camera, though this is not absolutely necessary. With cameras it is easier to store and recall certain views or follow other items in the scene. For this purpose, RealFlow supports multiple cameras and you can even import previously animated (or static) cameras from various applications.

Everything that is created in RealFlow or added to the scene is also part of the 3D space and can be manipulated there. Another important feature of 3D programs is shading to improve the spatial impression. RealFlow offers different shading methods and you can also decide whether you want to illuminate the objects with one or two light sources. Together with the four standard views you have full control over your 3D elements.