Collision Detection
Physics-based collision detection can be used in scenes with particles. Physics calculations are done for the particles and objects in the scene and the mutual effects based on their interactivity are determined.
Setting Up Collision Detection
- Create a Particle Emitter following the steps in Generating Particles
- From the Toolbox: Create Tab, Plugins Group select menu Particle Physics > Physical Object Initialization.
Use the Browser to locate the newly created physical [physical - Particle Physics] Part.
- From the Toolbox Create Tab: Objects Group create a Sphere.
Place the Sphere you created into the physical [physical - Particle Physics] Part.
- Select the Sphere, then from the Browser pop up menu Attributes select Physics Settings. From the Material pop up menu select Air.
- Select menu View > Motion to display the Motion Window. From the Motion Window, click the Play button. Check the animation from the Perspective View.
By setting the sphere's material to Air in the Physics Settings dialog, the collision detection causes it to float upwards.
If you set the material of the Sphere to Wood instead, it moves downward as if falling.
Setting Up Collision Detection for Bouncing
- Using ShadeExplorer, select the file from the category Documentation > Plugin Manual > PM_particlephysics01.shd.
- From the Toolbox: Create Tab, Plugins Group select menu Particle Physics > Physical Object Initialization.
Next, in the Browser move the Sphere and Closed Line objects into the newly created physical [physical - Particle Physics] Part.
- Select all the closed line objects that make up the walls and floor, select Browser menu Attributes > Physics. In the Object Physics Settings Dialog Box turn off Receive Force and click OK.
- Select the Sphere, and in the Browser select Attributes > Physics Settings... In the Object Physics Settings Dialog Box set the Basic Shape pop-up menu to Sphere, and Material pop-up menu to Wood and click OK.
- Select menu View > Motion to display the Motion Window. From the Motion Window, click the Play button. Check the animation from the Perspective View.
Because the walls and floor were set not to receive the force of other objects, they stand rigid when the sphere collides into them. On the other hand, the sphere receives the force of the walls and bounces off them.
Setting Up Collision Detection With Initial Velocity
- Using ShadeExplorer, select the file from the category Documentation > Plugin
Manual > PM_particlephysics02.shd.
- Select Particle Physics > Physical Object Initialization from the Create menu.
A new Particle Physics (Physics Object) part is created in the Browser.
- Select the closed line object that functions as the floor in the Figure window, and select menu Attributes > Physics Settings.
Clear the Receive Force checkbox and click OK.
- Now select the sphere in the Figure window and again select Attributes > Physics
Settings.... From the Basic Shape pull-down menu choose Sphere, and from
the Material pull-down menu choose Wood.
Set the Initial Velocity to 0, 3 and 5 from left to right. These values are the velocity, in meters per second, of the object's initial velocity in the X, Y and Z directions respectively.
- Select menu View > Motion to display the Motion Window. From the Motion Window, click the Play button. Check the animation from the Perspective View.
Because we set the initial velocity of the sphere, its speed at the start of the animation causes it to collide with the blocks as if being thrown.
Turning the Physics Preview On/Off
The Particle Preview Button on the Control Bar can be cleared if you do not wish to draw the wireframe preview for physics calculations.
The Particle Preview Button does not affect rendering.NoteIf the Particle Preview Button is not visible on the Control Bar, right-click on the Control bar (Win) | Control key + click (Mac) to show a pop up menu to set the visibility.