1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FSX ModelconverterX MDlReader and Tverts

Discussion in 'ModelConverterX' started by hcornea, 10/5/10.

  1. hcornea

    hcornea Resource contributor

    Joined:
    20/4/07
    Messages:
    2,388
    Country:
    australia
    I have a question about tverts in FSX native MDL files.

    Using Gmax, I made 3 test cubes, with the UVW modifier specified, and tverts (as reported by Gmax script "getnumtverts$" ) :

    Cube 1: has a Box UVW modifier ... gmax reports 36 tverts
    Cube 2: has a Plane UVW Modifier .... gmax reports 8 tverts
    Cube 3: has all UV points welded together ... gmax reports 1 tvert for this cube.

    Once exported via the FSX gamepack ... and read into ModelconverterX, all of these report 12 triangles and 24 tverts in Modelconverter. ie all the models are the same, regardless of welding of UVW's.

    So ... does the Gmax gamepack break vertex welds?

    Or does the ModelconverterX MDL reader break them?

    And why 24 tverts for each object (even those with 1, 8 or 36 tverts)?

    Finally ... if an object is processed via modelconverterX, have all the welds been broken and the number of tverts consequently increased when compared with the original MDL?

    This would have significant performance implications if that is indeed the case.
    Last edited: 10/5/10
  2. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,300
    Country:
    netherlands
    Hi,

    Good questions. I should start saying I am not familiar with how GMax counts them.

    But I am not surprised that you find 24 texture vertices on a box. Since for a box the normal of the different faces is different, each side will have its own vertices. So at each corner you will have 3 different vertices because the normal is different, there is no way to reduce this.

    Then with 4 vertices per side, you get the 24 vertices in total. The only way to get less vertices would be if some of your sides have the same normal, but that is hardly the case with boxes. You could have up to 36 vertices if each of the triangles have an unique texture mapping.

    When exporting objects from ModelConverterX the amount of vertices is minimized, so the same vertex is not written multiple times (they are shared/welded). But a vertex can only be shared if position, normal and texture mapping are the same.

    So I think the GMax count is not accurate for FS and the way the information is stored in the MDL files.
  3. n4gix

    n4gix Resource contributor

    Joined:
    26/9/06
    Messages:
    9,343
    Country:
    unitedstates
    Irrespective of what you've done in either Max or GMax, the export module will "re-triangulate" all mesh before writing to the .X file.
  4. hcornea

    hcornea Resource contributor

    Joined:
    20/4/07
    Messages:
    2,388
    Country:
    australia
    Ok ... well I guess it makes sense.

    What is interesting is that it seems to make ZERO difference to the number of tverts if I weld all UVW points together

    .... contrary to information out there.

    BTW ... I always get 24 with MCX , never 36 tverts, even if every triangle has been mapped to uniqe UVW.

    Hmm interesting.
  5. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,300
    Country:
    netherlands
    Hi,

    I have attached an example of a box that shows 36 vertices.

    Welding UVW coordinates would only make a different on cylinders or so, if the normal is not the same you will still get multiple texture vertices.

    Attached Files:

Share This Page