In article <8f859f24-a853-497d-879e-d708bccf7
...@d45g2000hsc.googlegroups.com>,
jason.hei
...@gmail.com <jason.hei
...@gmail.com> wrote:
>I was wondering if anyone has recommendations as to an easy method of
>moving elements of a 3D model. For example a rudder on a plane. I have
>written my own 3ds file format parser and openGL renderer which works
>for static models, so i could have a model of a plane, and then
>individual models for each of the "moveable" elements.
Disclaimer: I'm more of a programmer, not an artist. However, to my
knowledge, in most 3D packages, you can set up a hierarchy of parts of
the model. For example, a tank may have a separate part for the
turret, which can rotate. Or, bipedal humans will have two legs, each
of which has a bunch of separate pieces. These are all part of the
model's whole, but due to the hierarchy, they can be manipulated
separately.
This way, the rudder on a plane is just the same as the foot on a
human -- part of the model, but can be moved independently. What you
should do is two pronged: (1) use your modeling software to create a
model with multiple pieces. (There are probably several example files
in its tutorials section.) (2) Make your graphics code able to read
and display such files. Once you can do that, then you can hook up
some sort of abstraction layer, so that your game can say "rotate
rudder 5 degrees left" and that turns into the appropriate matrix
applied to the rudder's piece.
Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein