• 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.

XtoMDL errors

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
Hi guys

I am trying to export a MD-82 VC. But I get a rather odd error after it goes through all the degenerate polygons. Seems to be related to the modeldef or mouse tags somewhere. Any ideas?

Code:
9826
Index buffer exceeds maximum size.
78291
Index buffer exceeds maximum size.
72726
Index buffer exceeds maximum size.
XToMdl.exe Unhandled Application Exception
System.FormatException: Input string was not in a correct format.

   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)

   at aj.b(String A_0)

   at aj.a(bd A_0, String A_1, SortedList A_2)

   at be.e()

   at be.a(bd A_0)

   at bg.j()

   at bg.a(bd A_0)

   at ab.a(Guid& A_0, Stream A_1)

   at al.b()

   at al.a(ap A_0, TextBox A_1)

Input string was not in a correct format.

Stack Trace:
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)

   at aj.b(String A_0)

   at aj.a(bd A_0, String A_1, SortedList A_2)

   at be.e()

   at be.a(bd A_0)

   at bg.j()

   at bg.a(bd A_0)

   at ab.a(Guid& A_0, Stream A_1)

   at al.b()

   at al.a(ap A_0, TextBox A_1)
 
MD-82 VC? I'm all ears! Eh, never mind...


The only thing I can suggest is carefully checking all relevant Modeldef entries or doing bisectional testing to find the culprit (i.e. check half of the used objects to figure out in which half the bad one is, then check half of that half, then half of he half of the half, etc...).
 
Export with animations unchecked, if no error then you will know for sure where to look.
 
The problem wasn't too difficult to track down. It is being caused by auto-created Multi-Materials, that is the kind that occur when dragging and dropping bitmaps onto selected mesh rather than manually assigning an FSX Material to the mesh. As a result, the same FSX-Material was replicated in numerous Multi-Materials, most of which only had one FSX-Material assigned, and the other remaining empty and unassigned.

Loading any object's assignment into the Material Editor then Select by Material would highlight as many as ten Multi-Mats, resulting in up to 10 times the number of t-verts as actually existed! This is an excellent reason not to blindly allow Max or GMax to auto-create material entries via the drag-and-drop method... :teacher:

I just spent an hour or more taking two "circuit breaker panels" and splitting their mesh into three separate FSX-Materials because their total t-verts exceeded the 65k limits. This happened because the modeler who did this didn't take these limits into consideration when creating the UVW Mapping for this project.
 
The problem wasn't too difficult to track down. It is being caused by auto-created Multi-Materials, that is the kind that occur when dragging and dropping bitmaps onto selected mesh rather than manually assigning an FSX Material to the mesh. As a result, the same FSX-Material was replicated in numerous Multi-Materials, most of which only had one FSX-Material assigned, and the other remaining empty and unassigned.

Loading any object's assignment into the Material Editor then Select by Material would highlight as many as ten Multi-Mats, resulting in up to 10 times the number of t-verts as actually existed! This is an excellent reason not to blindly allow Max or GMax to auto-create material entries via the drag-and-drop method... :teacher:
While I never use drag-and-drop that is information I wasn't aware of. Thanks Bill.
 
The problem wasn't too difficult to track down. It is being caused by auto-created Multi-Materials, that is the kind that occur when dragging and dropping bitmaps onto selected mesh rather than manually assigning an FSX Material to the mesh. As a result, the same FSX-Material was replicated in numerous Multi-Materials, most of which only had one FSX-Material assigned, and the other remaining empty and unassigned.

Loading any object's assignment into the Material Editor then Select by Material would highlight as many as ten Multi-Mats, resulting in up to 10 times the number of t-verts as actually existed! This is an excellent reason not to blindly allow Max or GMax to auto-create material entries via the drag-and-drop method... :teacher:

I just spent an hour or more taking two "circuit breaker panels" and splitting their mesh into three separate FSX-Materials because their total t-verts exceeded the 65k limits. This happened because the modeler who did this didn't take these limits into consideration when creating the UVW Mapping for this project.

Hi n4gix, can you explain bit more. I was dump guy, bit hard to understand.
I use max, most use multi-mats. and now stuck with FSX compiler if I had polygon more than 100K, after compile only got 0 Kb.
this happen if I use material on diffuse, specular and bump. if material only diffuse and specular, it can compile.
 
There are two entirely separate but related issues being discussed.

1. Every mesh has X many vertices. When UVW mapped, the number of texture-vertices (t-verts) becomes the controlling factor when the compiler runs. Every new texture added (specular, bump, etc.) will double the number of t-verts. If all three slots are used, then we end up with triple the number of t-verts.

So, for example suppose that a specific FSX-Material is mapped to 22,000 t-verts. Adding both spec and bump textures means that the compiler will see 66,000 t-verts! That is more than the compiler can handle and will result in a buffer overflow, and the model will fail to be compiled.

2. Auto-created Multi-Materials (M-Ms) will have only one MatID assigned to an FSX-Material, the other MatID(s) will remain empty. As a result, you may easily wind up with a bunch of M-Ms, all of which have the exact same bitmap texture. This is not a good situation to have because it really clutters up your Material Editor's list and makes it difficult to work with among other things. It can also cause the number of t-verts to increase beyond the limits of the compiler.

In the case of buffer overflow, the only practical way to solve the problem is to divide the polygons assigned to your FSX-Mat or M-M into two or more groups and assign each group to a new FSX-Mat or M-M and make a very insignificant change to each of them so the compiler won't 'combine them' into a single FSX Material!
 
There are two entirely separate but related issues being discussed.

1. Every mesh has X many vertices. When UVW mapped, the number of texture-vertices (t-verts) becomes the controlling factor when the compiler runs. Every new texture added (specular, bump, etc.) will double the number of t-verts. If all three slots are used, then we end up with triple the number of t-verts.

So, for example suppose that a specific FSX-Material is mapped to 22,000 t-verts. Adding both spec and bump textures means that the compiler will see 66,000 t-verts! That is more than the compiler can handle and will result in a buffer overflow, and the model will fail to be compiled.

2. Auto-created Multi-Materials (M-Ms) will have only one MatID assigned to an FSX-Material, the other MatID(s) will remain empty. As a result, you may easily wind up with a bunch of M-Ms, all of which have the exact same bitmap texture. This is not a good situation to have because it really clutters up your Material Editor's list and makes it difficult to work with among other things. It can also cause the number of t-verts to increase beyond the limits of the compiler.

In the case of buffer overflow, the only practical way to solve the problem is to divide the polygons assigned to your FSX-Mat or M-M into two or more groups and assign each group to a new FSX-Mat or M-M and make a very insignificant change to each of them so the compiler won't 'combine them' into a single FSX Material!

thank @n4gix for explain.
yes you're right, I assign material in 1 big group, maybe that make compiler fail.
 
Back
Top