Hello guys,
I was trying to see if it's possible to batch simulate with PhoenixFD/Maya, like batch rendering from the command line. I couldn't really find anything relevant in the docs.
The only thing I found is this, but it doesn't seem to work and tries to open Maya. Also, if it's possible (the batch simulation from command line), what would be the procedure with a simulation license on a node ? Is the best way to copy the project on this nodes hard drive (probably yes) or configure right away to cache the data on this nodes hard drive even if the project is on a distant drive ?
Phoenix is just a really good software, and we would really like to enhance the work.
Batch Scripting
PhoenixFD can do simulation in batch mode. Like inside the GUI, only one simulation can be run at a time. The batch commands are blocking, i.e. they will return the execution to the script after finishing. This can be used to script more complicated setups, like one simulator depending on the result of another. These commands can also be run inside the GUI, but will effectively block it for interaction. Once started, they can't be stopped. However, the simulation can run slightly faster.
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 FD simulation:
cd "C:\Program Files\Autodesk\Maya2017\bin"
mayabatch.exe -file "D:\PHOENIX_QA\batchSimScene.ma" -command "phxfdBatchSim("PhoenixFDSimulator1")"
I was trying to see if it's possible to batch simulate with PhoenixFD/Maya, like batch rendering from the command line. I couldn't really find anything relevant in the docs.
The only thing I found is this, but it doesn't seem to work and tries to open Maya. Also, if it's possible (the batch simulation from command line), what would be the procedure with a simulation license on a node ? Is the best way to copy the project on this nodes hard drive (probably yes) or configure right away to cache the data on this nodes hard drive even if the project is on a distant drive ?
Phoenix is just a really good software, and we would really like to enhance the work.
Batch Scripting
PhoenixFD can do simulation in batch mode. Like inside the GUI, only one simulation can be run at a time. The batch commands are blocking, i.e. they will return the execution to the script after finishing. This can be used to script more complicated setups, like one simulator depending on the result of another. These commands can also be run inside the GUI, but will effectively block it for interaction. Once started, they can't be stopped. However, the simulation can run slightly faster.
Batch Functions |
phxfdBatchSim node string Start simulating the specified node. The command will return when the simulation is over. |
phxfdStartBatch node string startFrame int endFrame int The same as phxfdBatchSim, but the second and third arguments override the default start/stop frame for the simulation. |
phxfdBatchRestore node string startFrame int Restore the simulation in batch mode. The second argument specify the frame from which the simulation must be restored. This is analogue to moving the time slider and clicking the "Restore" button. |
phxfdBatchResim node string waiting bool Start simulating in resimulation mode. If waiting is true, the Cache Waiting is turned on. |
phxfdBatchResimRestore node string startFrame int waiting bool Restore the resimulation in batch mode. The second argument specify the frame from which the simulation must be restored. This is analogue to moving the time slider and clicking the "Restore" button. If waiting is true, the Cache Waiting is turned on. |
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 FD simulation:
cd "C:\Program Files\Autodesk\Maya2017\bin"
mayabatch.exe -file "D:\PHOENIX_QA\batchSimScene.ma" -command "phxfdBatchSim("PhoenixFDSimulator1")"
Comment