Monday, October 25, 2010

3D Modularity and Animations

I spent some time on this but still not sure how to do it in XNA... the idea is to create some

parentModel.AddChild(childModel);

function that adds (attaches) a child 3d model to other parent 3d model. The coordinates of the child would be relative to the parent's one. If

parentModel.childModel.Position

is changed it will do that in regards to the center of the parent model but not change the parentModel position itself.
Then the beauty of all of it would be that moving or rotating the parent by changing

parentModel.Position
parentModel.rotate

would move or rotate all those 2 models together as one. By combining children and parents and changing their relative positions (rotations) would enable us to code in C# some cool animations or build complex models like we were able to do in our other class CS2420 with C++ OpenGL http://eng.utah.edu/~dusatko/CS2420-EAE/hw6.html (video shot).

Another example would be the automobile model. The automobile has wheels that turn independently when the whole model is moving (preferably wheels turning faster when car speeds up)

No comments:

Post a Comment