PhysXPanel : ReferenceTarget

 PhysXPanel - superclass:ReferenceTarget; super-superclass:MAXWrapper - 35:0 - classID:#(721879680, 1682575996)

This class implements the "MassFX Tools" floating dialog.

Available in 3ds Max 2012 and higher.

Constructor:

PhysXPanel ...

While it is possible to create an instance of this class, it makes no sense to do so since the MassFX system creates its own instance for the actual MassFX Tools dialog.

Instead, use the PhysXPanelInterface interface to access the existing instance of the MassFX Tools dialog:

PhysXPanelInterface.instance

Properties:

Scene Settings rollout

Ground Plane controls

<PhysXPanel>.useGroundPlane BooleanClass default: true -- boolean

Get/set the state of the "Use Ground Plane" option.

When set to true, the XY ground plane will be used as a virtual collision object.

When set to false, no ground plane will be simulated.

<PhysXPanel>.groundHeight     Float    default: 0.0   --  float

Get/set the height of the Ground Plane in world Z units. Available in 3ds Max 2013 and higher.

Gravity group of controls

<PhysXPanel>.gravityMode     Integer    default: 2   --  integer

Get/set the state of the Gravity Mode radio buttons. Available in 3ds Max 2013 and higher.

Possible values are:

1 - No Gravity

2 - Directional Gravity (default)

3 - Gravity By Force Object

<PhysXPanel>.enableGravity BooleanClass default: true -- boolean

Get/set the state of the "Gravity Enabled" checkbox.

When set to true, the gravity force defined by the .gravityDirection and .gravity properties will be applied to the simulation.

When set to false, no gravity will be simulated.

<PhysXPanel>.gravityDirection Integer default: 3 -- integer

Get/set the state of the "Direction" radio button.

Possible values are:

1 - X

2 - Y

3 - Z (default)

<PhysXPanel>.gravity Float default: -386.221 -- float

Get/Set the Acceleration value in units/second². When 1 Generic Unit = 1 inch, the default value is -386.221 inches/second² which is equivalent to 9.81 m/s².

<PhysXPanel>.gravityObject     UndefinedClass    default: undefined   --  node

Get/set the Gravity Force object used when .gavityMode is set to 3 - Gravity By Force Object. Available in 3ds Max 2013 and higher.

Rigid Bodies group of controls

<PhysXPanel>.subStepsInteger default: 3 -- integer

Get/set the number of sub-steps per frame.

The number of simulation steps performed between each graphical update is determined by the formula: (Substeps + 1) * Frame Rate. A frame rate of 30fps with 0 substeps results in 30 simulation steps per second, 1 substep results in 60 steps per second, 2 substeps results in 180 simulation steps per second, and so on. The maximum value of Substeps is 159, which results in 4,800 simulation steps per second of animation at 30fps. Using a higher Substeps value produces greater precision in collision and constraint results, at a cost to performance.

<PhysXPanel>.solverIteration Integer default: 30 -- integer

Get/set the number of solver iterations per step.

This is a global setting for the number of iterations the constraint solver performs when enforcing collisions and constraints. Higher values might be necessary when the simulation uses many constraints, or the tolerance for joint errors is very low. Values higher than 30 are generally unnecessary.

<PhysXPanel>.enableCCD BooleanClass default: false -- boolean

Get/set the state of the "Enable High Velocity Collisions" checkbox. "CCD" stands for "Continuous Collision Detection", a method which uses a simplified geometry hull covering the trajectory of a fast moving rigid body object between two sample steps to ensure it collides correctly with other rigid bodies in its way.

<PhysXPanel>.shapePerElement     BooleanClass    default: true   --  boolean

Get/set the state of the "Generate Shape Per Element" checkbox. Available in 3ds Max 2013 and higher.

Advanced Settings rollout

Sleep Settings group of controls

<PhysXPanel>.sleepThresholdsAutomatic Integer default: 1 -- integer

Get/set the state of the Sleep Mode radio buttons.

Possible values are:

1 - Automatic - MassFX automatically calculates reasonable sleep threshold values for both linear and angular velocities above which sleep will be applied. To do so it uses a heuristic, or experience-based, method.

2 - Manual - use the .sleepSpeed and .sleepSpin properties to define the linear and agular speed thresholds for an object to go into "sleep" mode.

<PhysXPanel>.sleepEnergy     Float    default: 1.9685   --  float

Get/set the value of the "Speed Energy" property. It is used when the .sleepThresholdsAutomatic property is set to 1 to determine the energy threshold below which the Rigid Body will go to "sleep" mode and will not be calculated anymore. Available in 3ds Max 2013 and higher.

Other than the .sleepSpeed and .sleepSpin values used in 3ds Max 2012, the sleepEnergy threshold also takes into account the mass of the object in additiona to its linear and angular speed to determine whether it should be calculated.

<PhysXPanel>.sleepSpeed Float default: 1.9685 -- worldUnits

Get/set the value of the "Min. Speed" property exposed to the UI in 3ds Max 2012. It is used when the .sleepThresholdsAutomatic property is set to 1 to determine the linear speed threshold below which the Rigid Body will go to "sleep" mode and will not be calculated anymore. The value is in units/second.

<PhysXPanel>.sleepSpin Float default: 5.0 -- float

Get/set the value of the "Min. Spin" property exposed to the UI in 3ds Max 2012. It is used when the .sleepThresholdsAutomatic property is set to 1 to determine the angular speed threshold below which the Rigid Body will go to "sleep" mode and will not be calculated anymore. The value is in degrees/second.

High Velocity Collisions group of controls

<PhysXPanel>.ccdMinSpeedAutomatic Integer default: 1 -- integer

Get/set the state of the "High Velocity Collisions" automatic/manual modes radio buttons.

Possible values are:

1 - Automatic

2 - Manual

<PhysXPanel>.ccdMinSpeedThreshold Float default: 5.0 -- float

Get/set the "Min Speed" threshold value.

This property is used when .ccdMinSpeedAutomatic is set to 2 and .enableCCD is set to true.

Bounce Settings group of controls

<PhysXPanel>.bounceMinSpeedAutomatic Integer default: 1 -- integer

Get/set the state of the Bounce Min. Speed Method which determines when rigid bodies bounce off each other.

Possible values are:

1 - Automatic - MassFX uses a heuristic algorithm to calculate a reasonable minimum speed threshold above which to apply bounce.

2 - Manual - To override the heuristic value for speed, choose Manual and set the desired Min Speed value:

<PhysXPanel>.bounceMinSpeedThreshold Float default: 5.0 -- float

Get/set the Bounce Min Speed threshold.

Rigid bodies in the simulation moving faster than this speed (specified in units/second) will bounce off one another as part of a collision. Setting this value too high will cause fast-moving objects not to bounce upon colliding with another object. Setting this value too low will cause more slow-moving objects to bounce around the scene, reducing simulation performance and possibly causing jittering. Setting this value to 0.0 enables bouncing for all moving objects.

Engine rollout

Options group of controls

<PhysXPanel>.useMultiThread BooleanClass default: false -- boolean

Get/set the state of the "Use Multithreading" option.

When set to true, the simulation will be multi-threaded to increase performance.

<PhysXPanel>.useHardwareScene BooleanClass default: false -- boolean

Get/set the state of the "Hardware Acceleration" option which is available when supported hardware has been detected.

When set to true, the simulation will use hardware acceleration to increase performance.

Simulation Settings rollout

Playback group of controls

<PhysXPanel>.onLastFrame Integer default: 1 -- integer

Get/set the state of the "Playback>On Last Frame" radio buttons.

Possible values are:

1 - Continue Simulation - The simulation continues to run even after the time slider reaches the last frame.

2 - Stop Simulation - The simulation stops when the time slider reaches the last frame.

3 - Loop Animation and... - Repeats the animation when the time slider reaches the last frame and then acts according to the .loopAnimation property (see below).

<PhysXPanel>.loopAnimation Integer default: 1 -- integer

Get/set the state of the "Loop Animation and..." radio buttons.

Possible values are:

1 - Reset Simulation - The simulation resets and the animation loops back to the first frame when the time slider reaches the last frame. This is useful for watching the same simulation multiple times in a row to analyze the results.

2 - Continue Simulation - The simulation continues running while the animation loops back to the first frame when the time slider reaches the last frame. This is useful for short looping animations (such as a character's walk cycle) when you want the simulation to continue across the boundary of the looping

Rigid Bodies rollout

Physical Meshes group of controls

<PhysXPanel>.physicalMeshes Integer default: 1 -- integer

Get/set the state of the "Physical Meshes" drop-down list.

Possible values are:

1 - Show Only For Selected - physical meshes will be displayed only for selected rigid body objects.

2 - Show All Physical Meshes - all physical meshes will be shown regardless of selection.

3 - Hide All Physical Meshes - no physical meshes will be shown.

MassFX Visualizer rollout

Options group of controls

<PhysXPanel>.visualizerEnable     BooleanClass    default: false   --  boolean

Get/set the state of the "Enable Visualizer" checkbox.

<PhysXPanel>.visualizerScale     Float    default: 1.0   --  worldUnits

Get/set the value of the "Scale" spinner. This controls the relative size of the viewport-based indicators, such as axes.

Object Properties group of controls

<PhysXPanel>.bodyAxis     BooleanClass    default: true   --  boolean

Get/set the state of the "Local Axis" checkbox. When set to true (default), the local axes of the Rigid Body objects will be visualized in the viewports during simulation.

<PhysXPanel>.bodyLinearVel     BooleanClass    default: false   --  boolean

Get/set the state of the "Object Linear Velocity" checkbox. When set to true, the linear velocity of the Rigid Body objects will be visualized in the viewports during simulation.

<PhysXPanel>.bodyAngularVel     BooleanClass    default: false   --  boolean

Get/set the state of the "Object Angular Velocity" checkbox. When set to true, the angular velocity of the Rigid Body objects will be visualized in the viewports during simulation.

Joint Properties group of controls

<PhysXPanel>.jointLocalAxis     BooleanClass    default: false   --  boolean

Get/set the state of the "Local Axis" checkbox. When set to true, the local axes of the Joints will be visualized in the viewports during simulation.

<PhysXPanel>.jointWorldAxis     BooleanClass    default: false   --  boolean

Get/set the state of the "World Axis" checkbox. When set to true, the world axes of the Joints will be visualized in the viewports during simulation.

<PhysXPanel>.jointLimits     BooleanClass    default: false   --  boolean

Get/set the state of the "Joint Limits" checkbox. When set to true, the limits of the Joints will be visualized in the viewports during simulation.

Contact Markers group of controls

<PhysXPanel>.contactPoints     BooleanClass    default: false   --  boolean

Get/set the state of the "Contact Points" checkbox. When set to true, the positions of Rigid Body collisions will be visualized in the viewports during simulation.

<PhysXPanel>.contactNormal     BooleanClass    default: false   --  boolean

Get/set the state of the "Contact Normals" checkbox. When set to true, the normals of Rigid Body collisions will be visualized in the viewports during simulation.

<PhysXPanel>.contactForce     BooleanClass    default: false   --  boolean

Get/set the state of the "Contact Force" checkbox. When set to true, the magnitude of Rigid Body collision forces will be visualized in the viewports during simulation.

Collision Markers group of controls

<PhysXPanel>.collisionShapes     BooleanClass    default: true   --  boolean

Get/set the state of the "Collision Meshes" checkbox. When checked (default), the Rigid Body Meshes of all simulated objects will be displayed in the viewports.

<PhysXPanel>.collisionCompounds     BooleanClass    default: false   --  boolean

Get/set the state of the "Collision Groups" checkbox.

<PhysXPanel>.collisionSpheres     BooleanClass    default: false   --  boolean

Get/set the state of the "Collision Spheres" checkbox. When checked, the bounding spheres of the Rigid Body objects will be displayed. The bounding spheres can be used to determine whether two Rigid Bodies should be checked for collision at Rigid Body Mesh level. If the two spheres don't intersect, no precise and time consuming collision detection needs to be performed.

Other properties

The following properties are not exposed to the UI:

<PhysXPanel>.skinWidth Float default: 0.0393701 -- worldUnits
<PhysXPanel>.useFirst BooleanClass default: true -- boolean
<PhysXPanel>.exporterMode     Integer    default: 0   --  integer

Get/set the Exporter mode. Available in 3ds Max 2013 and higher.

<PhysXPanel>.pluginBuild     String    default:"2.80.1129.0299"   

Get/set the PhysX Plugin version string. Available in 3ds Max 2013 and higher.

<PhysXPanel>.useAdaptiveForce BooleanClass default: true -- boolean

Get/set the Use Adaptive Force mode. Available in 3ds Max 2013 and higher.

<PhysXPanel>.destructionRadius Float default: 1.0 -- float

Get/set the Destruction Radius value. Available in 3ds Max 2013 and higher.

<PhysXPanel>.destructionDamage Float default: 1.0 -- float

Get/set the Destruction Damage value. Available in 3ds Max 2013 and higher.

<PhysXPanel>.destructionMomentum Float default: 1.0 -- float

Get/set the Destruction Momentum value. Available in 3ds Max 2013 and higher.