Project 2 (or is it 3?)
Group: Mark Kim, Chris Mizerak and John O'Laughlin
What we did:
Our video concept was to do a parody of the T.V. show Cops.
Technical Piece
My technical piece was to create a crash scene. Specifically I started out wanting to create a free form deformation plug-in.
I started out by creating a particle system with C++ in OpenGL. This allowed me to create a spring system and just test out some of the Physics I wanted to use. The code should be available online soon. One of the pitfalls of starting with C++ was trying to create models in OpenGL. I wanted to import models from Milkshape, but I quickly discovered that Milkshape's format was not compatible with connecting springs in the fashion that I desired. So, I was left with a particle system with crude models. Here's the physics spring model I used:
F = -ks(|L|-R) + kd( L*L)/|L| * L/|L|
Once that was done, I started writing a plug-in for Maya. Specifically I wrote a spring plug-in for Maya's physics system (MPxSpringNode). Since I had little knowledge of Maya, I did not realize that Maya had its own springs that I could use. Regardless of the duplication of effort, writing the plug-in was a good experience in understanding how to write a plug-in in general.
I imported a model that I wanted to use for the deformation into Maya. It was broken into several pieces, including a hood, front fenders and bumper. This gave me the flexibility to choose what pieces would be effected by the deformation. The first problem I had was not taking into account that I had absolutely no control over physics in Maya. Its a basic problem that everyone has when dealing with physics: you give up control for automation. Even setting the stiffness of the spring really high the model would still deform by a ridiculous amount. Further, since the hood and front bumper and fenders were not attached to the car itself, it would simply fly backwards and off the screen. See the runaway.avi
Without Springs
For our actually city we ended up using a different model than the one I was testing on. I thought it wouldn't be a big deal, but it was because the new model had a significantly increased polygon count, which threw a wrench into Maya's physics engine.
These are the first twelve frames of the model with springs.