How do they create dynamic parts of a model in games? (Vehicles, Eyes)
I want to know how game companies create something like a vehicle that has dynamic parts like a gun attached to it on the side like Unreal Tournament or say Team Fortress 2 eyes that look at your foes when you get close.
Another example is Flight Simulate with rotating gear and propellers that move on a user command.
I know they create the hole model first the export the selected model parts like the gun and then make it it's own model file for the vehicle. Then do some coding to it, but thats the part that gets me is how do they "attach" it and make it work on user command.
Quote:Original post by ajm113It's a feature of the game engine, so it really depends on the particular engine that you are using... E.g. in the Source engine (TF2) you would use the attachment point system.
I want to know how game companies create something like a vehicle that has dynamic parts like a gun attached to it on the side like Unreal Tournament or say Team Fortress 2 eyes that look at your foes when you get close.
I know they create the whole model first the export the selected model parts like the gun and then make it it's own model file for the vehicle. Then do some coding to it, but thats the part that gets me is how do they "attach" it and make it work on user command.
Usually models are animated using a hierarchy of nodes/joints (which can act as "attachment points"). Conceptually, to attach one model to another (e.g. a gun to a hand), you just take the root node of the gun and set it's parent node to the attachment point on the character. Now when the character's joint-hierarchy is updated, the gun will also be updated appropriately.
The code can control these nodes programatically (instead of via animation-playback). For example, you could look up the node which a characters eye is attached to (the modeller would give the node a name, such as "eye_left" to facilitate this), and then manually apply a rotation matrix to this node's transform.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement