3D model

Started by
0 comments, last by iNsAn1tY 19 years, 7 months ago
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
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...
My opinion is a recombination and regurgitation of the opinions of those around me. I bring nothing new to the table, and as such, can be safely ignored.[ Useful things - Firefox | GLee | Boost | DevIL ]

This topic is closed to new replies.

Advertisement