Jump to content

View more

Image of the Day

Isn't this a lovely apple tempart placeholder thing  #gamedev worth a #screenshotsaturday even I would say. https://t.co/fQH1d0ySIG
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

keeping mesh hierarchy VS NOT keeping it

2: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 Knight52   Members   

171
Like
0Likes
Like

Posted 16 January 2013 - 08:24 AM

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?



#2 Steve_Segreto   Members   

2054
Like
0Likes
Like

Posted 16 January 2013 - 07:13 PM

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, 16 January 2013 - 07:14 PM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.