Jump to content
  • Advertisement
Sign in to follow this  
gheeta

OpenGL 3D model

This topic is 5414 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

How I split my 3D car model into few hierarchy and then load it separately to opengl back to the appropriate car model.Plz tell me where I can find source code to do this

Share this post


Link to post
Share on other sites
Advertisement
You'll need to use your modelling software to split your model into different parts. You'll also need to add placeholders for wheels, and other parts which are duplicated (a placeholder can be as simple as a small box with an appropriate name), and you'll need to use your modelling software's linking tool to link all the parts together into a hierarchy. To load the model, you will need a hierarchical scene graph (I'm afraid I don't know any links for this off-hand, anyone else?). When you load the model, load in all the parts hierarchically (ie. use a recursive function to load the parts of the model), then look for placeholders, and insert an instance of the part it references at that position. Also, don't forget that OpenGL plays no part in model loading; all it does is render the model.

This is a very brief (and therefore incomplete) description of complex model loading. Learn how to load a simple file format first. I started with Quake III's MD3 format (there's a tutorial on that one over at www.gametutorials.com, and the MD3 format is hierarchical to an extent, it uses the legs model as a base, and has "tags" which show where the torso, head and weapon models should be attached). Good luck...

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!