Jump to content
  • Advertisement
Sign in to follow this  

Need advice on how to organize model components

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

Hi, I'm trying to add models support in my engine, with animations and everything, but I want to hear a few opinions about how to organize them better. I consider the following model components: - mesh = a geometry buffer - material = the material/shader to use with a mesh - skeleton = bones hierarchy - animation = a few channels with transform keys to apply on some or all bones The model has one skeleton, optional animations, and some model parts, each with a mesh and a material (these are separated by material differences and game logic needs to hide or show parts of the model). The issue is how to store these components with respect to the following features: 1 be able to share components as files between more models like one animated skeleton with various mesh costumes, or only different materials 2 be able to create various model instances at loadtime, by combining different components like creating a lot of custom soldiers with various heads, bodies, etc. 3 be able to change components at runtime like when you need to change a material or a mesh on one instance of a model All these features are quite useful, but it looks difficult to support all of them in a simple and clear system. The idea of sharing components is to avoid duplicating data on the disk and in memory. There can be a lot of animations and maybe you only need to variate the texture per model instance. So, please let me know how do you have your models organized! In what degreed do you support the features mentioned above? Do you have the skeleton and anims in one file and all the meshes in another one, like Ogre? Do you have the materials as separate files - this allows you to extend the complexity of the materials, or edit them, without having to re-export the model. What sort of models manager do you have, to avoid loading a model every time you need to create an instance? Thanks! Alex

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!