vistekis Posted September 17 Posted September 17 Seeking help with the .mdl format for fable 2 Issues: the headers were stripped from the file by Lionhead. Static meshes and Skeletal meshes seem to have different structures, and it's pretty common for static meshes to have different structures between them. So far: I can find a significant amount out about most of the rigged assets, but there are issues when an asset is split in to submeshes, and with some of the larger meshes. i.e: Bone Count: 143 Bones: [0] CH_HeroChild_Male_Rig_Asset (ID: 4294967295) [1] Shadow_Hip (ID: 0) [2] Shadow_SpineControl (ID: 1) [3] Shadow_SpineControl1 (ID: 2) [4] Shadow_Chest (ID: 3) [5] Shadow_Neck (ID: 4) [6] Shadow_Head (ID: 5) [7] Shadow_jaw (ID: 6) ... Mesh count: 3 Parsing mesh headers... Mesh 0: Child_hair_NEW2 Mesh 1: Child_face3 Mesh 2: hero_eyelash20 Parsing mesh buffers... Mesh Buffer 0: Buffer starts at offset: 0x00002EAB Vertex count: 10093 Face count: 17065 Detected vertex stride: 28 bytes Vertex buffer at: 0x00002F3E (size: 282604 bytes) Face buffer at: 0x00047F2A (size: 34130 bytes) Mesh Buffer 1: Buffer starts at offset: 0x00077B4C Vertex count: 16777240 Face count: 16777216 WARNING: Unrealistic values, possible misalignment Mesh Buffer 2: Buffer starts at offset: 0x00077B64 Vertex count: 65536 Face count: 4278190080 WARNING: Unrealistic values, possible misalignment Attached my python script, and 010 editor script, for anyone willing to help figure this crap out. also 1 mdl file.. mdl.bt character.py mdl.zip 1
Engineers shak-otay Posted September 17 Engineers Posted September 17 Using hex2obj. Checked the mdl manually which was not too hard: 1
vistekis Posted September 17 Author Posted September 17 (edited) Thanks. just with the values in your screenshot I was able to update my scripts and I’m able to get the header for each mesh with 90% accuracy (only a few outliers, not including those with different structures). The only “issue” is now understanding the submeshes; notably the eyes are huge centered in the head atm. once that’s done I can work on the skeleton. Edited September 17 by vistekis
CharlieV Posted September 21 Posted September 21 Really hope you get any help you need! If some sort of tool comes from this project as well as texture support and you can share it (even without skeletons it's not a big deal) it would be incredible. There haven't ever been any Fable 2 tools, it was considered not possible, and we've been waiting 17 years... that's a lifetime!
vistekis Posted September 21 Author Posted September 21 (edited) 3 hours ago, CharlieV said: Really hope you get any help you need! If some sort of tool comes from this project as well as texture support and you can share it (even without skeletons it's not a big deal) it would be incredible. There haven't ever been any Fable 2 tools, it was considered not possible, and we've been waiting 17 years... that's a lifetime! https://github.com/adarec1994/FABLE2 I've already started putting a tool together. Most models can be converted. I've got the skeletons, too. Static meshes don't work right now, I know what the issue but I think I got the flu, so I'm not really working on it until I feel better. All that's missing now are textures, weights/ skinning/ animations. I attached my script and a few models, if anyone would be willing to help finding the weights. an example of some output: File: Hobbe_Caster.mdl | 442185 bytes | BE | Stride: 28 Found 111 bones, 111 transforms MeshCount: 2 Mesh 0: art\creatures\combatant\hobbe_grunt\pictures\_sharedtextures\hobbe_caster_polished.tex Mesh 1: art\creatures\combatant\hobbe_grunt\pictures\_sharedtextures\hobbe_eye_03.tex Buffer 0 @0x00002193 (preface 😎 initial 13 bytes: 00 00 00 00 00 00 00 00 00 00 16 38 00 vertex: offset=0x000021D4 count=4391 stride=28 faces: offset=0x00020218 count=9407 mode=triangle strips (built 5688 tris) Buffer 1 @0x00035E06 (preface 17) initial 13 bytes: 00 00 00 00 00 00 00 00 01 00 00 00 01 vertex: offset=0x00035E50 count=24 stride=28 faces: offset=0x000360F0 count=31 mode=triangle strips (built 20 tris) Reached MeshCount (2) ✓ Exported: 2 meshes, 3 materials, 111 bones → Hobbe_Caster.glb UV's are also working. I made a post in another part of the forum for help with textures, as far as I'm aware they're compressed and have some sort of encryption. It's beyond my admittedly amateur skillset. mdl_glb_conv.py New WinRAR archive.rar Edited September 21 by vistekis 1
vistekis Posted September 21 Author Posted September 21 Actually I have mostly sorted out the weights I think. It’s not perfect (yet), but getting close. posting this via mobile cos I’m too sick for the PC anymore, but the source is available on my GitHub. The script is a huge mess though
sleepyzay Posted September 26 Posted September 26 I made a maxscript for this game a couple of years ago. If memory serves everything works. https://github.com/sleepyzay/Maxscript-Projects/tree/main/Fable 2 2
CharlieV Posted September 27 Posted September 27 No information on which version of Max etc makes it not very useful, wanted to test but all I get is "position: 13; line: 6 -- Syntax error: at <, expected <factor> -- In line: <!" error
sleepyzay Posted September 27 Posted September 27 I wrote it for max 2015. I've never seen a different version give a syntax error before. What model file are you using it on?
vistekis Posted September 27 Author Posted September 27 On 9/26/2025 at 3:26 PM, sleepyzay said: I made a maxscript for this game a couple of years ago. If memory serves everything works. https://github.com/sleepyzay/Maxscript-Projects/tree/main/Fable 2 This is quite excellent, and actually provides a solution to many of the bugs I had (and stopped working on temporarily) Did you ever do any work on the textures? This is what is largely causing problems right now due to LH using an unknown compression format. It seems to be a version of zlib with deflate, but I can't figure it out.
sleepyzay Posted September 29 Posted September 29 Unfortunately I never figured out the textures. I always guessed that they had to be dumped using emulator.
vistekis Posted September 29 Author Posted September 29 2 hours ago, sleepyzay said: Unfortunately I never figured out the textures. I always guessed that they had to be dumped using emulator. Figures. I’ll keep on it I also had a play with your 3ds script sadly it only builds skeletons for me, I don’t have time to figure out why it’s not making geometry right now, perhaps on the weekend
vistekis Posted September 30 Author Posted September 30 18 hours ago, vistekis said: Figures. I’ll keep on it I also had a play with your 3ds script sadly it only builds skeletons for me, I don’t have time to figure out why it’s not making geometry right now, perhaps on the weekend Well this is where I’m at, holistically i need to refine the geometry parsing to build the mesh, but this is only for some of them. I can build skeletons, however the bones are often not facing the correct direction. I’ve tried a bunch of iterations of this and am limited by my own ability. i have another thread on this site for trying to figure out the Tex files.
vistekis Posted September 30 Author Posted September 30 (edited) posted in the wrong sub Edited September 30 by vistekis
sleepyzay Posted September 30 Posted September 30 Is it giving you an error? I only tried it on a few sets of models and I only had issues on models with morph in the file name.
CharlieV Posted Tuesday at 11:26 AM Posted Tuesday at 11:26 AM On 9/27/2025 at 5:40 PM, sleepyzay said: I wrote it for max 2015. I've never seen a different version give a syntax error before. What model file are you using it on? None, that's what happens just trying to run the script, in 2017.
vistekis Posted Tuesday at 01:03 PM Author Posted Tuesday at 01:03 PM 6 hours ago, sleepyzay said: Is it giving you an error? I only tried it on a few sets of models and I only had issues on models with morph in the file name. yes I was getting an error. I tried it on a variety of files I made a tweak and it would build the skeleton. which sent me down a rabbit hole of frustration as I couldn't understand why your maxscript was facing bones in the correct direction, and I couldn't get them to do it after hours of tweaking my script. skill difference I guess
sleepyzay Posted Wednesday at 06:01 AM Posted Wednesday at 06:01 AM 18 hours ago, CharlieV said: None, that's what happens just trying to run the script, in 2017. I've tried scripts written for 2012 on max up to 2020 and I've never seen a syntax fault. Are you sure you are not doing something wrong? 16 hours ago, vistekis said: yes I was getting an error. I tried it on a variety of files I made a tweak and it would build the skeleton. which sent me down a rabbit hole of frustration as I couldn't understand why your maxscript was facing bones in the correct direction, and I couldn't get them to do it after hours of tweaking my script. skill difference I guess What's the specific error message? Maybe I can help.
vistekis Posted Friday at 05:40 PM Author Posted Friday at 05:40 PM On 10/1/2025 at 3:01 PM, sleepyzay said: I've tried scripts written for 2012 on max up to 2020 and I've never seen a syntax fault. Are you sure you are not doing something wrong? What's the specific error message? Maybe I can help. I get 2 errors re: unable to convert to integer 64 or a mismatch with vertex / face counts I tried it on a few models, mostly creatures, including a chicken and balverine_basic. honestly haven't spent a whole lot of time trying to figure it out either since I can import most models to blender just fine. the issues really are textures and a few outlier models. I can't say 100% if my skeletons are working without having the animations yet
CharlieV Posted yesterday at 12:08 AM Posted yesterday at 12:08 AM On 10/1/2025 at 4:01 PM, sleepyzay said: I've tried scripts written for 2012 on max up to 2020 and I've never seen a syntax fault. Are you sure you are not doing something wrong? Well I have actually been using Max since 2017 with dozens of scripts and been involved in game assets for a decade with hundreds of tools/plugins/scripts etc. That's simply what happens and I don't have any other versions, never needed one. I checked with other scripts of yours as well, no issues, I've likely used some in the past already. If it's unexplainable then I guess I'm out of luck on that front, I'll wait for this blender plugin project, what I'm doing isn't anything important ha
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now