Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Each of the simulation channels (temperature, velocity,smoke etc.) exists in two instances - in the simulation core and in the simulation result (i.e. cache). The functions in this section can access both the simulation core and result. If a node is passed to the access functions, the particular simulation result is accessed, otherwise the simulation core is accessed.

UI Text Box
sizemedium
typenote

The simulation core exists only during the simulation and can be accessed only in the Callback functions.

...

MEL Functions

phxfdSim [-q] [-node(-n) string] [ -action(-a) string] [-flags(-f) int] [-fname(-fn) string] [-debug(-d) int]

This is the main command to control the simulator node.

-q

query a property:

no flags current state of the simulation. Can be one of the following: "none" - no simulation is running, "paused" - the simulation is paused, "running" - the simulation is running.

-node the node of the simulation that is currently running.

-debug the current debug flags.

-node

determine manually the simulator node.

-action

the action to execute:

"start" - start the simulation of the specified node.

"stop" - stop the current simulation.

"pause" - pause the current simulation.

"restore" - restore the simulation from the current time slider position or the Custom Start Frame under the Simulation rollout. Use -fname if you want to Load the initial state of the simulation, instead of Restoring.

"batch" - start the simulation in batch mode.

"batchr" - restore the simulation in batch mode from the last simulated cache file or the Custom Start Frame under the Simulation rollout. Use -fname if you want to Load the initial state of the simulation, instead of Restoring.

"clearcache" - clear the output cache. Use -flags 1 to clear the resimulation cache.

"loadtempl" - load a preset. Use -fname to specify the preset file name.

"savetempl" - save a preset. Use -fname to specify the preset file name.

-flags

specify flags, used by clearcacheloadtempl and savepreview actions.

-fname

specify a file name, used by restoreloadtemplsavetempl and savepreview actions.

-debug

replace the smoke channel with debug information during the simulation:

0 - disabled, normal smoke channel.

1 - frozen cells

2 - previous divergence

3, 4 - current divergence

Return value:

none

phxfdGetRoot

Return the Phoenix FD installation root path. If "." is returned, the Phoenix FD environment variable was not found. getPhoenixFDRoot will return also the fallback location.

phxfdSort  camera  string  nodes  string[]

Sort the nodes passed as the second argument based on a particular camera. This command can be used for example to determine the rendering order.

Return value:

string[] The sorted array of nodes.

phxfdSaveFramePreview  nodes  string[]  merge  int  filename  string  cameras  string[]

Save a GPU preview for the current frame. The first argument specifies a list of nodes to render. If merge is 1, the preview of all nodes will be merged to a single image, otherwise - each node will be rendered to a separate image. If filename is not empty, it allows overriding the default file name. An image will be rendered for each camera in the cameras list.

phxfdSaveAnimPreview  nodes  string[]  startFrame  int  endFrame  int  merge  int  filename  string cameras  string[]

The same as phxfdSaveFramePreview, but allows you to specify a range of frames to render instead using the default one.

phxfdConnectRenderGizmo

With two nodes selected, this command will assign the shape node as render gizmo for the simulator/foam node.

phxfdConnectGlassGizmo

With two nodes selected, this command will assign the shape node as glass geometry for the foam node.

phxfdConnectLiqGeometry

With two nodes selected, this command will assign the shape node as liquid geometry for the foam node.

phxfdSetPreviewLights

Assign the selected lights to the preview lights of the selected simulator node.

phxQuickSetup -preset(-p) int

Set up a Quick Simulation with the selected object. The available options are as follows:

0 - fire
1 - fuel fire
2 - explosion
3 - gasoline explosion
4 - large smoke
5 - cold smoke
6 - cigarette smoke
7 - candle
8 - clouds

9 - tap water
10 - milk
11 - beer
12 - coffee
13 - honey
14 - liquid chocolate
15 - blood
16 - paints
17 - ink in water
18 - waterfall
19 - ocean

phxfdAbout

Returns a string with the exact Phoenix version installed.

phxfdCopyrights

Returns a string with all credits and copyrights for Phoenix FD and all 3rd party software used.

...

Example command line to launch Maya batch:

...

render

...

-r

...

vray

...

-preRender

...

"phxfdBatchSim(\"PhoenixFDSimulator1\")"

...

-noRender

...

phx_simple.ma

Example command line calls to initialize Maya Batch and start a Phoenix simulation:

...

cd

...

"C:\Program

...

Files\Autodesk\Maya2017\bin"

...

...

mayabatch.exe

...

-file

...

"D:\PHOENIX_QA\batchSimScene.ma"

...

-command

...

"phxfdBatchSim(\"PhoenixFDSimulator1\")"

        

...


Option Vars

...

Maya Option Vars

optionVar -sv "PhoenixFD_cachePath" string

Set the current cache path that will be used with the template path names.

optionVar -iv "PhoenixFD_safemode" number

Run Phoenix in safe mode. This will turn off the shading preview when loading new scenes to prevent display problems.