Concept / Updates / Breakdown
-This project was first worked out manually within Maya then translated into code. I commented the code heavily so the breakdown will not be too intensive.
-The first part creates the interface, checks if it excise, refreshes if it does… ect.
-The next procedure takes your ground plane and makes it a passive rigid body and makes it “live”. From there it selects the sketch particle tool allowing you to draw particles on the live object. -Next the code takes your selected objects and saves it as an array.
-The “meat” of the code is next, it creates an empty group to place the objects in. Then it counts the particles to know how many times to run the process. Then it gets the position of each particle as a vector to later use to place the object at. After that it selects a random object and duplicates it.
-Next if you selected to have it rotated or scaled the object will do so.
-The section of code after this is what I call a “dynamic solver”. Basically the object is made into an active rigid body and connected to gravity. It is then placed several units over the ground plane and dropped where the tessellation factor will solve any interpenetration problems.
-The basic solver finds the min and max value of the x and z of an objects boundary box. Then it divides it in half to find the center. After that the code finds the min value of the y and set the pivot point to this object. -The fine tuner works the same way as the dynamic solver only with more options. |