Maya - Realflow RenderKit

Mesher

Maxwell can generate meshes from Realflow BIN particle files at render time, removing the need for saving potentially large mesh files to disk and loading them inside Maya. This feature is exposed through the Realflow RenderKit Mesher node, which can be created using the  button in the Maxwell shelf. You can pick any file in the particle sequence when prompted and the plug-in will automatically take care about replacing the frame number in the file name with the current frame. It is possible to add multiple sequences to be meshed together in the same object by using the Add Sequence button. You can also remove a sequence by clicking the  button at the bottom of the sequence parameters.

By default, the node uses the current frame for determining the name of the files to load. This can be changed by unchecking Use Current Frame in the Time group and keying or connecting the Time attribute.

The particles are displayed in the viewport as points. The amount of points to load and display can be controlled with the Display LOD parameter in the Meshing Parameters group. This parameter does not affect the render in any way.

You can apply a material to the mesher object like on any other Maya primitive (right click -> Assign New Material).

The functioning and parameters of the mesher are described in detail in this section of the main Maxwell manual.

Particles

Realflow particle sequences can be rendered in Maxwell as procedural spheres using the Realflow RenderKit Particles node. To create this node, click the  shelf button. You will be prompted to select a particle file and, similarly to the mesher node, you can pick any file in the sequence and have the plug-in resolve the correct file name on export. The particles are displayed as points in the viewport and there's a level of detail control in the main attributes group.  Similar to the mesher node, there's a time attribute which can be keyed or connected if you don't want to use the current frame for computing the name of the file to load from disk.

Realflow computes various particle attributes like velocity, force, mass, temperature and so on. These attributes, called magnitudes, can be mapped as UV channels on the particles. To add a mapping, click the Add UV Channel button and select which magnitude to map on which channel. The trash button next to the channel can be used to remove a mapping.

Materials can be applied on particle objects by right-clicking in the viewport.

This section of the main manual documents the parameters of the particle primitive.

Maxwell can also render Maya particle systems directly, without going through external files. See this page for details.

BIN Mesh Loader

BIN mesh files generated by Realflow can be referenced inside the scene by using the BIN mesh loader. This way you can skip loading the mesh data inside Maya itself (which can use a lot of memory and slow down the viewport) and you can render such meshes in Maxwell without requiring the Realflow plug-in to be installed. Maxwell will load the mesh itself at render time from the referenced BIN file. To create a BIN mesh reference, click the button in the Maxwell shelf.

The BIN loader node has the following attributes:

  • File: path to a file in the BIN sequence to use.
  • Name Format: allows you to select the naming convention for the file sequence.
  • Frame Padding: the number of digits used for the frame number in the file names. The plug-in tries to autodetect the padding and format settings when you create the node.
  • Frame Offset: this value allows you to offset the sequence relative to the current time.
  • Motion Blur Factor: can be used to control the amount of motion blur, in case the simulation was performed at the different scene or time scale.
  • Smooth Normals: BIN files do not contain normals, so this setting controls how the normals are generated: smooth or faceted.
  • Smooth Angle: when smoothing is on, this represents the maximum angle at which two faces are considered smooth. If the angle between two faces is larger than the limit, a hard edge is used between them.
  • Time: this attribute is used to determine which frame to load from disk. When the node is created, it is connected to Maya's default time source. It can be reconnected or keyed to decouple the time used by the loader from the current frame.
  • Display Mode: controls how the mesh is shown in the viewport. Mesh mode displays the full mesh, while Point Cloud mode displays only the vertices as points. The Point Cloud mode is faster and uses less memory, so it's recommended for heavy meshes.
  • Display LOD: when the object uses the Point Cloud display mode, this attribute controls the amount of vertices to use in the viewport.

As with the other primitives, materials can be applied by right clicking in the viewport. 

 

How to map particle magnitudes to Maxwell parameters

The picture below shows the procedure to map particle magnitudes (in this example it was Age) to a Maxwell parameter (i.e. the opacity of a material layer).

Once loaded the particles with the RealFlow RenderKit importer node (#1) and loaded the particle file (#2), it is necessary to create a new UV channel (#3) and map the Age to it and assign it to one specific channel number (i.e. to Channel 0, #4).

The Age Range refers to the age of the younger and older particle that will be associated to the origin and end of your gradient map (#5) respectively. It is measured in seconds and you must get those age informations from the particle tooltip in RealFlow. General random ranges like 0-1 or 0-100 won't work here, you must find the proper ages in your actual simulation.
Then you can apply that ramp (it must be horizontal like the one shown below) to any attribute on that material (obviously assigned to the uv channel you specified, in this example Channel 0).

If the desired effect is to make your particles to start disappearing after certain age, the ramp may be assigned to map the particles material layer opacity, so the material will start disappearing (and so the particles) regarding that gradient in age.


Mapping particle ages to an UV channel to be later applied to control a material opacity 

Â