• Advertisement
Sign in to follow this  

keeping mesh hierarchy VS NOT keeping it

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

Right now I load all model with their hierarchies kept. But it begins to have a performance issue, and I wondering if not keeping the hierarchy will give any obvious performance boost.

 

also, is there any way to find out if the .X file contains animation or not, before calling D3DXLoadMeshHierarchyFromX?

Share this post


Link to post
Share on other sites
Advertisement
Unfortunately to do the sophisticated kinds of things you want, you will need to move away from the X file and associated loaders.

Technically you don't need all models to have their hierarchies kept, the hierarchy is only for animation, so if a static model (like a building exterior) had an animated component, like a flag waving in the wind, you would still need the hierarchy. And of course most actor's are going to need the hierarchy.

However for other types of models you can indeed pre-transform all the vertices and optimize the scene graph a bit. Search for Scene Graph Optimizers and Render Queue Sorting for reference.

EDIT: I don't know a programmatic way to detect AnimationSets in an X file, but if the X file is in text format, you could just parse for the word "AnimationSet". Edited by Steve_Segreto

Share this post


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

  • Advertisement