Friday 17 December 2010

Dynamics Tests 01: Shatter Effects

One of the most powerful scenes in our entire project is the shatter effect when our emperor statue crumbles into numerous pieces and then collapses to the floor when the audience finds out the emperor is dead. Since I had taken on the challenge of dealing with the majority of the dynamics effects, this was my chance to start experimenting with other various dynamics within Maya. One such effect is the shatter effect.

When I first started experimenting with shatter effects, I stumbled into serious problems. It seemed that the script which invokes a solid shatter was refusing to accept the geometry that I attempted to test.

I finally gathered resources from the internet that suggested that geometry should not have any history. Even after this I found that Maya would create the shatter, but when trying to run a gravity simulation, numerous errors would be returned in the script editor. If not maya would crash.

Trouble shooting this problem I discovered that the source of the problem was due to the collision layer. The collision layer is an essential part of rigid body dynamics which determines which geometry collides with which other geometry. If geometries are in the same layer (indexed numerically)- this means they will collide, if not- then they shall not.

So the question was why did the shattered materials crash Maya?

It is a common knowledge to those dealing with dynamics (and especially ones involving collisions) that no two objects should start touching/overlapping one another. This type of initial condition will cause maya to not simulate properly and even crash. How can maya work out the collisions between objects if they were overlapping. And obviously the shatter effect was causing this exact problem.

Knowing this was half way to finding the solution. All one would have to do is alter the collision layer on every geometry and they would be able to solve the problem for their simulation.

I did this initial test to make sure whether my logic was accurate. Here is my first shatter test with manually adjusted collision layers.


No comments:

Post a Comment