Sign in to follow this  
xelanoimis

Need advice on how to organize model components

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this