Benchmarking a Simulation with MAXScript
ProfileTools is a hidden interface that you can access via MAXScript. It lets you see the amount of time it takes for the PhysX engine to calculate a frame or a range in a simulation.
This can help you to understand the toll imposed by certain settings in the engine, potentially leading to a better-optimized and more-versatile simulation.
Properties
.useProfileTools : bool : Read|Write
Methods
<float>getCalcTime <time>time
<float>getCalcTimeForInterval <time>timeStart <time>timeEnd
Usage & Examples
assign the PhysX World helper to a variable
PFX = $'PhysX World 01'
OK
check to see if ProfileTools is enabled
PFX.useProfileTools
false
enable profile tools
PFX.useProfileTools = true
true
check the simulation time for the current frame
PFX.getCalcTime currentTime
check the simulation time for the animation range
PFX.getCalcTimeForInterval animationRange.start animationRange.end