An Introduction for Beginners RealFlow 2014 Maxwell Render Maxwell Render Workflows, Materials, Realtime Previews with “FIRE“, Lighting, Why RealFlow? Output Channels

Elements of the RealFlow Software Your First Project What is inside the package? Foam with SPH Fluids The RealFlow Product Range Which is the right version for me? Elastic Particles Cloth

The RealFlow Pipeline Calm Fluid Surfaces Exchanging geometry, particles, meshes, and more. Shattered Glass RealFlow‘s User Interface RealFlow UI elements, Customizing the Layout, Adjusting Axis and Scale, Adding Particle-Based Meshing Nodes

Navigating the Viewport Falling Pencils Perspectives, Panning - Rotating - Zooming, Shading Modes, Shortcuts Floating Objects Time and Animation Timeline, Creating Animation Keys, Manipulating Animation Curves Hybrido and Rigid Bodies

RealFlow Preferences Slow Motion Bunnies Configuring the Viewport, Backup Settings, Preview Settings

Simulation Settings Substeps for SPH Fluids, Hybrido Fluids, and Caronte, Simulate and Reset, Updat- ing the Timeline Cache,

Relationships Defining Interactions between RealFlow‘s Scene Elements

Exporting Simulation Data Cache Formats, Platform-independent Formats, Connectivity and Data Exchange, Export Central, Image Formats, Alternative Paths

Importing Simulation Data Connectivity Plugins, RealFlow RenderKit

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 de- mand 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 fea- ture 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, ar- tist-controllable, and realistic simulations of watery or viscous substances, huge amounts of interacting rigid bodies, deforming soft bodies, and infinite oce- an 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 RealFlow‘s 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 RealFlow‘s intuitive workflow and the endless possibilities this unique simulation tool offers.

Information | Learning Edition

The RealFlow Learning Edition is available to everyone interested in learning RealFlow – not just to students. For 99 USD you will get a permanent, non-com- mercial license. The Learning Edition can be purchased through our online store on http://www.realflow.com and downloaded directly. Connectivity plugins and the RealFlow RenderKit are, of course, also part of the package. With these tools it is possible to exchange simulation between RealFlow and your 3D application.

Faculty licenses are completely free and available to schools and training facili- ties. Please contact us for more information:

http://www.realflow.com/queries/

Mirada

Page 4 Why RealFlow? RealFlow also has the ability to cover all your simulation needs within a single RealFlow has unreached expertise in the field of fluid dynamics. In 1997, Ignacio package. As a RealFlow user you are able to simulate everything from small drops Vargas and Victor Gonzalez founded Next Limit and released the first version of Re- to huge ocean surfaces – and combine fluids with body dynamics. alFlow. Over the years, RealFlow experienced constant development, and has been equipped with state-of-the art technologies. Soon, RealFlow became the industry RealFlow is fast, very fast, and handles hundreds of millions of particles, thousands leader in terms of fluid and body dynamics simulations, and has been used in many of objects, and complex setups. The software‘s intuitive workflow, the flat learning feature film and TVC productions. In 2008, the Academy of Motion Picture Arts and curve, and its endless possibilities are unrivalled in the world of physical simula- Sciences has granted a Technical Achievement Award to Victor Gonzalez, Ignacio tions. RealFlow is available for Mac OS X, , and Windows. Vargas and Angel Tena for the creation of the RealFlow software application, reco- gnizing the significant contribution RealFlow has made to the process of making These are some of the reasons why the world‘s top studios and VFX artists trust in motion pictures. RealFlow. And they know why: tighter deadlines, shrinking resources, and higher demands call for reliable and fast tools.

Information | RealFlow in Production

Productions with RealFlow (excerpt):

Pompeii, The Impossible, Resident Evil Retribution, The Great Gatsby, Dredd, Ice Age, The Avengers, The Girl with the Dragon Tattoo, Battle of LA, Vikings, The Guardian, Despicable Me, 2012, Poseidon, and many more.

RealFlow has also been used in countless commercials and student projects, as well as in games.

RealFlow has a clearly structured, and customizable user interface, provides a com- mand line simulation engine (which can be triggered directly from the user inter- face). RealFlow‘s “Relationship Editor” gives you the freedom to describe interac- tions between a scene‘s 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, , Houdini, Lightwave, Maya, and Softimage; Modo has built-in im- port filters. Furthermore we have open-sourced many file formats. This makes it possible to write your own import tools. Trizz & Fusion C.I.S.

Page 5 Elements of the RealFlow Software

Particles Particles are RealFlow‘s universal “currency” for all fluids, but it is also possible to create, manipulate, remove, and control them through scripting (Python, C++, Graphs – RealFlow‘s node-based visual programming tool). Particles are introduced by emitters and they can store a broad range of properties, e.g. velocity, vorticity, pressure, curvature or mass. RealFlow provides free tools for rendering particles as sprites, spheres, objects of any shape, or volumetrics inside your 3D application.

Hybrido Fluids RealFlow‘s Hybrido fluid simulation technology consists of two elements: 1) HyFLIP. This system allows artists to create huge amounts of water, for examp- le floods, oceans, and breaking waves. A versatile and robust viscosity model gives you the possibility of simulating substances ranging from water to chocolate, honey, or molten glass.

2) HySPH (also known as “secondary fluids”). With this fluid type you add details like splashes, foam, bubbles, and mist to the HyFLIP simulation. This way you get a realistic and convincing image of real fluids.

SPH Fluids This fluid type is the choice when you need a high level of detail. Turbulent and vivid fluids with small drops, viscous paint splashes, substances with different densities, fruit juice, lemonade, or cream – all these different types of fluids can be handled by RealFlow and interact with each other.

Rigid and Soft Bodies Caronte is a powerful rigid and soft body dynamics engine and also part of the RealFlow package. Caronte is able to handle thousands of objects, provides fracture tools, and simulates deformable bodies with high accuracy. Tools like MultiJoints help you to simulate collapsing and breaking structures with a high degree of realism. MultiServos act like motors – they accelerate and decelerate your objects, and create physically correct motions.

RealWave RealWave is a fast and versatile tool for huge ocean surfaces. RealWave allows you to combine different, predefined wave models. RealWave also supports the interaction between objects and waves, and you can simulate effects like buoyancy, splashes, and secondary waves.

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 RealFlow‘s 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 RealFlow‘s built-in tools help you to do amazing simulations, but there are situa- tions where you have to influence particles or objects manually. Python scripting, a C++ interface, and a node-based visual “programming” system let you accom- plish simulations which require more artistic freedom.

Tools In addition to RealFlow‘s 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. • RealFlow‘s 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 RealFlow‘s “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 The RealFlow Product Range Information | Coding and Scripting

RealFlow Standard One frequently asked question is if programming is essential for RealFlow? This is our main application, equipped with a customizable graphical user interface, The answer is simply “No!” Most of your daily simulation tasks can be solved a 3D viewport, and access to all of RealFlow‘s elements. Here you prepare your without writing a single line of code. Even if you want to influence a simulati- scenes, apply tools, watch a simulation‘s progress, record previews, and do highly on you still do not require any programming experience: RealFlow‘s “Graphs” realistic renders. The “Standard” version is also available with a “Learning Edition” system is a node-based, visual system that lets you create programs by combi- or a “Demo” license. ning and assembling predefined elements.

RealFlow Command Line Of course, RealFlow has a strong technical background and therefore supports The command line version of RealFlow is included with the “Standard” license, Python, C++, and expressions. and it can be seen as a different way of launching the software. A scene that has been prepared in RealFlow‘s GUI can be sent to the command line version for accelerating the simulation process: due to the fact that RealFlow does not have to update millions of particles and hundreds of objects, simulating via command line simulation is 30% faster than a simulating via the GUI. A command line simulation Dvein is triggered with just two clicks.

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 simultane- ously 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 The RealFlow Pipeline 3D Scene Description Before we start to explain the fundamentals of RealFlow‘s user interface we want to tell you a little more about the exchange of data between RealFlow and your 3D (in RealFlow or 3D program) software, because this pipeline is essential for exploiting all advantages.

Geometry Exchange In most cases you will create objects in your 3D program, and import them to RealFlow, where they can interact with fluids, rigid and soft bodies, or RealWave surfaces. The connectivity plugins provide tools for importing and exporting geometry data. In RealFlow, objects from external sources are imported with an Simulation easy-to-use import function (Ctrl/Cmd + I). The plugins consider animation keys, vertex displacement information, and UVW data. The RealFlow RenderKit also sup- ports the import of RealWave data.

Particle Exchange The connectivity plugins are able to load RealFlow particles, and export particles from a 3D software‘s internal particle system. With the RealFlow RenderKit it is possible to import RealFlow‘s particles and render them as particles, volumetric Simulation Data Export clouds, or meshes.

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 Simulation Data Import to 3D Program RealWave data is loaded to your 3D program via the connectivity plugins, but it is (Connectivity Plugins / RFRK) 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 Shading, Lighting, Rendering for emitters, or maps for controlling properties like particle friction. Inside your 3D application, maps are treated like textures.

Page 9 RealFlow‘s User Interface Adjusting Axis and Scale

When you open your licensed copy of RealFlow for the first time you will see a Different 3D programs use different axes setups and scales. Both properties can be standard layout with several panels. adjusted under Edit (OS X: RealFlow) > Preferences > General.

• The menu bar provides access to all nodes (a node is an element of the current • “Axis setup” provides a drop-down list with all available options scene, e.g. a daemon, an object, or an emitter), tools, and commands. • “Geometry scale” is used to change scale. • The tabs below the menu bar are so-called shelves. They are a quick way to • RealFlow‘s default scale is measured in metres. add nodes and launch tools, but also to change simulation states and shading modes. Shelves are fully customizable. Adding Nodes • RealFlow‘s viewport is your work space and contains a 2D or 3D representa- tion of your scene and its nodes. Creating nodes is an easy task. Just open one of the shelves, for example “Liquid • When a node is created it appears in the “Nodes” panel and the “Relationship - Particles”, and click on an icon, e.g. “Square”. The appropriate element will be Editor”. The “Nodes” panel is a list containing all nodes. Here you can group added to the viewport, the “Nodes” panel, and the “Relationship Editor”. You can and manage the scene elements. The main purpose of the “Relationship Edi- also use RealFlow‘s position-aware right-click menus – under “Add” there is a list tor” is to specify which nodes will be interacting. with all available node types. • 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 A newly created node is always active; other nodes are selected with the “Select” element‘s properties. tool from the icon bar or any of the transformation tools introduced directly below. • The “Messages” panel contains important information about the simulation. You have two possibilities for transforming a node: • Finally, there are several icon bars with the most-used functions. 1. Numerically, with exact values: Customizing the Layout Node Params > Node > Position | Rotation | Scale 2. Visually, by dragging handles: Shelves are rearranged with simple drag and drop actions, and all changes will be Press W for position, E for rotation, R for scaling. applied to the layout automatically. 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 panel‘s 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 RealFlow‘s 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 po- sition 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 Navigating the Viewport If one of the transformation tools is active you will also get information about po- sition, rotation, and scale. The node list can be deactivated under: RealFlow‘s viewport contains a 2D or 3D representation of all scene elements. To change perspective, use the following shortcuts: 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 camera‘s 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 (“Hid- den”) 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 object‘s number of polygons and vertices, or an emitter‘s number of particles.

Page 13 Time and Animation Creating Animation Keys

Most of a node‘s parameters can be animated – not just position, rotation, or scale. New keys are created with just a few clicks and actions: RealFlow also supports key- and vertex-based animation from imported objects. Parameters can also be animated with expressions. An expression is a mathematic • Go to the animation‘s first frame. function and often used to describe repeating motions, e.g. circles or up and down • Keys for position, rotation, scale can be added at once with the K key. movements. • For individual XYZ transformations, click on the “Key” button and choose position, rotation or scale. RealFlow‘s main element for animation is the timeline. It is located at the bottom of RealFlow‘s 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 • Individual transformation and parameter keys (e.g. a particle sources‘s emis- • second field (2) is the maximum playback frame sion speed) are created with a right-click on the parameter value. Choose • third number (3) stands for the simulation‘s maximum frame. “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 simulation‘s 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. • Go the animation‘s next frame and set another key. • Repeat this process for the remaining frames.

1 6 4 5 2 3 7 8

Page 14 Manipulating Animation Curves

Key-based animations are managed in RealFlow‘s “Curve Editor” – this panel can be opened from the “Layout” menu or with the F8 shortcut. A parameter‘s animation curve is opened with a right-click on the parameter name and the “Open curve” command (see thrid image on the previous page).

New keys are added with a double click somewhere on the editor‘s canvas. The values can be fine-tuned with the two input fields or by dragging the key to a new position. RealFlow‘s default key type is TCB, an abbreviation for “Tension”, “Continuity”, and “Bias”. This type smoothes the curve at the keys‘ positions.

If you prefer Bezier keys with tangent handles just convert the key with the “Set Selected Points Type to Bezier” button. In this icon bar you will also find buttons for linear and stepped keys. A Bezier point‘s tangents can be broken, unified, and flattened. With the first action it is possible to control the tangent handles individually.

There are also several zoom functions to fit an animation curve into the canvas.

Input fields for key values

Zoom tools Set Selected Points Type to Bezier Break/unify/flatten tangents

Page 15 RealFlow‘s 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 RealFlow‘s basic user interface. The 3D viewport‘s grid is adjusted here, but also colours. RealFlow uses the OpenGL for displaying a scene‘s 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 recom- mend enabling RealFlow‘s 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 RealFlow‘s workflow. In most cases, the amount of simulation data is too large to maintain realtime playback. Therefore it is of- ten 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 RealFlow’s 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 prefer- ences 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 sep- arately under “Command line options...” (see next page, first image). Emanuele Niri Page 16 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 A click on the “Simulate” button triggers a simulation. With “Reset” all simulation effect as substeps: higher settings lead to better results, but also increased simula- data and parameters will be reinitialized to perform another simulation. As long as tion time. In many cases, a value between 20 and 30 is sufficient. “Jittering” avoids you did not start a new simulation, the data can be restored completely with the unwanted motions before or after an event, e.g. when a pre-fractured glass pane is Alt + U shortcut. 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. 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 scene‘s simulation As mentioned above, all settings made here will only affect the currently opened settings. 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 let‘s you specify the current frame rate and the number of processors you want to use. Under “Stepping” you find two parameters for adjusting the sim- ulation‘s 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 increas- ing “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 Exporting Simulation Data

In RealFlow simulation it is very common to specify which nodes are able to inter- RealFlow simulations are stored in various cache files. These cache files are used by act: a daemon should only act on a specific fluid emitter, selected objects should RealFlow in order to display the simulation in the viewport, but also for resuming not collide etc. These interactions can be configured freely with the “Relationship a suspended simulation. Furthermore, the cache file formats can be read by the Editor”. Every node is represented as a symbol with connections to other nodes. connectivity plugins and the RealFlow RenderKit – they can be seen as the bridge These connections determine whether a node is able to interact with other ele- to your 3D software. ments 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 RealFlow is capable of exporting many other file types, e.g. Alembic, Arnold Scene individual connections. 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 RealFlow’s standard file In order to remove a connection, select it with a click, and use the Del key. Now formats like BIN (default format for particle-based fluids) or RPC (default type for hit the Ctrl (OS X: Cmd) key, keep it pressed, and drag a new line from one node Hybrido fluids). to another with the mouse. RealFlow’s “Relationship Editor” shows you which elements can be connected by dimming and highlighting the icons. 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), When you press the Tab key you will get a menu listing all RealFlow nodes. Simply vorticity and velocity maps as EXR files. choose an entry to add a new scene element. It will then appear in the viewport and the “Nodes” panel. All these export resources are centralized under Export > Export Central (F12). The window is subdivided into groups, where you will find aliases of the scene’s 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 scene’s di- rectory followed by the subfolders for objects, particles, images etc.

Alternative paths are a convenient way to prevent you from problems with insuffi- cient 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 Importing Simulation Data The fundamental workflow is similar to the connectivity plugins:

After the completion of the simulation, the files can be imported to your 3D pro- • Load one or more particle files at once. gram. For this purpose you can install the free connectivity plugins. This set of • Load the particles with the appropriate tools: tools provides everything for loading particles, meshes, objects, RealWave surfaces. RFRK Particler, RFRK Particle Mesh, RFRK Hybrido Mesh, RFRK Cloud The basic workflow is easy and straight forward: • Apply shaders. • Render. • Spot the files, e.g. meshes or particles, on your hard disk. • Import the files. • Apply shaders. Information | RFRK & Plugins Availability • Render. Both, connectivity plugins and the RealFlow RenderKit are complete- ly free of charge, and can be downloaded together with your copy of RealFlow from our Customer Gateway: BIN BIN BIN BIN SD SD https://portal.nextlimit.com Alternatively (or in combination) to the connectivity plugins you can also use the RealFlow RenderKit (RFRK).The RFRK’s mainly works with particles: particles can We also support your work with comprehensive manuals for the connec- be treated as “pure” particles, for example to render foam or spray. The RFRK tivity plugins and the RealFlow’s RenderKit: has sophisticated tools for facilitating your particle-render tasks; it also supports volumetrics and displacement maps. http://support.nextlimit.com/display/rfrk/RealFlow+RenderKit+and+Pl- ugins+Home Another important field of application of the RFRK is meshing – the toolset pro- vides 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:

• 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 ren- dered in realtime. Frame, topology, and material changes are recognized automati- cally, 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” shelf‘s “Maxwell Preview” button.

Fake Graphics

Page 21 Your First Project

Now it is finally time to start RealFlow. Experienced users will surely get along easily. New customers should first read through this section to learn how to get started with the program and some of its numerous possibilities.

After RealFlow has launched, a window appears. This is RealFlow’s "Project Manager“ and contains functions to create a new scene or open an existing file. By default, all new files are created in a certain directory. This specific path can be changed permanently under "Preferences“, but for the very first project it is currently not necessary to alter this path. The “Preferences” also provide options to adapt RealFlow to your favourite 3D platform in terms of axis setup and scale.

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 project’s main directory, carrying the name you have entered before. If you did not specify an alternative path, everything is stored under the program’s 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 vase- shaped object should be filled with fluid particles. The first object will be the vase: in the upper part of the program‘s 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 RealFlow‘s emitters can be found in the "Liquid - Particles“ shelf. Please choose the "Circle“ emitter:

The emitter‘s 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 simula- tions automatically stops and you can scrub the timeline back and forth to evaluate the result. Here is a screenshot from RealFlow‘s 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 project’s 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 Foam with SPH Fluids

Page 25 Foam with SPH Fluids

The creation of foam and spray from particle simulations is an often-used approach. RealFlow provides two common approaches to generate this type of fluid: Python scripting and RealFlow‘s “Graphs” system. In this example you will learn how to create spray particles from a turbulent fluid with the “Filter” daemon.

Here is the nodes list:

• 1 “Cube” object • 1 “Square” emitter • 1 “Container” emitter • 1 “Gravity” daemon • 1 “k Volume” daemon • 1 “Surface Tension” daemon • 1 “Filter” daemon

All scene elements can be added from RealFlow‘s “Edit” menu:

• Add > Objects | Emitters | Daemons • RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys. • Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD <-> Curve • Viewport perspective is changed with the 1, 2, 3, and 4 keys. • Shading modes are toggled with the 7, 8, 9, and 0 keys.

The Setup

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 Adjusting the “Square01” Emitter

To get a sufficient amount of randomness and turbulence, some emitter parameters are animated. For this purpose we will use two basic expressions based on sine functions. These simple formulas will help to increase and decrease the parameters‘ values periodically, creating a randomized look.

Finally, a few more adjustments are necessary:

• Increase the number of emitted particles with Node Params > Particle > Resolution > 75.0 • Scale the emitter to create a rectangular shape (rough values are 0.5 and 2.0 for the horizontal values, and 1.0 for the vertical axes. Move the emitter upwards, but please make sure that it is not outside the “Cube01” object. • Instead of a constant particle stream, a fixed volume is used in this scene. Enter a value greater than 0 under Node Params > Square > Volume. Click on “Reset” to see the volume. The parameter‘s value should be set to value so that the parti- cles nearly touch the “Cube01” node‘s bottom. • By default, the particles are emitted in a regular pattern. Add some randomness under Node Params > Square > V random (H random) > 1.0 (1.0) • Node Params > Node > Color > choose a blue color

Adjusting the “Container01” Node

The “Container” node is not an emitter in a traditional sense. It is simply a place where particles can be added. With these particle-shifting methods you always have to make sure that the source emitter (here: “Circle01”) and the container have exactly the same “Resolution” values, because otherwise you will see exploding particles. Here are the settings:

• Node Params > Particles > Resolution > 75.0 • To make the foam float, change its density with Node Params > Particles > Density > 900.0 • Node Params > Node > Color > choose white

The decreased “Density” will make the foam float on top of the fluid, and the colours help to separate the foam from the fluid visually.

Page 27 Adjusting the “k Volume” Daemon

The “k Volume” daemon is just a box that can be rescaled and adjusted to enclose a certain volume. In this case, the daemon‘s box will be slightly smaller than the “Cube01” node. Note the “Scale” settings from “Cube01”, add 0.01 to each value, and transfer them to the “Scale” parameters of the daemon, e.g.:

• Cube01 > Scale > 6.0, 3.0, 3.0 • k Volume01 > Scale > 6.01, 3.01, 3.01

This tight fit is necessary, because in this scene, new foam particles will be created and they will most probably leave the cube. To delete them immediately, the “k Volume” daemon must be very close to the cube‘s borders.

Adjusting the “Filter” Daemon

• Source Emitters > Square01 • Target Emitter (True) > Container01 • Condition > On Particle Collision • Split > Yes • @ # child > 3

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 scene‘s 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 Elastic Particles Cloth

Page 29 Elastic Particles Cloth

RealFlow‘s standard particle emitter‘s “Elastic” fluid type is often overseen and rarely used, but it provides some very nice features and opens the door to a wide variety of interesting simulations. Maybe you have already seen some simulations on video platforms, but rejected the “Elastic” type as unusable due to instabilities, exploding particles, and long simulation times. In fact you only have to change one thing to get nice results with this particle type. It is therefore definitely worth taking a closer look at it and exploring its parameters.

In this scene, a cloth-like tissue will be simulated with the help of elastic particles. Here is the nodes list:

1 “Linear” emitter 1 “Sphere” object 2 “Cylinder” objects 1 “Cube” object 1 “Gravity” daemon

All scene elements can be added from RealFlow‘s “Edit” menu:

• Add > Emitters | Objects | Daemons • RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys. • Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD <-> Curve • Viewport perspective is changed with the 1, 2, 3, and 4 keys. • Shading modes are toggled with the 7, 8, 9, and 0 keys.

The Setup

Please follow these steps:

• Start with the “Sphere” and “Cylinder” nodes, and arrange them randomly. • Change the cylinder‘s 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 The “Elastics” Type Parameters

The default type for SPH emitters (= standard particle emitters) is “Liquid”. Change it under

• Emitter > Node Params > Particles > Type > Elastics

Elastic particles work like a so-called spring-mass system. In such a system the individual points are connected through springs, holding them together. Once the points are linked you can define the springs‘ elasticity, how far they should be able to separate, or when they should break. To withdraw energy from the springs a damping parameter is also required, because otherwise the system would never come to rest completely. All these parameters and properties can be found with elastic particles:

• “Resolution” is responsible for the number of particles. Enter 25. • “Density” can remain 1000.0, because it will not affect the simulation. • “Spring” is the system‘s “softness”. With higher values, the connections between the particles become more rigid. Use a value of 10,000. • “Damping” derives energy from the springs. With low values the system acts similar to rubber. Leave the default value of 20. • “Elastic limit” is measured in percent and can change the tissue’s behaviour: if the current distance between the connections is smaller or greater than the resting state (= 100%) the system turns rigid. Do not change the value for this simulation. • “Break limit” works similar to “Elastic limit” and is also given in percent. When the limit is reached the connections will break. Leave the default value.

Keeping the Simulation Stable

One of most common problems with elastic particles is the occurrence of exploding particles. This behaviour is the result of very high forces and the more particles, the less stable the simulation will be. The forces accelerate the particles and there comes a point where it is impossible to compensate these instabilities with the emitter‘s settings. “Resolution” plays a very important role here, because when the particles are very close together it is very likely that your simulation will fail. Highly accelerated particles are also responsible for long simulation times.

To counteract these instabilities, please use high fixed substeps. Click on the small triangle next to the “Simulate” button and choose “Options...”. Then enter the following values in the “General” tab:

• MIN substeps > 333 • MAX substeps > 333 • Confirm with “OK”

Page 31 The change to fixed substeps will increase the simulation‘s 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 emitter‘s “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 RealFlow‘s elastic particles do not consider self-collisions like dedicated cloth simulation tools.

Page 32 Calm Fluid Surfaces

When a fluid is poured into a glass or any other container you will see an up and down motion for a certain amount of time. A little later, the fluid comes to rest and forms an even surface. RealFlow mimics this behaviour, but it can take some time before the fluid is totally calm. During this time you can observe the fluid sloshing and moving. One method is simply to sit and wait until the fluid has relaxed, but this can be a very time consuming task. It is much better to support this process with RealFlow‘s “k Speed” daemon. Please bear in mind that this approach is suited for standard particle emitters. Hybrido fluids do not have to be relaxed.

All scene elements can be added from RealFlow‘s “Edit” menu:

• Add > Emitters | Objects | Daemons • RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys. • Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD <-> Curve • Viewport perspective is changed with the 1, 2, 3, and 4 keys. • Shading modes are toggled with the 7, 8, 9, and 0 keys.

The Relaxation Process

• 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 emitter‘s “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.

An initial state can be saved easily:

• 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 RealFlow‘s 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

All scene elements can be added from RealFlow‘s “Edit” menu:

• Add > Objects | Emitters | Daemons • RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys. • Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD <-> Curve • Viewport perspective is changed with the 1, 2, 3, and 4 keys. • Shading modes are toggled with the 7, 8, 9, and 0 keys.

The Setup – Glass Filling

For this scene, a previously modelled glass used. Please bear in mind that this tutorial is based on RealFlow‘s standard scale, and therefore the objects might appear rather big. The very first task is to fill the glass with milk:

• Import the glass with the Ctrl/Cmd + I command. • If you want to reposition it unlock it under Node Params > Node > SD <-> Curve. • With the M key the object can be moved. • Add “Circle” emitter from Edit > Add > Particle Emitter and place it inside the glass. It can be moved with the M key as well. If you have to rescale the emitter use the R key. • To get more particles, the emitter‘s “Resolution” value has to be increased under Node Params > Particles. The value depends on the size of the glass object and the scene‘s scale. For the fluid in the rendered image, a value of 30 has been used. • Other settings are: Int Pressure = 0.5, Viscosity = 4.0, Surface Tension = 10 • Under “Circle”, set “V/H random” to 1.0 each.

A very important thing to check is the glass object‘s “Liquid - Particle Interaction” panel:

• Change “Collision distance” to 0.01. This will bring the fluid particles closer to the object‘s surface.

Page 36 Finally, some daemons are necessary:

• Edit > Add > Daemons > Gravity | k Volume • k_Volume01 > Node Params > k Volume > Fit to object > select glass node

Now, the scene can be simulated:

• 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:

• Stop the simulation with another click on “Simulate”. • Highlight the “Circle01” and go to Node Params > Particles > Max Particles. • Also open the “Statistics” panel and look for “Existent Particles”. • Let‘s say the value there is around 110,000. Under “Max particles” you enter 125,000 (or any other value greater than 110,000), and resume the simulation. • The emission will stop when the “Max Particles” limit has been reached. • Let the simulation run for a few more minutes.

Relaxing the Fluid

In the following step you create a calm fluid surface:

• Unlock the simulation with another click on the lock icon. • If the emitter is not selected, click on it again. • Node Params > Initial State > Use Initial State > Yes • Make Initial State

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 • 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.

The Setup – Glass Shattering

These are the next steps:

• Remove the “k Speed” and “Drag Force” daemons. • Click on the small triangle next to the “Simulate” button and open “Options...”. • General > FPS Output > 72 | 75 | 90 (according to your film/TV system). • Add a “Sphere” node – this object will serve as a bullet. In the viewport‘s “Front” mode (2) shift the bullet to the right. • Add a “Cube” node, position it beneath the glass, and rescale it. Make it big, because it is the ground object. • Add a “Cone” node and rescale/reposition/rotate it until you get a setup similar to the second image below. The “Cone01”object should be aligned with the bullet, because it is the zone of impact.

Fragmenting the Glass

The bullet should hit the glass exactly where the cone is intersecting the glass, because this will be the zone with the highest density of fragments:

• Select the glass node. • Tools > Fracture Tool > Voronoi By Steering Geometry... • Rough number of pieces > 130 (or any other number) • Click on the “...” button and choose “Cone01”. • Lowest/highest concentration rate > 0.007 • Transition length > 0.2 • A new MultiBody with a “_fractured01” suffix appears. • The original glass and cone nodes can be deleted.

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. Let‘s 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 bullet‘s 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” element‘s “Node Params”:

• Edit > Add > Objects > MultiJoint • Creation > Objects A > fractured glass node • Creation > Objects B > fractured glass node • Forces > Force max mode > Constant limit • Collisions > Enable if break > Yes • Break > Break if distance exceeded > Yes • Creation > Create/Recreate

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 body‘s 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 simulat- ing. 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 RealFlow‘s 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 player‘s “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:

• 1 “Particle mesh” node (not the “legacy” engine) • All scene elements can be added from RealFlow‘s “Edit” menu: • Add > Mesh • RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys. • Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD <-> Curve • Viewport perspective is changed with the 1, 2, 3, and 4 keys. • Shading modes are toggled with the 7, 8, 9, and 0 keys.

Foam with SPH Fluids – Overview

This scene contains two emitters, but only the “Square01” node will be meshed, while the fluid from “Container01” should be rendered as particles. Choose a frame with lots of details, and follow these instructions:

• Edit > Add > Mesh > Particle mesh • Nodes > ParticleMesh01 > right-click > Insert emitters > choose “Square01” • The mesh node now has an alias of “Square01” attached.

A click on the mesh node itself reveals a wide variety of settings under “Node Params”, but not all of them are relevant for a good mesh. The most important settings are located under “Mesh”.

Now click on the emitter alias and you will find two more panels: when you create a mesh, the engine puts small spheres at the particles‘ positions and blends them to cre- ate a coherent surface. The radius of these spheres is adjusted with the emitter-related settings:

• Click on the mesh node‘s “Square01” alias. • Go to Field > Radius

If “Radius” is too small then the spheres might not interpenetrate and you will see a torn fluid with holes. If it is too big the fluid‘s borders become thick and you will lose detail.

Page 42 Settings

A very good and reliable way to start with RealFlow‘s “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 mesh‘s borders are a little too round, and this is something that can be fixed with the entries from "Filters”:

• Filters > Filter > Yes • @ Relaxation > 0.1 • @ Steps > 16 • Recreate the mesh

“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 ob- serve 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 simu- lation‘s 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. RealFlow‘s “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 project’s “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 phys- ical 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 manual‘s "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 RealFlow‘s “Edit” menu:

• Add > Objects | Emitters | Daemons • RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys. • Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD <-> Curve • Viewport perspective is changed with the 1, 2, 3, and 4 keys. • Shading modes are toggled with the 7, 8, 9, and 0 keys.

The Setup

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 RealFlow‘s native SD for- mat, 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.

• Ctrl/Cmd + I > load the SD or ABC file with the objects • Select the imported objects > right-click on one of them > Group • Group node > right-click > Rename > Pencils • Create ground object with Edit > Add > Objects > Cube • Rescale the cube node with the R key, and limit its height to a value around 0.1 under Node Params > Node > Scale • The “Cube01” node should be a static object – just like a ground node: activate the object‘s RBD feature under Node Params > Node > Simulation > Passive rigid body • Add a “Gravity” daemon from Edit > Add > Daemons

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 tutorial‘s 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 object‘s 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 pencil’s “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 RealFlow’s 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 script‘s 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 editor‘s 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. Let‘s 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 node‘s 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” editor‘s 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 • Check the values. • Simulate.

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 from time import * import random startTime = clock() percentVariation = 10 userSelection = scene.getSelectedNodes() for node in userSelection: rbdState = node.getParameter("Dynamics")

if (rbdState != "Active rigid body"): node.setParameter("Dynamics", "Active rigid body")

currentMass = node.getParameter("@ mass") rangeMass = (currentMass / 100) * (percentVariation / 2) randomMass = random.uniform(-rangeMass, rangeMass) randomFriction = random.uniform(0.15, 0.25) randomElasticity = random.uniform(0.9, 1.0) randomVelocity = random.uniform(-2.0, -1.0) newMass = currentMass + randomMass newVelocity = Vector.new(0, randomVelocity, 0) # Y setup # Z setup: Vector.new(0, 0, randomVelocity)

node.setParameter("@ mass", newMass) node.setParameter("@ object friction", randomFriction) node.setParameter("@ elasticity", randomElasticity) node.setParameter("@ 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:

• Add > RealWave | Objects | Daemons • RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys. • Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD <-> Curve • Viewport perspective is changed with the 1, 2, 3, and 4 keys. • Shading modes are toggled with the 7, 8, 9, and 0 keys.

The Setup

• 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 Adjusting the Modifiers

• 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

Adjusting the Cubes

• Select the first cube. • Node Params > Node > Dynamics > Active rigid body • Node Params > Rigid body > @ mass > 500.0 • Repeat the steps above for the remaining cubes

The First Simulation

• Click on “Simulate”. After a few frames the cubes turn over due to the waves' motion.

Adjusting the Cubes' Centre of Gravity

In this short tutorial, the centre of gravity is shifted along an object's height axis. It depends on your current preferences which axis is used:

• Preferences > General > Axis Setup • The drop-down menu provides three different setups and you have to adjust RealFlow to your 3D package to maintain the correct orientation of imported objects. The first letter indicates which axis will be used as the height axis. • Cube01 > Node Params > Display > Show CG > Yes • Switch to RealFlow's “Wireframe” mode with the 8 key to make the CoG visible – it is a small yellow square in the cubes' midpoints • Select “Cube01” • Node Params > Rigid body > @ CG > Y/Z > -0.25 • Repeat these steps, but use different “@ CG” values (-0.5 and -0.75) for the remaining cubes

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 Hybrido and Rigid Bodies

Page 54 Hybrido and Rigid Bodies

One of the strongest features of RealFlow is the ability to couple different solvers, for example fluids and body dynamics. In order to enable this connection, you only have to activate an object's rigid or soft body features. In this scene, some old tyres and oil barrels will be washed away by a stream of water made with RealFlow's Hybrido. In the first pass, the interaction between the Hybrido fluid and the objects is simulated. Then we will add some nice splashes.

Here is the nodes list:

• 3 “Cube” objects (fluid container, ramp, and emitter object) • 7 “Tyre” objects • 3 “Oil Barrel” onjects • 1 “Open Domain” node • 1 “Hybrido Emitter” node • 1 “Splash” node • 1 “Gravity” daemon • 1 “k Volume” daemon

All scene elements can be added from RealFlow's “Edit” menu:

• Add > Objects | Hybrido | Daemon • RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys. • Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD <-> Curve • Viewport perspective is changed with the 1, 2, 3, and 4 keys. • Shading modes are toggled with the 7, 8, 9, and 0 keys.

The Setup - Hybrido

This scene is split into two parts: in the first part, the Hybrido simulation is performed – the splash simulation will follow later.

• 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 re- load the motion data in the splash simulation. “ANI- MATION (.sd)” and “CACHE (.bdc)” can be disabled.

Page 57 The Hybrido Fluid Simulation

In order to save time, the simulation will be performed using RealFlow's Command Line version. This is a matter of a few clicks:

• Click on the small triangle next to the “Simulate” button. • Enable the “Command line” entry. • Hit “Reset”, then “Simulate”. • A terminal window appears showing the simulation's progress.

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 Slow Motion Bunnies

Page 60 Slow Motion Bunnies

Deforming soft bodies in slow motion is a very appealing subject. In this short tutorial you will learn how to adjust RealFlow's Caronte rigid and soft body's solver to get a smooth simulation with vivid deformations. For this project, the famous Stanford Bunny is used. The OBJ for this project has been downloaded from here: http://www.prinmath.com/csci5229/OBJ/index.html

Here is the nodes list:

• 4 “Bunny” objects • 1 “Cube” object (floor) • 1 “Gravity” daemon

The “Cube” and “Gravity” elements can be added from RealFlow's “Edit” menu:

• Add > Objects | Daemons • The “Bunny.obj” can be imported to your 3D software, cloned and assembled there, and exported as an Alembic or SD file. Alternatively, it is possible to load the OBJ file into RealFlow directly and scale, position, and rotate the bunny. In RealFlow, objects are imported with Ctrl/Cmd + I. • RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys. • Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD <-> Curve • Viewport perspective is changed with the 1, 2, 3, and 4 keys. • Shading modes are toggled with the 7, 8, 9, and 0 keys.

The Setup

• Import the bunnies as an Alembic, SD, or SD file with the Ctrl/Cmd + I. If not done already, reposition and rotate the loaded objects. • Add a cube object and rescale/position it to your needs. Do not make it too small. This node (“Cube01”) will serve as the ground. The distance between the bunnies and the floor should not be too large (1.5 - 2.0 m are enough). • “Gravity” introduces a force. • Assign different colours to the bunnies under Node Params > Node > Color.

The bunnies are soft bodies, the “Cube01” node is a passive rigid body:

• Selected node > Node Params > Node > Dynamics

Page 61 The Soft Body Parameters

For each bunny different settings are used. The associated parameters can be found under

• Selected bunny node > Node Params > Soft body • The relevant parameters for a highly deformable behaviour are “Length stiffness” and “Volume stiffness”. The higher their values, the more rigid the objects become: • Enter random values between 0.1 and 0.7 for both parameters. • Change “@ elasticity” to values between 0.5 and 0.7. • The “@ mass” value depends on the size of the imported nodes. If the value is too small, increase it to something between 500 and 800. • Repeat the previous steps for all bunnies in your scene.

Adjust the FPS Rate and Caronte's Quality Level

These settings are made in the “Simulation Options” dialogue:

• Click on the small triangle next to the “Simulate” button and choose “Options...” from the menu.

This panel is the place where you adjust RealFlow's accuracy. This is done with the help of so-called substeps. The more substeps, the better the simulation turns out, but at the cost of longer simulation times.

When you work with very high FPS rates you can normally decrease the number of substeps. As a side effect, the simulation performs much faster and it is very tempting to work with the lowest possible value. But, with high FPS settings, and fast moving objects/particles you might observe a rugged motion with visible steps. To avoid this, it is necessary to increase the number of substeps to get a smooth motion.

• First, change the FPS rate for this project under General > FPS output to 400. • Go to the “Caronte” page. • Drag the “Quality” slider” to 20. • Extend the simulation to 400 frames (see below). • Simulate • Create a preview with Playback > OpenGL Preview. • After the images have been assembled, RealFlow's “Movie Player” appears. Stop the movie and enter 25 under “FPS”. Hit “Play” again.

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:

• 1 “Cross” object (cargo) • 2 “Cube” objects (crane and ground) • 1. “Null” object (locator) • 1 “Gravity” daemon • 1 “MultiJoint” node

All scene elements can be added from RealFlow's “Edit” menu:

• Add > Objects | Daemon • RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys. • Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD <-> Curve • Viewport perspective is changed with the 1, 2, 3, and 4 keys. • Shading modes are toggled with the 7, 8, 9, and 0 keys.

The Setup

• Add a cube object (= ground object) and rescale/position it to your needs. Create a cross object, rotate it by 45 degrees (Node Params > Node > Rotation) and place it on top of the ground node. • Another cube node is placed above “Cross01”. • A null (“Null01”) is placed directly below the mounting. • “Gravity” introduces a force.

All polygon objects are passive rigid bodies, except the sphere (active rigid body):

• Selected node > Node Params > Node > Dynamics

Now, add a MultiJoint and open its “Creation” panel under “Node Params”:

• Objects A > Cube02 • Objects B > Cross01 • Creation mode > At Locators Positions • Locators > Null01 • Create/Recreate

Page 64 Animating the “Crane” Node

The “Cube02” node is animated using two keyframes. The motion is a combination of a vertical and a slightly horizontal displacement:

• Drag the timeline slider to frame 0. • Right-click on the appropriate “Position” values, choose “Add key”. • Drag the timeline slide to frame 75. • Move the “Crane” node to its final position. • Right-click on the appropriate “Position” values, choose “Add key”.

• Click on “Simulate” to see the results.

Page 65 RealFlow 2014 – An Intoduction for Beginners Next Limit Technologies 2015

www.realflow.com www.nextlimit.com www.maxwellrender.com