• Advertisement
Sign in to follow this  

Model File Format Design Question.

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

Hey everyone. I have a question on my design for a model format that I am using to save out models from Maya. Currently my model format consists of: File Header Raw Model Data - Verts - Normals - UVs - Indices - Weights - Texture - Materials Bone Header - Joint Hierarchy Animation Header (multiple animations) - Keyframes - Joint matrix I am wondering if this format is to wasteful because it stores the joint hierarchy and animation data per model and some models may share them. Should i seperate the data into 2 files, model data, bone/animation data so the data can be used on different models? Or is there a better way?

Share this post


Link to post
Share on other sites
Advertisement
You could do with skeletal/animation data just like you're doing with textures. I assume you don't save the textures themselves within the file but the name/path of the texture. The same could be done with the skeletal/animation data. You'd have to make sure that the joint-vertex assignment is correct if you applay the same skeleton to multiple meshes. The necessary information could go into the model file.

Share this post


Link to post
Share on other sites
Yeah, I store the texture file path along with the model. Thanks for your input. I was just wondering what people's thoughts were about how to output the data efficiently and that would be flexible.

Share this post


Link to post
Share on other sites
if you plan on reusing the skeletal data across meshes than it is probably a good idea to separate it, and perhaps consider using a separate class to manage that data. for example, instead of just saying to open that specific skeletal file, you can ask the manager class..which will open it if its not already opened, or use the one that has already been opened...i think this is good for reusable textures too. its a tradeoff between speed and flexibility though. obviously the more you separate files the more disk reads you make...but also the less space you waste on disk with redundant data, and the more files you have to update whenever you change that data

Share this post


Link to post
Share on other sites
I store mesh data, node hierarchy (skeleton) and animation data in seperate formats. The actual format of the data is as close to the in-memory representation of that data as possible, for fast loading.

Share this post


Link to post
Share on other sites
Awesome, thank you so much for the feedback. I am going to go separate them right now. Again thanks for all the feedback

Share this post


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

  • Advertisement