Maya Plugin Power: Collision, Gravity, and Secondary Debris
If you had any trouble following to this point, this scene file is saved as gravity_bricks2.mb. One final interesting step will round off this little simulation nicely. Blast Code can generate what is called secondary debris. This is quite easy to do and really adds that much-needed second layer of flying fragments. Select the BLayer1 node in the Outliner window and go to the Attributes window. Under the Slab1 tab is a section called Secondary Debris Attributes. Set the attributes as shown in Figure 8. Don’t forget to toggle the Secondary Flag on. With that accomplished, let’s turn our attention to the Explosive1 tab in the Attributes window. The Secondary Flag must be selected here as well. This is shown in Figure 9.
Set the Timeslider to about 120 frames and run the simulation. Stop it at around frame 40. You will notice that secondary debris has indeed been generated. It is new geometry in the scene and currently has no shader associated with it. Drag and drop the red brick shader, associated with the rest of the wall, on it as well. Rewind the simulation to the beginning and rerun it. Set the Timeslider to 200 frames. Also, select the ground plane and toggle it invisible. It won’t affect the collisions, but it will make the fragments easier to see. Run the simulation to frame 120. Figure 10 shows the secondary debris animation at frame 120.
![[FIGURE 8] The Secondary Flag on and attributes set as the first step toward added realism.](http://www.awn.com/files/imagepicker/1/MayaPlugin08-fig8-41.jpg)
![[FIGURE 9] The Secondary Flag toggled on under the Explosive1 tab.](http://www.awn.com/files/imagepicker/1/MayaPlugin09-fig8-42.jpg)
![[FIGURE 10] With the ground plane made invisible, you can clearly see the advantage to using secondary debris for creating added realism.](http://www.awn.com/files/imagepicker/1/MayaPlugin10-fig8-43.jpg)























qswBrSop
Post new comment