|
-
Dec 21st, 2002, 11:34 PM
#1
Thread Starter
Junior Member
I need help with .x files!
I need to be able to load and save their data, so... (PS I am using VB6, DX8)
* I have found functions that I can use to get/set the raw vertex data from a D3DXMesh object, which is a start. However, this does not preserve the submesh information. How can I get/set this, or is it possible to do so?
* If it isn't possible, then how could I read in a .x file myself in order to load up a 3d mesh into a custom class object that I would write for this? The mssdk reference material only helps to make this more confusing to me. In other words, how would I open up the .x file and parse the data?
If the first one is possible, I would really prefer it, as it would be a lot easier for me.
Note that once I have this data, I am writing it to my own binary resource file and then reading it in later. I can already handle the materials and the textures, so it is just the 3d data itself (and particularly the submesh data) I am worried about.
-
Dec 22nd, 2002, 01:59 AM
#2
Frenzied Member
D3DXMesh.LockAttributeBuffer is the way to get that information. Have fun using it in VB, though.
Z.
-
Dec 22nd, 2002, 02:01 AM
#3
Frenzied Member
Ah, I spoke too soon. D3DXBaseMesh.GetAttributeTable looks to be a little bit friendlier to you VBers .
Z.
-
Dec 23rd, 2002, 04:35 PM
#4
Thread Starter
Junior Member
Well, that function seems that it should do exactly what I would want. However, when I tried it, I got back no data whatsoever - just a bunch of 0s. How does one use this function properly?
-
Dec 23rd, 2002, 04:55 PM
#5
Frenzied Member
No idea. I use my own formats =).
Z.
-
Dec 24th, 2002, 04:26 PM
#6
Fanatic Member
Zaei, have you done a 3ds to your format converter then?
-
Dec 24th, 2002, 06:10 PM
#7
Frenzied Member
Originally posted by petrus
Zaei, have you done a 3ds to your format converter then?
ASE, at the moment, not 3ds.
Z.
-
Dec 24th, 2002, 06:12 PM
#8
Fanatic Member
-
Dec 24th, 2002, 09:44 PM
#9
Thread Starter
Junior Member
Actually, it doesn't have to be .x files for me; any widely-accepted object format (*.dxf or *.obj for instance) would do. I was concentrating on .x files because DirectX has native support for them. Once I have the data, I will basically be using my own file format as I will simply be packing the pertinant data into my custom binary resource files. So could anyone point me in the direction of a tutorial or such that would explain how to load one of these such formats (preferably one that's relativly straightforward to understand)? Thanks a bunch.
-
Dec 24th, 2002, 10:18 PM
#10
Fanatic Member
It's even hard to find a tutorial about loading X-files..
-
Dec 27th, 2002, 09:00 PM
#11
Thread Starter
Junior Member
Please? I'm really in a bind here! I can't continue with my game until I get this working!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|