SF - Adding Graphs

Please read the introduction to “Simulation Flow” to become familiar with its mode of operation . There, you will also find a description of how to add new graphs.

When you add a script to one of the simulation events (“SimulationPre”, “FramesPre” etc.) you can also see an entry called “Add Graph”. Graphs give you the ability to create programs with the help of connected nodes. These nodes, and their links, represent the mode of operation of scripts, but without writing a single line of code, because everything is done inside a graphical interface.

Inside RealFlow's “Simulation Flow” environment, graphs act and work exactly as scripts or plugins. They can be added and executed at the beginning or end of a simulation, frame or simulation step. It is even possible to combine graphs with scripts and plugins within the same project, because all these (obviously completely different) ways to influence a simulation are absolutely equitable.

Once a graph node has been added to the simulation tree, it will be tagged with a unique ID. If you would like to assign a different name, simply right-click on the graph branch and choose “Rename” from the context menu. Now, the node is editable and can be renamed. Another thing you can observe is that the right part of the “Simulation Flow” window becomes active and you can start to create a new graph. The editor itself shows a blank canvas with a grey raster – this is the place where you add your nodes and establish the appropriate connections and links. The nodes can be moved freely. Nevertheless, it is a good idea to arrange the symbols in the same order the commands are finally processed to keep an overview. A layout like this is also called a flow chart and represents the logical structure of the “program”.

The graph tab/editor provides a menu where it is possible to load, save and import graphs, perform copy and paste actions, and call preferences or the internal help directly.

 

A "RealFlow Graph" with nodes and connections.

The “Tab” Menu

A specialty of all node-based editors (incl. “Batch Graphs” and “Simulation Graphs”) is the “Tab” menu. When you press the Tab key, you will see a menu with all available commands/nodes. The “Filter” input field also provides a very convenient method for a fast access to all nodes which fulfil the given criteria.The first wildcard symbol is the asterisk “*” and is used to substitute two or more characters or even complete words. RealFlow's wildcard filter is not case sensitive - you can use small case and capitals for your search. Here are a few examples:

  • Search for all nodes ending with “01” => type: *01
  • Search for all nodes with “object” in their name => type: *object*
  • Search for all nodes starting with “g” => type: g*
  • Search for all nodes with “grid” and “splash” => type: *grid*splash*

The second wildcard symbol is the question mark “?”. With this symbol it is possible to substitute a single character, for example:

  • Search for all nodes with a common prefix => type: Cube1?
  • This action will display “Cube10”, “Cube11” and so on, but not “Cube20”, “Cube300” etc.

 

Since the “Tab” menu is essential for the work with simulation (and batch) graphs, a detailed description of its entries and functions is given in the beginner's guide to RealFlow's graphs:

RealFlow's Graphs Guide

Creating Graphs

Although programming knowledge is not required for simulation graphs, it follows very similar principles. Graphs also use elements like loops, operators or conditions and they follow a certain syntax. Many of the concepts of a programming language can be found in RealFlow's graphs and some knowledge about data types, variables and other basics is very helpful.

Graphs also provide a help system comparable to Python's and C's SDKs. A complete and detailed explanation of each node can be seen with a right-click on the symbol, then choose “Description”.

An introduction with many examples and a beginner's guide can be found here:

RealFlow's Graphs Guide