Talk:FMDL (File Format)

From MK8
Jump to navigation Jump to search

Triangle Indices

I don't understand how the triangle indices work. From what I have understood they're stored in the index buffer in a LOD model. It's just a list of UInt16s. I've tried to have one UInt16 in the index buffer as an index to a buffer item (a vertex for example, found in FVTX). I am only using the first LOD because it's the most detailed one. Then it should take 3 UInt16s in the index buffer to create a triangle. This does not work, the model looks really weird when I import it to 3ds Max. Have I misunderstood anything or is it my code that is wrong?
--Wexos (Talk | Contribs) 16:27, 20 March 2017 (UTC)

You may wanna check my python code here for a sane import of LoD levels of an FMDL section, with things to note described in the introductionary comment: https://github.com/Syroot/io_scene_bfres/blob/master/src/bfres_fmdl.py - Ray Koopa (talk) 19:15, 21 March 2017 (UTC)
It works now. Thanks for the information.
--Wexos (Talk | Contribs) 11:43, 22 March 2017 (UTC)

Ranges

@MasterF0x. The second vector seems to be maximum but the first one is not minimum. Here is an example from Coin.bfres:

Vector1: X = 9.536743E-07; Y = 1.192093E-06; Z = 0
Vector2: X = 7.169569; Y = 7.16957; Z = 1.427614

The actual min and max values:

Min: X = -7.168; Y = -6.953; Z = -1.427
Max: X = 7.168; Y = 7.168; Z = 1.427

--Wexos (Talk | Contribs) 14:36, 23 May 2017 (UTC)

The first one looks like center point then, being almost 0,0,0 and the coin extending symmetrically. Am I right imagining it like a bounding box? So the second one would be the "extend" from the center. But what do I know :D - Ray Koopa (talk) 14:56, 23 May 2017 (UTC)
That's definitely possible. The coin is nearly symmetric, so that would explain why the X and Y are very close to 0.
--Wexos (Talk | Contribs) 15:02, 23 May 2017 (UTC)

Documenting unused fields

There's some meaning behind unused fields, but I'm not sure if documenting them here makes much sense. For example, the "End of BFRES String table" is wrong, it actually points to a path to a file the original FMDL data originates from, but which has been removed in MK8, thus pointing effectively to the "end of the string table". - Ray Koopa (talk) 19:58, 26 May 2017 (UTC)

In these cases you should put "(Field, like "End of BFRES String table"). Always X in Mario Kart 8", or "(Field). Not used in Mario Kart 8", or "(Field). Unknown meaning/usage in Mario Kart 8".
Atlas (talk) 21:46, 26 May 2017 (UTC)
Okay, I guess I change it again then. I actually tried to describe what it was for in the current version. Anyway, can I contact you privately about one of your recent edits? :D - Ray Koopa (talk) 21:52, 26 May 2017 (UTC)