Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / trying to understand the DirectX file format

Author
Message
jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 13th Jan 2008 01:23
ok, my original plan is to make a very simple rigging and animating software because i hate most others and some are just too darn expensive. so, i looked into learning the parts of the directx file format so that i could just load a .x file, rig it, animate it, and then add in the new directx code (assuming it is a text .x file).

i looked around and found this site:
http://local.wasp.uwa.edu.au/~pbourke/dataformats/directx/

and it was pretty useful, but not perfect, so i got psionic's dwarf model as a reference to look through...

i understand most of it, except for some of the matrix transforms and headers. i was hoping someone could explain them?

for example:
this created a frame for the base of the dwarf model:


and it seems most of the frame transform matrices are similar. what do each of these mean:
1.000000,0.000000,0.000000,0.000000,
0.000000,1.000000,0.000000,0.000000,
0.000000,0.000000,1.000000,0.000000,
these three lines are the same for practically all of the frames, what do they do?

0.000967,-0.001266,0.000000,1.000000;;
i think this one is the position of the frame, correct?
so is it, X,Y,Z,(what is this last value?)

and:

i dont understand what the values mean that are like: <6F0D123B-BAD2-4167-A0D0-80224F25FABB>.

and:

is the "middle" frame's position relative to the "base" frame's position, or are they all relative to the origin?

also, last but not least:

i just chose a random joint.
the only thing that i dont get here is, what is the last group of values? is it some matrix transform or something? (-2.038026,-2.592926,0.183448,1.000000;

hopefully someone can help

dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 13th Jan 2008 12:07
Quote: "these three lines are the same for practically all of the frames, what do they do?"


http://en.wikipedia.org/wiki/Matrix_(mathematics)

Quote: "i dont understand what the values mean that are like: <6F0D123B-BAD2-4167-A0D0-80224F25FABB>."


http://en.wikipedia.org/wiki/Hexadecimal

Quote: "is the "middle" frame's position relative to the "base" frame's position, or are they all relative to the origin?"


Think of the structure as a tree hierarchy, any branches get transformed by their parent and so on.

Quote: "the only thing that i dont get here is, what is the last group of values? is it some matrix transform or something?"


Yes.

jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 13th Jan 2008 16:24
Quote: "Quote: "these three lines are the same for practically all of the frames, what do they do?"

http://en.wikipedia.org/wiki/Matrix_(mathematics)
"


well, i understand matrix mathematics, but i dont understand why they are all the same value for all of the faces... seems useless.

Quote: "Quote: "is the "middle" frame's position relative to the "base" frame's position, or are they all relative to the origin?"

Think of the structure as a tree hierarchy, any branches get transformed by their parent and so on.
"


so then the answer to my question is that each position is relative to its parent, correct?

Quote: "Quote: "the only thing that i dont get here is, what is the last group of values? is it some matrix transform or something?"

Yes.
"


could you elaborate? i dont understand what values i'm supposed to put in their if i were to be making the file. at first, i thought it was just the same transform as the accompanying frame, but they dont match up at all.

dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 13th Jan 2008 20:45 Edited at: 13th Jan 2008 20:46
Quote: "well, i understand matrix mathematics"


Do you?

For example the matrix here:



This indicates anything within the frame will be scaled by 1.0 and be translated by 0.000967,-0.001266,0.0 with no rotation.

Quote: "but i dont understand why they are all the same value for all of the faces... seems useless."


All the frames may well use the same transformation matrix but they don't have to, it's like saying if I don't use the Offset/Scale/Rotate limb values it's useless, which isn't the case the model may not have needed their use.

Quote: "could you elaborate? i dont understand what values i'm supposed to put in their if i were to be making the file. at first, i thought it was just the same transform as the accompanying frame, but they dont match up at all."


I don't know anything about the way animations work in DX but I'd assume in that example the object uses bone based keyframe animation which means each bone has its own transformation matrix as they too can be translated, scaled and rotated.

FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 13th Jan 2008 21:20
Quote: " don't know anything about the way animations work in DX but I'd assume in that example the object uses bone based keyframe animation"


While I won't pretend I understand everything you guys posted I can confirm for a fact that Direct x 10 models do indeed use bone based keyframe animation since I make direct x models all of the time.
Also,if you check out some fo the free FPSC media you can find animated models with the bone based keyframe animation.Maybe checking some of those out can give you an idea or two.
Personally I would love an app that lets you import a model and then rig and animate it and export it to direct x format.

Please have mercy and use the search function.
jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 13th Jan 2008 21:48 Edited at: 13th Jan 2008 21:50
ok, i understand most of it now, except:

Quote: "I don't know anything about the way animations work in DX but I'd assume in that example the object uses bone based keyframe animation which means each bone has its own transformation matrix as they too can be translated, scaled and rotated."


well, as you can see, this is the matrix for a frame/bone:

this needs its offset/rotation/scale/transform data, that makes sense...

but, then why would the skinweights need matrix data? as far as i understand, the weight of a joint is just a value, which they have, so i dont see why there would be a matrix for it also.


Alucard94
17
Years of Service
User Offline
Joined: 9th Jul 2007
Location: Stockholm, Sweden.
Posted: 13th Jan 2008 21:49
This is so advanced O_O I'm just a poor modeler

Login to post a reply

Server time is: 2024-11-26 00:16:46
Your offset time is: 2024-11-26 00:16:46