• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FsX MDL format description

Thanks for the answer!

Can we go through short example of actual data?

Code:
 		?	Static
			matrix
			index
AMAP 0: 	1	0
AMAP 1: 	1	1
AMAP 2: 	2	2
AMAP 3: 	2	3
AMAP 4: 	2	4
AMAP 5: 	2	5
AMAP 6: 	2	6


		Child	Peer	AMAP
				offset
SCEN 0: 	1	-1	0	0
SCEN 1: 	2	11	8	0
SCEN 2: 	-1	3	16	0
SCEN 3: 	-1	4	24	0
SCEN 4: 	-1	5	32	0
SCEN 5: 	6	7	40	0
SCEN 6: 	-1	-1	48	0

Can you please explain the relationship of few entries?

AMAP offset is clear: AMAP_index = AMAP_offset / 8.

Does the first value of AMAP entry represents matrix index as well? Is it the coordinate system conversion you talked above?

What is the meaning of "child"? "Has child" or "is child of"?

What is a meaning of "peer"?

Hope I'm not overflowing you with questions.

Thank you
 
AMAP offset is clear: AMAP_index = AMAP_offset / 8.
Right.

Does the first value of AMAP entry represents matrix index as well?
I don't know what the first entry in the AMAP table represents. The second entry is an index into the TRAN table of matrices.

What is the meaning of "child"?
"has child"

What is a meaning of "peer"?
"next sibling"


So, to take your example, looking at a part marked as using SCEN entry #1:
- SCEN[1].AMAP_offset = 8, so AMAP index = 8/8 = 1
- AMAP[1].static_index = 1, so use the matrix TRAN[1].
But SCEN[0].child=1, so SCEN entry #1 is a child of SCEN entry #0:
- SCEN[0].AMAP_offset = 0, so AMAP index = 0/8 = 0
- AMAP[0].static_index = 0, so multiply the existing matrix (TRAN[1]) by TRAN[0] to give the final matrix for this part.

Another example, this time looking at a part marked as using SCEN entry #3:
- SCEN[3].AMAP_offset = 24, so AMAP index = 24/8 = 3
- AMAP[3].static_index = 3, so use the matrix TRAN[3].
But SCEN[2].peer = 3, so SCEN entry #3 is a peer/sibling of SCEN entry #2. SCEN[1].child=2, so both SCEN entry #2 and its peer/sibling SCEN entry #3 are children of SCEN entry #1 (as also are SCEN entries #4 and #5):
- So, using the info from the previous example, the final matrix for this part is TRAN[3] * TRAN[1] * TRAN[0]

As you can see, the child and peer/sibling pointers are difficult to work with. In my code after reading in the SCEN table I compute a parent pointer for each entry. This makes it easier to work up through the hierarchy.

Hope I'm not overflowing you with questions.
Not at all. The more people looking at this the more likely we are to work it out.

Disclaimer - this is all (informed) guesswork, and may be incorrect.
 
Last edited:
That's it! All parts are in place. Thank you very much!

Now I've discovered that model is flipped right to left.
I also understand that to move control surfaces to neutral position the animation part have to be resolved. Am I right?
 
Now I've discovered that model is flipped right to left.
You may be using a different co-ordinate system - see "Co-ordinate Systems" in the "Modeling File Formats" section of the SDK.

I also understand that to move control surfaces to neutral position the animation part have to be resolved.
I don't know, but I assume so.
 
Well, here is the progress so far:

Right to left mirroring problem is solved by means of additional scale matrix applied to mesh:

-1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1

The animation format is fully decoded and looks much more familiar now. Haven't tried to apply any animation yet as I still have to dig the "Quaternion" interpolation subject, but the relationship between animations, streams, keyframes and particular parts is clear enough.
 
Back
Top