Exporting to MSFS 2020: is one single mesh better than a ...

24 Jun.,2024

 

Exporting to MSFS : is one single mesh better than a ...



It took some searching to find these previous threads citing the fact that many (~3-to-4x more per material ?) Texture Vertices (aka "T-Verts") may 'initially' be incurred when applying multiple materials on a 3D model (which IMHO underscores the importance of utilizing "Smoothing" wherever possible to minimize adverse run time rendering performance impact related to "T-Vert" count (sometimes still ascribed to "Poly" count based on IIUC, legacy FS information and concepts):

http://www.fsdeveloper.com/forum/threads/misaligned-textures./

http://www.fsdeveloper.com/forum/threads/triangles-vertices-and-drawcalls./

Of particular note, IMHO, is the explanation posted on the importance of 'welding' T-verts, duplicating Materials, and Drawcall Batching in ACES' Adrian Woods' (aka "torgo ") Blog:

https://web.archive.org/web/.../performance-art-3-polygons-don-t-matter.aspx


NOTE: Because bad things can happen to good information (IMHO, crucial to the FS knowledge base) when MS decides to delete online content incidental to distancing themselves from support of the FS product line while trying to sell other product lines and/or services via existing online storage servers (...as they pursue their seemingly perpetual "Google Envy"), I'm quoting the entire Blog article cited below:


"

Performance Art 3: Polygons don't matter.

You will get efficient and thoughtful service from Heyou.



torgo
19 Jun 4:14 PM
As next gen technology came online, people started repeating this mantra: "Polygons don't matter anymore." For the longest time (okay, about a week) I was stuck thinking, "Awesome, we can throw any amount of geometry at the new cards and they'll just handle it. Sweet!" The part that the infamous "they" left off of that Mantra was: "...vertices do!"

So polygons don't matter anymore. That is absolutely true. However vertices do. They matter absolutely. Here's a handy little excercise to see what I mean by this. Open up 3ds Max or Gmax (or follow along in your mind). Create a box. Convert it to an editable mesh and apply a UVW Unwrap modifier. Collapse it back to a mesh and type in "getNumTverts $" in the Max Script listener window. In the listener output window, you should see the number 8 appear. That means it has 8 texture vertices. That makes sense, 8 physical vertices and 8 texture vertices, right? Now apply a UVW Map modifier to the box and choose "face" as the mapping type. Collapse it back to a mesh and type in "getNumTverts $" in the Max Script listener. You should now see the number 36 appear in the listener output. Huh? 36 texture vertices on a simple box? This is because any texture vertex that is not welded gets duplicated. That happens in the game as well. It also happens for shading groups. We do do some optimization and welding when we convert the geometry to a model, however any hard edge in the UVW Mapping will always cause a split in vertices.

So what this means is that even though your polygon count may be low, your vertex count may be sky high. Like I said, we do optimize pretty heavily on export, but we can't catch every case and if the model is authored poorly from the start (completely unique texture vertices for all the faces for example) you can wind up with four times as many vertices as you intended.

So why does the vertex count matter? Well, because all of the geometry is put onto the graphics card via vertex streams and vertex buffers. A vertex buffer is basically 64k, which translates to ~64,000 vertices stored per buffer. Every buffer is a single draw call. Sometimes we fill the buffer up all the way, sometimes we don't (bad batching). However, let's assume the best case scenario and imagine that we are batching everything perfectly. We create a building that we wan't to appear in a scene 1,000 times. That building has polygons. Okay, that's a little high, but not bad for a high-detailed model. But due to poor modeling, UVing and smoothing, the building actually has vertices in it. 64,000 / = 26 buildings per draw call. / 26 = 38.4 or 39 draw calls for those buildings. Even though it's a perfect batch and a perfect scenario, we still require 39 draw calls for that single building times. Let's imagine that the building was well authored and optimized and actually only had vertices in it (a more reasonable scenario). 64,000 / = 53 buildings per draw call. / 53 = 18.8 or 19 draw calls. That's a pretty significant reduction. Especially if you have 200 variations of buildings you want to draw (200 * 39 = draw calls, 200 * 19 = draw calls). These are all still excessive numbers, but you get the point (and also can see how creating high-polygon models with bad vertex optimization can kill the framerate quick).

So what can we do about this? The first thing to do is author good models. Yes we have our fair share of bad models. As I said, we've got legacy that we just can't update every release, so we chip away at it release by release. Make sure your smoothing groups are used wisely. If it's a rounded object, 1 smoothing group may do. If it's not, try to create as few smoothing groups as makes sense. Also, weld your texture vertices and align and overlap things as much as possible. If you have two faces overlapping in the UV space, make sure the common verts are welded. Also, try to UV things as contiguously as possible. If you are creating a building, create one seam on it and have all four faces lined consecutively on the texture sheet (like splitting a cylinder and flattening it out). If the front and back and sides are identical, then make sure to weld all of the overlapping vertices. Like I said, we do perform some automatic welding when threshholds are close, but if they aren't close in the first place, then we can't weld them.

The second thing to do is batch up parts of models when possible. If you have several buildings with the same window type, batch up those windows with the same texture and the same material. Since they're small in vertex count, they will all likely fit into a single draw call. So rather than have vertex buildings that cause 19 draw calls, create smaller groups that can batch up smartly. 1 draw call for windows, 1 draw call for doors, 1 draw call for awnings and then 1 draw call for the simple building geometry that is left. As the material batching comes online, this will be much easier to do. But it's good practice to start thinking about this now."

https://web.archive.org/web/.../performance-art-3-polygons-don-t-matter.aspx

http://blogs.technet.com/b/torgo/archive//06/19/performance-art-3-polygons-don-t-matter.aspx

https://www.linkedin.com/in/adrianwoods



PS: A somewhat related thread in a Sketchup context on reducing 3D model complexity and texture material mapping mentions that:


* FSX reportedly no longer 'requires' one to weld vertices at 4mm mesh intervals:

http://wing-fell-off.blogspot.com/_09_01_archive.html

...and:


* FSX compiler/exporter is able to export without mangling mesh with as small an interval as 0. (1/2 mm)

http://www.fsdeveloper.com/forum/threads/misaligned-textures./page-2#post-


Hope this info helps with consideration of work-flow and technique in modeling / texturing 3D models for aircraft (...or scenery) !

GaryGB

Hi again:It took some searching to find these previous threads citing the fact that many (~3-to-4x more per material ?) Texture Vertices (aka "T-Verts") may 'initially' be incurred when applying multiple materials on a 3D model (which IMHO underscores the importance of utilizing "Smoothing" wherever possible to minimize adverse run time rendering performance impact related to "T-Vert" count (sometimes still ascribed to "Poly" count based on IIUC, legacy FS information and concepts):Of particular note, IMHO, is the explanation posted on the importance of 'welding' T-verts, duplicating Materials, and Drawcall Batching in ACES' Adrian Woods' (aka "torgo ") Blog:: Because(IMHO, crucial to the FS knowledge base) when MS decides to delete online content incidental to distancing themselves from support of the FS product line while trying to sell other product lines and/or services via existing online storage servers (...as they pursue their seemingly perpetual ""), I'm quoting the entire Blog article cited below:19 Jun 4:14 PMAs next gen technology came online, people started repeating this mantra: "Polygons don't matter anymore." For the longest time (okay, about a week) I was stuck thinking, "Awesome, we can throw any amount of geometry at the new cards and they'll just handle it. Sweet!" The part that the infamous "they" left off of that Mantra was: "...vertices do!"So polygons don't matter anymore. That is absolutely true. However vertices do. They matter absolutely. Here's a handy little excercise to see what I mean by this. Open up 3ds Max or Gmax (or follow along in your mind). Create a box. Convert it to an editable mesh and apply a UVW Unwrap modifier. Collapse it back to a mesh and type in "getNumTverts $" in the Max Script listener window. In the listener output window, you should see the number 8 appear. That means it has 8 texture vertices. That makes sense, 8 physical vertices and 8 texture vertices, right? Now apply a UVW Map modifier to the box and choose "face" as the mapping type. Collapse it back to a mesh and type in "getNumTverts $" in the Max Script listener. You should now see the number 36 appear in the listener output. Huh? 36 texture vertices on a simple box? This is because any texture vertex that is not welded gets duplicated. That happens in the game as well. It also happens for shading groups. We do do some optimization and welding when we convert the geometry to a model, however any hard edge in the UVW Mapping will always cause a split in vertices.So what this means is that even though your polygon count may be low, your vertex count may be sky high. Like I said, we do optimize pretty heavily on export, but we can't catch every case and if the model is authored poorly from the start (completely unique texture vertices for all the faces for example) you can wind up with four times as many vertices as you intended.So why does the vertex count matter? Well, because all of the geometry is put onto the graphics card via vertex streams and vertex buffers. A vertex buffer is basically 64k, which translates to ~64,000 vertices stored per buffer. Every buffer is a single draw call. Sometimes we fill the buffer up all the way, sometimes we don't (bad batching). However, let's assume the best case scenario and imagine that we are batching everything perfectly. We create a building that we wan't to appear in a scene 1,000 times. That building has polygons. Okay, that's a little high, but not bad for a high-detailed model. But due to poor modeling, UVing and smoothing, the building actually has vertices in it. 64,000 / = 26 buildings per draw call. / 26 = 38.4 or 39 draw calls for those buildings. Even though it's a perfect batch and a perfect scenario, we still require 39 draw calls for that single building times. Let's imagine that the building was well authored and optimized and actually only had vertices in it (a more reasonable scenario). 64,000 / = 53 buildings per draw call. / 53 = 18.8 or 19 draw calls. That's a pretty significant reduction. Especially if you have 200 variations of buildings you want to draw (200 * 39 = draw calls, 200 * 19 = draw calls). These are all still excessive numbers, but you get the point (and also can see how creating high-polygon models with bad vertex optimization can kill the framerate quick).So what can we do about this? The first thing to do is author good models. Yes we have our fair share of bad models. As I said, we've got legacy that we just can't update every release, so we chip away at it release by release. Make sure your smoothing groups are used wisely. If it's a rounded object, 1 smoothing group may do. If it's not, try to create as few smoothing groups as makes sense. Also, weld your texture vertices and align and overlap things as much as possible. If you have two faces overlapping in the UV space, make sure the common verts are welded. Also, try to UV things as contiguously as possible. If you are creating a building, create one seam on it and have all four faces lined consecutively on the texture sheet (like splitting a cylinder and flattening it out). If the front and back and sides are identical, then make sure to weld all of the overlapping vertices. Like I said, we do perform some automatic welding when threshholds are close, but if they aren't close in the first place, then we can't weld them.The second thing to do is batch up parts of models when possible. If you have several buildings with the same window type, batch up those windows with the same texture and the same material. Since they're small in vertex count, they will all likely fit into a single draw call. So rather than have vertex buildings that cause 19 draw calls, create smaller groups that can batch up smartly. 1 draw call for windows, 1 draw call for doors, 1 draw call for awnings and then 1 draw call for the simple building geometry that is left. As the material batching comes online, this will be much easier to do. But it's good practice to start thinking about this now.": A somewhat related thread in a Sketchup context on reducing 3D model complexity and texture material mapping mentions that:* FSX reportedly no longer 'requires' one to weld vertices at 4mm mesh intervals:...* FSX compiler/exporter is able to export without mangling mesh with as small an interval as 0. (1/2 mm)Hope this info helps with consideration of work-flow and technique in modeling / texturing 3D models for aircraft (...or scenery) !GaryGB

Preparation of shell models - General Questions - PrePoMax

Thanks for pointing the steps out Sergio.

For more Sheet Mesh Exporterinformation, please contact us. We will provide professional answers.

I should pooint out that i&#;m working on finding a good workflow where i can take the delivered design from design engineers, and prepare it for FEA, by mainly using Salome-Meca/PrePoMax. I&#;ve extracted a portion of an example and uploaded in this post, for you to see. This is typical of what i have to work with. It&#;s often not possible to ask the designers to simplify the models for me. One of my issues is that it is not obvious to me how i should remove all inner/outer fillets on the hollow section profiles, as the desginers make these on sketch level. It&#;s not simply suppressing a fillet function for them. I&#;m exploring the defeaturing powers of Salome-Meca, to see if it fits my needs. As beams are not yet supported i PrePoMax, i would like to analyze the structure with shells, preferably with a hex mesh where possible. My initial thought was to extract the fully square hollow section from the faces with the fillets. But i have not been very succesful. Sometimes the structures are large, so it would be preferable if is was not too cumbersome.

How would you approach this?

This is an example of the type of model: frame.STEP - Google Drive

If you want to learn more, please visit our website Steel Rebar Mesh.