Jump to content
  • Advertisement
Sign in to follow this  
ajm113

How do they create dynamic parts of a model in games? (Vehicles, Eyes)

This topic is 3798 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by ajm113
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.
It'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.

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.

Share this post


Link to post
Share on other sites
Thanks, I understand now, I knew it had too do something with the bones and their names.

I appreciate your useful reply, thanks again!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!