Saturday 18 December 2010

Developing a Script

Having made a shatter that fundamentally worked with a reduced number of shards, the time could now be invested in solving the problem for any number of shards.

Effectively the only thing which was required to be done was to alter the collision layer. This is a relatively simple task in scripting. However I purchased a tutorial which gives a very detailed rigid body solution. Not only does the script alter collision layers, it also has options to alter initial velocities/rotations between a random range.

After listening in on what the script set out to do- i.e the pseudo code, I stopped the tutorial and continued to make the entire script from scratch with only a few parts cross verified (usually to do with graphic interface).  One way to substantiate this is that the tutorial was written in MEL, where as I program mainly in python and therefore the script can not be directly copied with out a fundamental understanding of scripting.

Having set out to do this, I created the entire script successfully and eliminated all the problems I encountered before. Here are a few tests that demonstrate the progression of a basic test. Since Maya finds the shatter effect a very difficult calculation, I decided to increase the shard count progressively.

I also incorporated a turbulence field or radial field along side the gravity field.


Shard Count: 15         field: turbulent and gravity



Shard Count: 50         field: turbulent and gravity



Shard Count: 70         field: gravity and radial



Shard Count: 70         field: gravity and radial          (Animated camera)

No comments:

Post a Comment