Click options for additional
examples and animations

PhysX Shape Operator

Path: Particle View > Add or select PhysX Shape.

Use the PhysX Shape operator to define the particle shape for collision purposes during a physics simulation. Along with the PhysX World operator, the PhysX Shape operator is necessary in order to have a simulation. Also, place the PhysX Shape operator after the shape operator in the event.

Note: In general, place all PhysX operators above a PhysX World operator in an event, so the PhysX properties defined by the operators are known to the simulation engine before the simulation cycle starts.

See also PFlow Collision Shape (WSM) Modifier.

Interface

Collide As - Specifies the shape to use for collision purposes during the simulation. The choices are:

  • Box - This is the simplest shape, so it allows for the fastest simulation, at the cost of accuracy. In many cases, you can get away with using the Box shape for testing the simulation, but should then switch to one of the others for the final rendering.

  • Capsule - Uses a capsule shape.

  • Convex Hull - Creates a bounding mesh that is close to the particle shape without permitting any concave surfaces, such as the area between the top surface of the teapot spout and the teapot.

  • Sphere - Uses a spherical shape for collision.

Note: Like the particle shape, the collision shape specified here persists throughout the particle flow, even when particles move to other events. Also, the collision shape, once defined, cannot be altered by a different PhysX Shape operator in a successive event.

Display As - Specifies how to display the Collide As shape. The choices are:

  • None - The collision shape is not displayed.

  • Shaded - The collision shape is displayed as a shaded mesh; this is visible only in shaded viewports. In wireframe viewports, the shape is displayed as a wireframe.

  • Wireframe - The collision shape is displayed as a wireframe in all viewports.

Collision Shape Size group

This group is unavailable when Collide As is set to Convex Hull, for which you use the Convex Hull Generation group settings instead (see following).

Conform To Particle Shape - When on, automatically sets each collision shape to fit and align with its particle. When off, you can use the remaining controls in this group to specify the collision-shape dimensions explicitly. The available controls depend on the Collide As setting:

  • Radius/Width/Length/Height - For Box, set the Width, Length, and Height; for Capsule, set the Radius and Length; and for Sphere, set the Radius.

You can set scaling as a percentage of the explicit dimensions, or based on an existing scale value in the event:

  • Scale % - Acts as a multiplier of the existing dimensions. So, for example, with the Box setting, you can set the proportions with Width/Length/Height, and then the actual size with Scale %.

  • Use Shape Scale Factor - Adjusts the scaling of the collision shape based on a scaling value earlier in the event, such as the Scale % setting in the Shape operator.

Convex Hull Generation group

This group is available only when Collide As is set to Convex Hull.

Weld Threshold - Use this setting to reduce the mesh resolution of the collision shape by welding the particle-shape vertices together.

Inflate Width - Increases the shape evenly on all side by envelope layer.

Scale Margin % - To speed calculation of the convex hull for particles with different shapes and/or sizes, PhysX Shape can batch particles with close scale values into groups, and calculate the convex hull data once per group with similar scale value. The Scale Margin setting defines the scale difference for particles to be in different groups.

Bounce and Friction group

Note: These settings determine how particles interact with other elements in the simulation (other particles, deflectors, the ground), so are meaningless in isolation. To determine the actual value for an interaction, the software takes the average of the properties of the interacting elements.

Restitution - The amount of energy each particle retains after a collision. Typically this produces a bouncing effect. Setting this to 1.0, the maximum value, potentially results in a condition that satisfies Newton's third law: To every action there is an equal and opposite reaction.

When Restitution is close to 1.0, the bounce effect is pronounced, but as a result, not much energy is dissipated during a collision, and the dynamics solution might lack stability. Use values close to 1.0 at your own risk: when you have a small number of colliding objects, and they don't bundle together.

Static Friction - The force that resists motion between two non-moving surfaces (particles and the ground or other particles).

Dynamic Friction - The force that resists motion between two moving surfaces (particles and the ground or other particles).

Mass group

Particle mass can be defined by a direct value, or as a density  –  this way, particle mass is calculated as a product of particle volume and a density value. Also, particle mass can be calculated by a Data Operator since with a Data Operator it's possible to define particle mass on per-particle basis. To define (and read) particle mass with a Data Operator, you can use Output PhysX and Input PhysX sub-operators.

Note: While you can animate the Value or Density setting for particle mass, this does not cause particle mass itself to change during the animation. Rather, the current setting when a particle enters the event containing the PhysX Shape operator determines its mass throughout the event. To animate particle masses within an event, use a Data operator in the event containing an Output PhysX sub-operator set to the Mass option, and set Mass to From Mass Channel (see following). Particle Flow Tools: Box#3 is necessary for this.

Choose a method for determining particle mass:

By Value - Specifies the mass of each particle explicitly, regardless of size.

By Density - Uses the Density value as a multiplier of the particle volume, so that larger particles have greater mass.

From Mass Channel - If you use Particle Flow Tools Box#3, you can define particle mass per particle with a Data Operator. To define (and read) particle mass with a Data Operator, you can use Output PhysX and Input PhysX sub-operators included with this software.

Shape Interpenetration group

Specifies the degree to which particles can interpenetrate before collision is detected.

Tolerance - The distance by which particles can interpenetrate. Two particles will interpenetrate by the sum of their Tolerance values. If your simulation jitters, increasing the Tolerance value might improve the animation.

Generate Data Channel - To define the Tolerance parameter on per-particle basis, turn on Generate Data Channel and use a Data operator with the Input PhysX and Output PhysX sub-operators set to use the Interpenetration Tolerance option. Also, with a Data operator you can animate the Tolerance value by animating (changing) the data-channel values. Particle Flow Tools: Box#3 is necessary for this.


Collision Group - Use this setting for collision exclusions, as explained in the PhysX World Helper topic.