real flow max plug in

38

Upload: gashildebrando

Post on 12-Nov-2014

5.294 views

Category:

Documents


0 download

DESCRIPTION

Este es un pequeño manual que muestra el funcionamiento el del Real Flow, el cual es un programa para simular liquidos y poder exportarlos al 3D Max Studio

TRANSCRIPT

Page 1: Real Flow Max Plug In
Page 2: Real Flow Max Plug In

RealFlow 3D Studio Max Plug‐in 

Features, Improvements and Tutorials This document describes  the  improvements made  to  the RealFlow  3D  Studio Max plug‐in.  The main focus areas have been workflow and performance. The code has been rewritten from scratch but care has been taken to preserve backwards compatibility. At the end of this document you can find tutorials explaining various things about workflow and new objects introduced by the plug‐in. 

Installer The new plug‐in has an installer wizard so that users are no longer required to manually copy files into the 3D Studio Max directory. The installer auto‐detects which 3D Studio Max versions are installed and where. All versions of 3D Studio Max starting with 7.0 are supported, with both 32‐bit and 64‐bit builds where applicable. 

 

Figure 1: The wizard auto‐detects 3D Studio Max versions and installation locations. 

   

Page 3: Real Flow Max Plug In

Toolbar and Menus The functionality of the plug‐in is conveniently exposed through a floating/dockable toolbar and a menu.  

 

 

Figure 2: RealFlow toolbar. 

The purpose of the buttons, starting from left to right: 

• Export to SD: Exports the scene using the settings stored inside the scene. If this is the first time the scene is being exported, or the settings have been lost due to some other reason, the button will bring up the settings dialog. 

• Export SD Settings: Allows the user to adjust the SD export settings. 

• Import  from  SD:  This  can  be  used  to  import  a  SD  file  into  3D  Studio Max.  No  settings  are needed. 

• Export PFlow Emitters: Can be used to export one or more PFlow emitters as a sequence of BIN files. It uses the last settings stored in the scene if available or brings up an options dialog, just like the SD exporter. 

• Export PFlow Settings: Displays the options dialog for the BIN particle exporter. 

• Load  RealFlow Mesh:  Creates  a mesh  object  inside  3dsMax  and  loads  its  geometry  from  a sequence of BIN mesh files. 

   

Page 4: Real Flow Max Plug In

 

The Import/Export of the SD and Mesh files can also be done using 3dsMax File‐>Import…/File‐>Export… options. 

 

Figure 3: RealFlow SD Import/Export using 3dsMax’s File I/O mechanism. 

The users can configure their own toolbar by using the “Customize User Interface” dialog. 

 

Figure 4: RealFlow toolbar actions are user configurable.   

Page 5: Real Flow Max Plug In

SD file support This section will discuss the usage of the SD part of the plug‐in and  its  improvements compared to the previous version. 

Exporting 3dsMax scenes to SD file format 

3dsMax scenes can be exported  to  .SD  files by simply pressing  the    toolbar button.  If  it’s  the  first attempt to export the scene, the following dialog will open asking for the appropriate settings. 

 

Figure 5: SD export settings dialog. 

After the scene is exported, the specified settings will be saved in the current scene file. That means that 

if you do another export using the   toolbar button, the plug‐in will automatically perform the export using the settings already saved in the scene.  

If you need to export using other settings, you can open the settings dialog by pressing the   toolbar button or by using  the RealFlow‐>SD File Export Settings menu. After you make  the changes, you can export with the new settings by pressing the Export button. 

The export settings are: 

• Entire Scene/Selected Objects: Control over objects being exported. 

• Export Non‐Renderable Objects: Objects marked  as non‐renderable will be exported.  (Useful for bones/biped systems). 

• Deformation Autodetect: The plug‐in will determine if the object being exported  is a rigid or a soft body object. The object will be treated as a soft body object in one of the following 3 cases: a)  it has a soft body modifier applied; b)  it’s a derived object  (it has modifiers applied); c)  it’s explicitly set by the user as a soft body object (Object Properties ‐> RealFlow tab). 

Page 6: Real Flow Max Plug In

• Deformation Yes: All objects will be exported as soft body objects. 

• Deformation No: All objects will be exported as rigid body objects. 

• Time Output: Control the number of frames to be exported. 

• Camera: The camera  from which  the scene  is  to be exported. The current one  (if any) will be used as default. 

• Export File: The actual .SD filename and path where the scene will be exported. 

 

Soft Body objects Soft body objects are now supported  in 3D Studio Max  in two different ways: through a separate soft body object and through a modifier.  

A soft body object and a soft body modifier are linked to the original SD file through two properties: SD file name and SD object name (see figure 5). Changing the name of the object or the path to the SD file is not  recommended but  can be used e.g. when  the SD  file has been moved  to a different directory. Nodes with a broken link (bad file path or object name) will show up as a simple cube in the viewport. 

Please  note  that  either  of  these  two  objects  (“RFSoftBody”  and  “RFSoftBodyModifier”)  can NOT  be created manually by users.  

When importing a SD file that contains soft body objects the following scenarios could happen: 

• A new “RFSoftBody” object will be created if the imported soft body object is not present in the current scene. 

• A new  “RFSoftBodyModifier” will be  applied on  an existing object when  the object  is not  an “RFSoftBody” object or it doesn’t have a “RFSoftBodyModifier” already applied. 

• If  the  object  is  already  present  in  the  scene  and  it’s  an  “RFSoftBody”  object  or  it  has  an “RFSoftBodyModifier” applied, the plug‐in will assign the positioning data (translation, rotation, scaling) and will update  the SD  link  file and object name attributes  to point  to  the  file being imported. 

Both  “RFSoftBody” object and  “RFSoftBodyModifier” will use  file offsets  for each  frame and will  load geometry from disk when the current frame changes, ensuring optimal memory usage. 

A  soft body object can be used as a normal 3D Studio Max object, which means  it can be  instanced, copied or referenced and used in combination with different object or world space modifiers. 

Page 7: Real Flow Max Plug In

 

Figure 6: Soft Body object and Soft Body modifier. 

 

MAXScript support The SD functionality is also exposed to MAXScript. The command to import SD files is: 

rfImportSD file:path_to_file

When using the command to export scenes, the export settings can either be taken from the scene, or explicitly specified. To use the settings stored inside the scene, invoke the command like this: 

rfExportSD output:path_to_file

To specify the options explicitly, you can add one or more of the following arguments: 

• deformation:YES/NO turns on per‐frame geometry export on  the exported objects. The 

default is “Autodetect”. 

• camera:name to select which camera to use. The default is to use the active camera (if any). 

• entireScene:YES/NO exports the entire scene or  just the selected objects. The default  is to export everything. 

• firstFrame:number specifies the first frame to export. The default  is first frame from the 

active time segment. 

• lastFrame:number specifies the last frame to export. The default is the last frame from the 

active time segment. 

Page 8: Real Flow Max Plug In

RealFlow­specific object attributes A RealFlow  tab  is added  in  the “Object Properties” dialog  for  the currently selected objects. RealFlow soft body objects, cameras,  lights and particle system will have the options disabled since they are not supported. The tab contains attributes which control how the exporter treats the object: 

• Export  deformation:  this  can  be  used  as  an  object‐level  override  for  the  deformation mode which is specified in the export options. 

 

Figure 7: RealFlow‐specific object attributes. 

These attributes are dynamically added to object only when they are set to a non‐default value.  

Progress reporting Both the import and export processes report progress through the main 3D Studio Max progress bar, in the status line. The user can cancel at any time by pressing the ESC key. Please note that aborting an import before any frames have been read will leave all the imported objects at the origin. 

 

Figure 8: RealFlow SD Export progress bar.  

Miscellaneous improvements • Large file support: the plug‐in uses 64‐bit offsets for file operations, so there are no restrictions 

on the size of the SD files. 

• UVW mapping: the plug‐in will correctly import and export texture coordinates now. 

Page 9: Real Flow Max Plug In

RealFlow Particles in 3D Studio Max This section covers the part of the plug‐in which handles sequences of particle BIN files. 

RealFlow Standard Flow using the Particle Flow System Three  RealFlow  operators  have  been  implemented  for  the  Particle  Flow  system  so  that  particles simulated in RF can be manipulated using the full power of PFlow inside Max. 

A Standard  flow  implies having only 5 operators defined within  the PFlow  System: RealFlowFileBirth, RealFlowFileUpdate, RealFlowDeathTest,  Shape  and Display.  Figure 8  shows  the  Standard  Flow when using RealFlow as an emitter. This flow can be created manually by the user by placing a PF_Source node in  the  scene  and  replacing  the default Birth operator with  an  instance of RealFlowFileBirth.  To have particle positions updated, one has  to place  the RealFlowFileUpdate operator  in  the event container. The RealFlowDeathTest  operator  is  needed  to  get  rid  of  particles marked  dead  by  the RealFlow  File Update operator.  

 

Figure 9: A Standard flow.   

Page 10: Real Flow Max Plug In

RealFlow File Birth operator The RealFlow File Birth operator acts as the default Birth operator. It feeds the entire PFlow system with particles. 

 

Figure 10: RealFlow file birth operator settings. 

The settings for the RealFlowFileBirth operator are: 

• RealFlow  .BIN  file  sequence: will open  a dialog box  allowing  the user  to  select  a  file  from  a sequence of  files containing simulated particles behavior. After  the  file has been selected, the prefix for the emitter is calculated based on the format and padding size specified by the user in the “File name options” group.  

• Format:  has 4 predefined file formats that match RealFlow’s File name Options. 

 

Figure 11: File format options. 

• Padding Size: the number of digits used to represent the frame. The frame number will replace “#” from the selected file name format when the final file name is calculated. 

• Prefix: replaces the “name” part in the name format specification. 

• Emit  Start:  specifies  the  initial  frame  in  which  the  RealFlowFileBirth  emitter  should  start emitting particles. 

• Emit  Stop:  specifies  the  frame  when  the  RealFlowFileBirth  operator  should  stop  emitting particles. Please note  that  if  the particles have  speed  in  the  .BIN  sequence  files, particles will continue to move after the emitter stops emitting new particles. 

• Offset: specify the first frame of the .BIN file sequence which will be used by the emitter. 

• Inherit emitter TM: all particle positions will inherit the emitter’s position and orientation in the scene. In this way, one can keep particles “under” their own emitter. 

Page 11: Real Flow Max Plug In

RealFlow File Update operator The RealFlow File Update operator updates position, speed and other custom channels information for all particles generated by the RealFlow File Birth operator.  

It’s an optional operator, meaning that if you are routing particles to another container (event) and you don’t need to keep the particle  information (position, speed etc) synchronized with RealFlow files, you don’t have to use a RealFlow File Update operator in that container. Simply Display or Delete them as in figure 11 below. 

 

  

Figure 13: Workflow when routed particles are updated. Figure 12: Workflow when routed particles are deleted. 

 

When routing RealFlow particle  information to another PFlow container (event) and you want to keep particle  information  synchronized with  the  RealFlow  files,  you  need  to  place  another  RealFlow  File Update operator in that container. (See figure 12)  

The RealFlow File Update operator also acts  like a garbage collector for every PFlow event container  is placed in. Its role is to check for dead particles by comparing its current particle IDs with the particle IDs stored in the current RealFlow .BIN frame file. If it finds any dead particles, it will mark and send them to a RealFlow Death Test operator in order to be routed to another container event. From there they can be deleted from PFlow if needed.  

   

Page 12: Real Flow Max Plug In

RealFlow Channels: MAXScript PFlow operators can access particle attributes which are computed by RealFlow like viscosity, density etc. 

 

Figure 14: RealFlow File Update operator settings. 

These attributes are exposed through the custom data channels available  in PFlow particle containers. The custom data channels can store  less data than RealFlow produces, so the users must select which particle attributes  they want  to use. Each attribute will use up a certain number of value slots of  the available space, as follows: 

• Force, Vorticity, Normals, UVW: 3 slots each 

• Isolation Time, Viscosity, Density, Pressure, Mass, Temperature: 1 slot each 

The selected channels will be distributed over the 16 available value slots in this order: 

• The first 12 values go to the particleMatrix channel. 

• The next 3 values go to the particleVector channel. 

• The last value goes to the particleFloat channel. 

The Neighbor count attribute, if selected, is made available through the particleInteger channel. 

Please consult the MAXScript documentation for further details on how Particle Flow is integrated with MAXScript. 

The following particle attributes are available through standard PFlow data channels: 

• Position data can be read through the particlePosition channel. 

• Velocity is available as particleSpeed. 

• The RealFlow particle ID is in particleID. 

Page 13: Real Flow Max Plug In

Please note  that  the  position  you  get  from  the  particlePosition  channel does not  exactly match  the position in the BIN file. We need to perform some adjustments on this value in order for the rendered position  to match  the position  from  the BIN  file, which  is what matters. Also,  the velocity channel  in PFlow is expressed in meters per time tick, not meters per second as in the BIN file. In order to compute the original values you can apply the following formulas (MAXScript code): 

realVelocity = particleSpeed * ticksPerFrame * frameRate

renderPosition = particlePosition + particleSpeed * ticksPerFrame / 2.0

The names ticksPerFrame and frameRate are built‐in MAXScript variables. 

RealFlow Death Test operator The RealFlow Death Test simply gets all particles marked dead by the RealFlow File Update operator and routes them to another event in order to be deleted from PFlow. It’s very important to place it under a RealFlow File Update operator since the order of operator evaluation in PFlow is top‐bottom. 

Motion blur for particles Particles imported using the RealFlowFileBirth operator support motion blur when they are rendered. 

RealFlow File Birth operator and MAXScript The following attributes are exported to MAXScript: 

• Format 

• Path 

• Prefix 

• Padding 

• InheritEmitterTM 

• EmitStart 

• EmitStop 

• Offset 

Also all above mentioned parameters are animatable. (Figure 14) 

MAXScript Ids for the “Format” parameter are: 

• Name#.ext: 0 

• Name.ext.#: 1 

• Name#.ext: 2 

• Name_#.ext: 3 

   

Page 14: Real Flow Max Plug In

RealFlow File Update operator and MAXScript The following attributes are exported to MAXScript: 

• Channels 

The parameter is animatable. (Figure 14) 

MAXScript Ids for the “Channels” parameter are: 

• Force: 1 

• Vorticity: 2 

• Normals: 4 

• UVW: 8 

• Isolation Time: 16 

• Viscosity: 32 

• Density: 64 

• Pressure: 128 

• Mass: 256 

• Temperature: 512 

• Neighbors number: 1024 

Ids for “Channels” parameter can be combined with bitwise OR from MAXScript. 

 

Figure 15: RealFlowFileBirth and RealFlowFileUpdate operator have animatable parameters. 

   

Page 15: Real Flow Max Plug In

Exporting ParticleFlow systems to .BIN particle files 

Particle Flow systems can be exported to .BIN particle files by simply pressing the   toolbar button. If it’s  the  first attempt  to export PFlow emitters  from  the  current  scene,  the  following dialog will open asking for the appropriate settings. 

 

Figure 16: RealFlowFileBirth and RealFlowFileUpdate operator have animatable parameters. 

After the scene is exported, the specified settings will be saved in the current scene file. That means that 

if you do another export using the   toolbar button, the plug‐in will automatically perform the export using the settings already saved in the scene.  

If you need to export using other settings, you can open the settings dialog by pressing the   toolbar button or by using the RealFlow‐>Export PFlow particle Settings menu. After you make the changes, you can export with the new settings by pressing the Export button. 

Performance The main  drawback  of  the  3D  Studio Max  PFlow  system  is  that  it  can’t  be  used  in  a  non  history‐dependent manner. That means every  frame depends on  the  last one. When you move back  in  time using  the slider, PFlow will automatically evaluate  the operators  for ALL  the  frames between  frame 1 and the current frame. This is not needed for RealFlow, but it cannot be disabled and therefore seeking backwards using the time slider is slow. 

To work around this problem use the settings in the “Quantity Multiplier” section of the interface. These values  control  the percentage of  the particles which are  read  from  the BIN  files. A  lower  setting will result in poorer visual quality but better performance because the system has to load and display fewer particles. There are separate settings for viewport display and rendering. 

Old particle importer The “NL Particles 2” emitter, named now “Particle Loader”, is still available in the UI. We will keep this alternate method  because  its  performance  is  better  than  the  PFlow  approach  (due  to  the  reasons explained above). 

Page 16: Real Flow Max Plug In

Loading particles with Particle Loader  This section covers the part of the plug‐in which handles sequences of particle BIN files using the Particle Loader object. 

The ParticleLoader object can be found in the “Geometry” sub‐tab of the “Create” tab under “RealFlow” combo selection. 

 

Figure 17: ParticleLoader object. 

The following are the ParticleLoader properties: 

 

Figure 18: ParticleLoader object properties. 

 

Page 17: Real Flow Max Plug In

The settings for the ParticleLoader object are: 

• Icon Size: Icon size in viewport 

• Emitter Hidden: Show/Hide the particle emitter in the viewport 

• Display Every: Will display every X particles in the viewport 

• Render Every: Will render every X particles in the viewport 

• Select File Sequence:  Will open a File Open dialog for the user to select a .BIN file sequence 

• Path: Will show the path to the current loaded .BIN sequence 

• Prefix: Will show the name of the loaded .BIN file 

• Lock last frame: Locks the last frame of loaded sequence 

• Invert sequence: The .BIN sequence is read in an inverse order 

• Offset: Indicates the frame from where the animation will start 

   

Page 18: Real Flow Max Plug In

RealFlow Meshes in 3D Studio Max This section covers the part of the plug‐in which handles sequences of RealFlow BIN mesh files. 

Loading RealFlow meshes using MeshLoader object Sequences of BIN mesh files can be loaded using the MeshLoader object. The MeshLoader object can be 

created using the   toolbar button, File‐>Import menu, RealFlow‐>”Create Bin Mesh object” menu or from the 3dsMax “Create” tab. 

When creating the MeshLoader from the RealFlow toolbar/menu, a File Open dialog will open asking for the .BIN mesh file sequence. After the file sequence is selected, a MeshLoader object will be created and placed at the center of the scene (0, 0, 0).  

The default viewport representation  for the MeshLoader object  is a cube. Whenever there  is an error loading the .BIN file sequence, or there is no sequence loaded, this default representation will be used. 

MeshLoader object properties The following are the MeshLoader properties. 

 

Figure 19: MeshLoader object properties. 

 

 

Page 19: Real Flow Max Plug In

The settings for the MeshLoader object are: 

• BIN Mesh sequence: will open a dialog box allowing the user to select a file from a sequence of .BIN mesh files. After the file has been selected, the prefix for the emitter is calculated based on the format and padding size specified by the user in the “File name options” group.  

• Format:  has 4 predefined file formats that match RealFlow’s File name Options. 

 

Figure 20: File format options. 

• Padding Size: the number of digits used to represent the frame. The frame number will replace “#” from the selected file name format when the final file name is calculated. 

• Prefix: replaces the “name” part in the name format specification. 

• Start: specifies the  initial frame  in which the MeshLoader object should start  loading the mesh sequence. 

• Offset: specify the first frame of the  .BIN file sequence which will be used by the MeshLoader object. 

• Strength: This value is used when Motion Blur is turned ON and acts as a multiplier for the mesh velocity channel found in the file. 

• File Frame  Information: Will display per  frame  information  for  the mesh,  like  the number of fluids  found,  if  they have UVW data and  if  the velocity channel  (speed)  is present. Note: The velocity channel is used for Motion Blur.  

Motion blur support RealFlow meshes usually have unstable topology: vertices are created or removed at each frame. This causes  problems  with motion  blur  in most  renderers,  since  this  effect  needs  the  same  number  of vertices in every sub‐step to function correctly. The plug‐in tries to work around this by using the same BIN file for all sub‐frames when it detects that motion blur is enabled. The vertex positions are displaced using  the  velocity  channel  (speed)  stored  in  the  BIN  file,  to  obtain  the  correct  data  for motion  blur (figure 21, 22). 

Setting  the  “exposure” of  the  render  too high  (longer  than one  frame)  to  lengthen  the blur  can  still cause the plug‐in to evaluate two different BIN files, resulting in visual artifacts. It is better to control the blur length using the “motion blur strength” setting than by increasing the exposure time. 

 

Page 20: Real Flow Max Plug In

 

Figure 21: MeshLoader object without Motion Blur. 

 

Figure 22: MeshLoader object with Motion Blur. 

MAXScript support for MeshLoader objects MeshLoader objects are fully exposed to MAXScript. The creation process and all MeshLoader object parameters are available through MAXScript. 

The properties of a MeshLoader object can be seen by applying the showProperties MAXScript command on a MeshLoader object. (E.g. showProperties $MeshLoader01) 

The following command can be used to create a MeshLoader object from MAXScript. 

rfImportBinMesh <file:bin_filename> [<prefix:prefix> <format:value> <paddingSize:value> <start:value> <offset:value> <motionBlurStrength:value>]

The only required parameter is <file>. All the other parameters will use the default values if they are not specified in the import command. 

   

Page 21: Real Flow Max Plug In

RealFlow MeltMaterial in 3D Studio Max This section covers the part of the plug‐in which handles the MeltMaterial in 3D Studio Max. 

The  RealFlow  MeltMaterial  can  be  used  to  combine  several  materials  based  on  the  fluid  weights contained  in  a RealFlow mesh  file.  This  version  of MeltMaterial  has  support  for  the  default  3dsMax Scanline Renderer and mental ray® renderer. 

The RealFlow MeltMaterial can be created in the same way all the other 3dsMax materials are created. Please  note  that  due  to  a  3dsMax  limitation,  when  rendering  with  mental  ray®  renderer,  the MeltMaterial cannot be used on more than one MeshLoader object. By breaking this rule, you can get unexpected results and even crashes. 

RealFlow MeltMaterial properties The following are the RealFlow MeltMaterial properties. 

 

Figure 23: RealFlow MeltMaterial. 

The settings for the RealFlow MeltMaterial are: 

• Melt  Index:  This  gives  the  user  some  control  over  the  appearance  of  the  parts  of  the mesh where  several  fluids meet. A value of 0 will blend  the material  colors using  the  fluid weights exactly  as  they  are  stored  in  the BIN  file.  Increasing  the  value  towards 1 will exaggerate  the weights, brightening the blend. Negative values will scale down the weights so the result will be darker. (Figures 23‐25) 

Page 22: Real Flow Max Plug In

 

Figure 24: Rendered with mental ray® using Melt Index parameter set to ‐1.0. 

 

Figure 25: Rendered with mental ray® using Melt Index parameter set to 0.0. 

 

Figure 26: Rendered with mental ray® using Melt Index parameter set to 1.0. 

Page 23: Real Flow Max Plug In

RealFlow 3D Studio Max plug­in Auto­Update  

The plug‐in has a built‐in update mechanism which can be used to manually or automatically check for plug‐in updates. By default, the plug‐in automatically checks for updates on every 3dsMax startup and if it finds an update, the user will be notified with a dialog box. 

 

Figure 27: Notification for a new Plug‐in version. 

Automatic checks can be turned off in the Customize‐>Preferences‐>RealFlow panel. 

 

Figure 28: General RealFlow settings panel. 

Page 24: Real Flow Max Plug In

Tutorial – Exporting a scene to a SD file This tutorial covers a typical workflow when trying to export to a RealFlow SD file. We’ll try to make a simple Rigid Body animation by placing some barrels in front of the octopus when it attacks the pirate. 

1. Open  3dsMax  and  load  “..\scenes\pirateroom.max”.  Note:  Since  this  scene  was  created  in 3dsMax 9, this tutorial only applies to 3dsMax versions greater or equal to 9. 

 

Figure 29: Pirateroom.max file loaded in 3dsMax. 

   

Page 25: Real Flow Max Plug In

2. There are 500 animated frames in this file and we want to export them all to a SD file. We press 

the toolbar   button, and if this is the first time we are trying to export this scene, a dialog will open letting us choose the right settings for the SD file we want to export. 

 

Figure 30: Pirateroom.max file loaded in 3dsMax. 

Set deformation to “No”, since we don’t want to export soft bodies or skinned meshes and leave all the other settings to their default values. Set the export file path and hit “Export”. 

These settings will be saved  in the scene, so another export will automatically use the settings we’ve already specified. If we want to change the settings for a future export, we can open the 

“SD File Export Settings” by pressing the   toolbar button.  

   

Page 26: Real Flow Max Plug In

3. Open RealFlow and create a new project named “Pirateroom.flw” and then load the exported “pirateroom.sd”. 

 

Figure 31: Pirateroom.sd file loaded in RealFlow. 

Note: If the scene is too big, you can use a different scale for it, like 0.01. 

   

Page 27: Real Flow Max Plug In

4. Add a gravity daemon to the scene.   

5. Select the barrels  from the right  (barril, barril01, barril02, barril03), and  in order to be able to move them, click on the SD<>Curve button under the “Node params” rollup. Move them to the left and place them between the pirate and the octopus, so when the octopus tries to grab the pirate, it will hit them. 

 

Figure 32: Barrels placed between the pirate and the octopus. 

6. Keeping the current barrels selected, select the “barril04” object too. On the “Node Params” set “Dynamics” to “Rigid Body” and on the “Rigid Body” rollup and set “Dyn motion” to “Yes”.  

7. Next, we set the pirate and the octopus to act as colliders, but unaffected by gravity. Select all Bip* objects  for  the pirate and “Sphere04“,“Sphere06“,“Sphere08“,“Sphere09“,“Sphere10“  for the  octopus.  On  the  “Node  params”  rollup,  set  “Dynamics”  to  “Rigid  Body”  and  set  “Dyn motion” to “No”.  

8. The  room objects need  to be  set up  as  static  colliders.  Select  “Plane02”,  “Line07”,  “Line07”, “Object01” and “Object02”, set “Dynamics” to “Rigid Body” and “Dyn motion” to “No”. 

   

Page 28: Real Flow Max Plug In

9. Simulate from frame 0 and export all objects from the scene. You can verify that by checking the export setting from the Export‐>Export Central ... (F12) menu. 

 

Figure 33: Export Central dialog for Pirateroom.flw scene. 

10. Now it’s time to import the simulated scene in 3dsMax. There are two import options available: We  can  import  the  “animation.sd”  file  in  a new 3dsMax  scene or we  can  import  it over our existing  “pirateroom.max”  scene.  The  second option  is more  advantageous,  since  it will  only modify the animation for the objects, keeping the current object modifiers applied. By using the first option, the plug‐in will create all objects at import time as Editable Mesh objects. 

The  import  is simply done by pressing  the     toolbar button. A “File Open” dialog will open letting us choose the path to the “animation.sd” file. 

 

Figure 34: Animated pirateroom.sd file imported back in 3dsMax. 

 

Page 29: Real Flow Max Plug In

Tutorial – Importing a soft body object into 3D Studio Max This  tutorial  covers  a  typical workflow when  trying  to  import  a  soft body object  in 3dsMax. We will import a simple soft sphere hitting the ground. 

1. Open RealFlow and create a plane and a sphere. Add a gravity daemon. 

 

Figure 35: Realwave object imported in 3dsMax. 

2. In the “Node params” for the Sphere, set “Dynamics” to Soft Body. 3. Make sure you have all the objects selected in Export‐>Export Central… (F12) and start 

simulating 100 frames. 

4. Open 3dsMax and import the animation file by pressing the   toolbar button and browsing for the “animation.sd” file. 

5. You should end up with 100 animation frames in 3dsMax. 

 

Figure 36: Soft body sphere imported in 3dsMax. 

 

Page 30: Real Flow Max Plug In

Tutorial – Realwave objects in 3D Studio Max In this tutorial we will be importing a Realwave object into Max. 

1. Start  RealFlow,  create  a  Realwave  object  and  a  new  cube  object. Move  the  cube  above  the Realwave object. Add a gravity daemon. 

 

Figure 37: Realwave object. 

2. Select the cube object and on the “Node rollup” set “Dynamics” to Rigid Body. 3. Simulate 100 frames. 

4. Start 3dsMax and  import  the “realwave01.sd” by pressing  the    toolbar button. The object will be black when seen from above: 

 

Figure 38: Realwave object. 

 

 

Page 31: Real Flow Max Plug In

5. The Realwave object is black because its normals are pointing the wrong way. Select the object and go to the Modify tab. Enable the “Invert Normals” checkbox. 

 

Figure 39: Realwave object properties. 

6. The object should render correctly now. 

 

Figure 40: Realwave object imported in 3dsMax. 

   

Page 32: Real Flow Max Plug In

Tutorial – RealFlow particles in Particle Flow This  tutorial  covers  a  typical workflow when  trying  to  import  RealFlow  particles  in  3dsMax  using  a Particle Flow system. We will import 4 emitters simulated in RealFlow. 

1. Open RealFlow and create 4 emitters, a plane, a Kill_volume daemon and a Gravity daemon.

 

Figure 41: Scene with 4 emitters created in RealFlow. 

2. Simulate 100 frames. 

 

Figure 42: Simulated scene in RealFlow. 

   

Page 33: Real Flow Max Plug In

3. Open 3dsMax and create 4 PFlow emitters. 

 

Figure 43: 4 PFlow emitters in 3dsMax (top view). 

4. Open the Particle Viewer and remove the following default operators from all 4 containers: Birth, Position Icon, Speed and Rotation. 

5. Place a RealFlowBirth operator in all 4 containers. 

 

Figure 44: RealFlowBirth operators added to all 4 containers. 

6. Select the BIN file sequence for each birth operator and set the emission range to start at frame 0 and end at 100. 

 

Figure 45: The settings for the RealFlowBirth operator. 

   

Page 34: Real Flow Max Plug In

7. Add  a  RealFlowFileUpdate  and  a  RealFlowDeathTest  operator  to  all  4  containers.  Please note that we need the RealFlowDeathTest operator, because we have simulated the scene using the “Kill_Volume” daemon in RealFlow. 

 

Figure 46: Containers having all 3 RealFlow operators added. 

8. We don’t need the dead particles, so we route all of them to a single container and we delete them.

 

Figure 47: All dead particles are routed to a single container and deleted. 

   

Page 35: Real Flow Max Plug In

9. Close the Particle Viewer. In the viewport you will see that all particles are created relative to  their PFlow Source emitter. To get  the same positions as  in RealFlow, uncheck “Inherit emitter TM” on every RealFlowBirth operator. The final image should look like this: 

 

Figure 48: All dead particles are routed to a single container and deleted. 

10. You can add various PFlow operators  if you wish to alter the particles  in any way (motion, color etc.). For example you can route some particles based on their age and increase their speed.  Don’t  forget  to  add  RealFlow  update  and  death  operators  to  all  the  containers (except those with only a delete operator in them). 

 

Figure 49: PFlow Speed operator applied to some routed particles. 

   

Page 36: Real Flow Max Plug In

Tutorial – A RealFlow mesh rendered using the MeltMaterial This tutorial shows the basics of using the RealFlow Melt Material with mental ray®. 

1. Start RealFlow and create 4 emitters, a plane and a Mesh object.  

 

Figure 50: 4 emitters created in RealFlow. 

2. Right click on the Mesh object and choose “Insert all fluids”. 3. Simulate 100 frames. 

 

Figure 51: 4 emitters simulated as a mesh object in RealFlow. 

   

Page 37: Real Flow Max Plug In

4. To  bring  the  simulated mesh  into  3dsMax,  create  a MeshLoader  object  by  pressing  the   toolbar button. A dialog will open letting you chose the simulated mesh file sequence.  

 

Figure 52: MeshLoader object imported into 3dsMax 

5. Next we  apply  a MeltMaterial on  the MeshLoader  object. Open  the Material  Editor  (M)  and press the “Standard” button. Choose “RealFlow MeltMaterial” from the list. 

6. By looking at the MeshLoader object properties, we see that it contains 4 fluids. 

 

Figure 53: MeshLoader object properties showing that it contains 4 fluids. 

 

Page 38: Real Flow Max Plug In

7. Having  4  fluids  on  the  MeshLoader  object,  we  need  to  create  4  sub  materials  on  our MeltMaterial. 

 

Figure 54: MeltMaterial with 4 sub‐materials. 

8. Assign the MeltMaterial to our MeshLoader object by simply dragging the material onto it. 9. Change the renderer to mental ray® renderer and press the Render button. 

 

Figure 55: MeltMaterial applied on a MeshLoader object and renderer with mental ray® renderer.