The APEX Explosion module is deprecated and may be removed in a future APEX release. The APEX Explosion module only supports PhysX 2.8.4 on Windows, so it may not be included in all APEX distributions.
The APEX Explosion library can be used to simulate various types of explosions. These include simple explosions or implosions, and shock waves that extend outward from the origin. The forces of the explosion can act on particles, cloth or rigid bodies. The PhysX actors that the explosion acts upon are controlled by the collision group that it is assigned too. The explosion forces can also be prevented from acting on actors in an area by creating an APEX Field Boundary actor around the area. Refer to the APEX Field Boundary Users Guide for details on creating field boundary exclusion areas.
APEX Explosion assets are authored using the generic APEX library editing capability of PhysXLab. See the PhysXLab documentation for details of operating the tools. To build an APEX Explosion asset the explosion type, the collision group name, and the various parameters that control the explosion characteristics such as the radius, velocity target of the explosion, and the strength of the noise forces in the explosion.
When an explosion actor is placed in a level an explosion icon will be placed at the location of the explosion along with various other graphics to display the explosions parameters. The following is an image of the explosion icon.
An explosion actors preview rendering can also include a the inner and outer spheres that control the size of the explosion. The outer sphere is rendered in red and the inner sphere is orange.
APEX explosion debug rendering consists of two principle items; the force fields shapes and the force vector arrows. The debug rendering displays both the force field include shapes and the force field exclude shapes. The inner and outer explosion field boundary spheres have debug rendering the same as the preview rendering.
The force field exclude shapes can be any of the basic shapes or compound shapes supported by the APEX Field Boundary library which include box, sphere, capsule, and convex mesh. By default exclude shapes are rendered in red.
APEX Explosion force field vector arrows display the direction and relative magnitude of the forces originating inside of the force field spheres. The following figure shows the debug rendering for an explosion.
The force arrows that are displayed range in length range from 10% to 90% of the grid spacing. To display the forces correctly they must be mapped to values that are 0.1 times the spacing to 0.9 times the spacing. If a force is zero no arrow is displayed. Normally force arrows are green and their length is linearly proportionally to the force. Note that all colors can be changed by the programmer. If the mapped force is less than 10% of the sample spacing value it is normally colored yellow and it is displayed as an arrow that is 10% of the spacing. If the mapped force is greater than 90% of the spacing it is normally colored red and the arrow length is 90% of the spacing range.