Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
35 user(s) are online (16 user(s) are browsing Forum)

Members: 0
Guests: 35

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +30€

Current balance: -35€
(last updated 05/2019)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 39 users playing Freelancer on 41 servers.
June. 17, 2019

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



Deformable2
Not too shy to talk
Joined:
2013/3/16 7:49
Group:
Registered Users
Posts: 63
Offline
Hello,

I've been attempting to trawl through Dfm files, and have managed to get the basics of showing the model up and running (currently testable in LancerEdit).

Open in new window


I've had a hiccup in working with bones though.
/Skeleton/Name references a non-existent "Head02.cmp" I attempted replacing /Skeleton/Name with garbage values to enduce a crash to no avail (@adoxa is this value even read?)

Composing the compound parts for the bone parts doesn't seem to produce anything useful. "Bone to root" matrices by themselves or combined (transposed or otherwise) also don't seem to be doing the trick for getting something that looks like a skeleton.

Any ideas?

Posted on: 1/7 3:46
Top
Re: Deformable2
Not too shy to talk
Joined:
2010/8/27 14:02
Group:
Registered Users
Posts: 64
Offline
DFM constraints header contains three names: parent (0x40), child (0x18), bone (0x28). Rigid compound hierarchies constraints only have two names for parent (0x40) & child (0x40). So reading DFM constraints list as you would rigid compound would yield only two names as you'd normally stop string at NUL terminator, and completely miss third one.

Posted on: 1/7 8:38
Top
Re: Deformable2
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1905
Offline
Quote:
Ichiru wrote:
/Skeleton/Name references a non-existent "Head02.cmp" I attempted replacing /Skeleton/Name with garbage values to enduce a crash to no avail (@adoxa is this value even read?)

Doesn't look like it.


@Treewyrm: can you elaborate? I never noticed a "bone" entry when doing the XML converter.

Posted on: 1/7 12:38
Top
Re: Deformable2
Not too shy to talk
Joined:
2013/3/16 7:49
Group:
Registered Users
Posts: 63
Offline
There does seem to be 3 strings in the Cons section for dfm, but only in the Loose section.

Reading with the 64 byte/24 byte/40 byte buffers for example br_quigly_head.dfm gives entries like:

Head01/LOBR/B_Left Top Lip
Head01/LMBR/LOBR
Head01/B_SplineBone 9A/B_SplineBone 8B

These are not present in the humanoid bodies which only seem to use sphere joints, but are present in the loose joints in worm.dfm

Combining this information with "Bone to root" in some way that gives meaningful output is another thing

Posted on: 1/7 14:26
Top
Re: Deformable2
Not too shy to talk
Joined:
2010/8/27 14:02
Group:
Registered Users
Posts: 64
Offline
Had a few observations while parsing and digging through DFM recently.

Regular rigid compound model constraint data typically contains two strings of fixed length (64 bytes each) per each joint: parent and child object names. DFMs use spherical and loose constraints, but their header contains more than just two zero padded strings. With some it's pretty clear there are three strings: parent (64 bytes), child (24 bytes) and another child (40 bytes). Worth to note sometimes parent string contains some junk after nul terminator, but the layout of 64/24/40 for triple strings remains common across.

Perhaps biped skeleton for bodies and hands might be hardcoded elsewhere, perhaps in dll, and not contained within DFM but heads and nomad worm aren't, so they have to have custom rigging somewhere in the file.

Posted on: 1/7 14:38
Top
Re: Deformable2
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1905
Offline
I converted all the CHARACTERS XMLs back to UTF in another directory, swapped that directory with DATA\CHARACTERS, copied back the ini files, and started FL. Characters showed up fine. Thus child really is 64 bytes and you're just seeing garbage that happens to look valid.

Posted on: 1/8 7:59
Top
Re: Deformable2
Not too shy to talk
Joined:
2013/3/16 7:49
Group:
Registered Users
Posts: 63
Offline
Turns out after deleting the .anm files from my install that the .dfm files for bodies don't actually store a bind pose in their bones.

However the animations in bodygenericmale.dfm etc. are of different types to the other anm scripts.

You'll find Channel type 128 (3rd integer in /Script/name/Joint map/Channel/Header) in these scripts. Type 1 is a single float, type 4 is a quaternion, but I'm not sure about type 128. It doesn't seem to have an equal amount of bytes per frame. In some cases it seems to be 10 bytes per frame (joint maps with 2 or 16 frames). In other cases it seems to be left (Joint map 17 in Sc_MLBODY_CHRB_GRABR_PRDRNK_TABL_000LV_XA_08 has 1542 bytes of frame data for 257 frames, definitely not a multiple of 10).

Posted on: 1/9 19:57
Top
Re: Deformable2
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1905
Offline
They're three 16-bit integers divided by 32767 to make three floats (have a look at channel.cpp in the XML Project source).

Posted on: 1/10 5:39
Top