Sign in to follow this  
Ksingh30

.x files

Recommended Posts

yes.

[edit] I was going to leave it at that, but if you want something more than a one word answer, you're going to have to be more specific. Sorry, I can't help you any more than that.

Share this post


Link to post
Share on other sites
I think what Ksingh30 means is, is it possible to say have a gun and an enemy in one *.x file then once loaded is itpossible to sepperate them and use them as seperate objects. I dont know the answer im just explaining what i think Ksingh30 is asking.

Share this post


Link to post
Share on other sites
Yes iti is possible. Different frames may have different meshes. The catch is that you don't use D3DXLoadMeshFromX to load mesh. You can either use D3DXLoadMeshHierarchyFromX or parse file yourself like in documentation sample.

Or you can always parse it youself.

The reason for this is that D3DXLoadMeshFromX will concantenate all meshes in file in one mesh. If you, however, decide to load frame hierarchy yourself, you can get all meshes individually in tree like structure

Share this post


Link to post
Share on other sites
There's a good book called Anvanced Animation With DirectX (Amazon). It has a lot of code and explanations on this.

The code for loading multiple objects is quite large. I've made an example of it, but documentation would help better.

The thing is you can create your own template and store custom data in X file.

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