Page 1 of 1

TitanFall 2 MDL format ( fit faces and vertices )

Posted: Sun Apr 16, 2017 10:33 am
by luxox18
hello people :D

For days I been trying to obtain models from TitanFall 2 but I have lot of problems using decompiler tools or hex2obj.
This game runs under source engine and the formats used for models is MDL but with some differences.

first, all parts that compose a model in original Source Engine (MDL, VVD, VTX, PHY) are composed in a single file where the mdl section has changed in comparison to the vertex and face sections (VVD and VTX respectively), which mantain the original structure, also all addresses respond to a single big file instead a sectioned file.
the decompiler tools doesn't work due this differences and hex2obj can't figure out a correct mesh because the faces don't fit with vertices

in all models the vertex buffer start with the string IDSV and faces (supposedly) start with a pattern 00 00 01 00 02.

so, I want to know if someone with knowledge of this format can take a look or can share some info, specifically how to fit vertices and faces.

here are some samples and thanks.

EDIT: Some samples works under hex2obj perfectly but other no like imc_grunt_smg.mdl

http://www.mediafire.com/file/ip83mpgig ... humans.rar

Re: TitanFall 2 MDL format ( fit faces and vertices )

Posted: Sun Apr 16, 2017 10:53 am
by shakotay2
luxox18 wrote:hex2obj can't figure out a correct mesh because the faces don't fit with vertices
may depend on the specific model you chose, but for imc_hero_richter.mdl, it's one of the simplest formats I've ever come across. :D

It requires some scrolling through the file, of course, and some "feeling of 3D flow" (people might hate it when I write "experience"):
search for 0000 0100 0200 gives 237 finds, or so.
Well, 0xE7C8 is obviously not a good start. Checked some others, finally 0x24932C looked ok to me.
Next find:
0x253154, size 0x9E28 / 2 -> 20244 face indices (dec.)

max. FI is 6048 (lower left listbox), chosen as vertex count

some scrolling for the vertices, 0x2986C8 looks good
FVF size, 48 obviously, floats, 12 bytes position, 12 bytes normals, uvs to follow? yes
so uv pos is 24:
TF2-richter.JPG
(in fact it took me more time to write this post than to extract the model, cheers :) )

Re: TitanFall 2 MDL format ( fit faces and vertices )

Posted: Sun Apr 16, 2017 11:10 am
by luxox18
shakotay2 wrote:
luxox18 wrote:hex2obj can't figure out a correct mesh because the faces don't fit with vertices
may depend on the specific model you chose, but for imc_hero_richter.mdl, it's one of the simplest formats I've ever come across. :D

It requires some scrolling through the file, of course, and some "feeling of 3D flow" (people might hate it when I write "experience"):
search for 0000 0100 0200 gives 237 finds, or so.
Well, 0xE7C8 is obviously not a good start. Checked some others, finally 0x24932C looked ok to me.
Next find:
0x253154, size 0x9E28 / 2 -> 20244 face indices (dec.)

max. FI is 6048 (lower left listbox), chosen as vertex count

some scrolling for the vertices, 0x2986C8 looks good
FVF size, 48 obviously, floats, 12 bytes position, 12 bytes normals, uvs to follow? yes
so uv pos is 24:
TF2-richter.JPG
(in fact it took me more time to write this post than to extract the model, cheers :) )
hahaha thanks but I forgot to say that this doesn't work in all models, that's why I uploaded some samples that works under hex2obj and other no, like imc_grunt_smg.mdl ( sorry for the incomplete info :P (What a shame
:lol: :lol: :lol: ) )

Re: TitanFall 2 MDL format ( fit faces and vertices )

Posted: Sun Apr 16, 2017 12:03 pm
by shakotay2
luxox18 wrote:and other no, like imc_grunt_smg.mdl
yeah, that's indeed a little bit strange, since the point cloud looks ok