Sunday, June 13, 2010

Pinball Machine



Another combination of DOPs and CHOPs.

By using the Impact data that's created in a dynamics network when two objects collide, I created a graph in CHOPs that drives the size and color of the bumpers.

In the details view in DOPs, when two objects are colliding with each other, an Impact record will appear on each object involved. It will only appear on the frame where they touch, and will disappear until they interact again.

If you look at one object's Impact record, you can see object ID of the other object involved, the simulation time at which it took place, etc. The main piece of data I used in CHOPs from the record was the flags data, which is just "flagging" that the data exists and is set to a value of zero.

After bringing the raw Impact flags to CHOPs using a Dynamics CHOP, I needed to make some math adjustments and then record the graph.

Then I added a Spring CHOP to it and exported it to the bumpers' scale, ....

and in another branch use a Lag CHOP and bring it to the bumpers' color.


RBD vs ODE
I later converted all of the objects in the simulation into ODE objects for more accurate results. I then realized that when using the ODE solver, you cannot create Impact data. So later I only used the ODE solver for the pinballs and used the original RBD solver for the bumpers. So now the bumpers were able to receive Impacts.