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

MSFS Performance difference between multiple objects per gltf and one object with multiple meshes?

Messages
85
Country
germany
Dear friends,

What I would like to know as a novice 3D developer: is there a difference (performance wise) between exporting multiple blender objects combined in one gltf and merging them beforehand to be just one object with multiple meshes?

I could join all my objects of a building to be just one object with multiple meshes, but this makes working and editing it so much more tedious in my opinion.
How do you handle this?
 

Pyscen

Resource contributor
Messages
2,854
Country
us-texas
LOD for 1 reason, it should be 1 object instead of multiple little objects.
 
Messages
237
Country
germany
Im interested in this too, asked it yesterday in another place here. Could you please, just with a few words maybe, explain what you mean with that and how it is affecting LOD? Its not easy for use to "see far enough", at least for me, to make the connection there. Would be great!

What i saw with some "investigation" yesterday was that a file, where the objects are combined, have around 1/10 of code lines, compared to one with multiple objects. My tower gltf has 2700 lines when uncombined, but only 250 (around that) when combined.


Just to make sure, as i understand the question (what would be the same i have in mind) he wants to know if 1 object, lets say a tower, should be better exported to a gltf as a combined object (ctrl + j with all parts selected in object mode) or simply with all the multiple parts, like windows, door, antenna etc in place, can be exported like they are, scattered into individual nodes (i guess thats how one calls it?). And if yes, for what reason. The end result is 1 gltf. Just with very different amount of code.
 
Last edited:

Pyscen

Resource contributor
Messages
2,854
Country
us-texas
The Level of Detail or LOD is taken from the point of origin of that object. The smaller the object the quicker it will disappear. For example, if you have done the windows and frame as one object and separated from the main structure, the window and frame will disappear from view before the main structure (leaving you with holes in your main object or structure). Windows and the frames should be a part of the main structure. Does that help?
 
Messages
237
Country
germany
Ah ok. Thank you, i guess this is a start yes :) Not sure if i have seen this effect yet but of course i believe you. Thanks!

Btw, out of interest. Is this true also for p3d objects made with blender? But probably it is, ive seen Bill Womak (i think) mention that combination of mesh in one of his videos, that were for p3d. So i guess i gave myself the answer to that ^^
 
Messages
85
Country
germany
Ok, as I've done a LOD1 version for farther away, I could not notice that behaviour yet.

But that means, at some point when developing you decide to go destructive. Apply all booleans, solidifiers etc. and join everything into one mesh? Because I really like that the exporter applies the modifiers itself when exporting, I always keep my non-destructive work, but that only works when keeping the objects on their own.

On the other hand, one could leave small objects as they are, I am thinking of smaller details of the buildings, just visible from closeup. That would remove them from the view earlier, which would be great, because I can't see them anyway.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,853
Country
netherlands
Hi,

For the rendering performance I don't think it matters a lot if group all your meshes in one object or not. What typically matters most for the performance is the amount of meshes with an unique material, as that gives the rendering most work.

When you have multiple meshes in your object I assume they use different materials as well, e.g. a different texture. If they all use the same material you might benefit from combining them all in one mesh.
 
Messages
85
Country
germany
Ok, mostly I've applied the PBR textures directly into the material slots, and I try to reuse these textures along my objects (like a corrugated steel texture, using the tint value one can use the same texture file and achieve different effects, etc.), But then it is also a different material automatically.

Your answer seems reasonable. So that now leads to baking textures into the smallest reasonable (depending on quality wanted) amount of "texture files", instead of applying the PBR textures directly to a material. Correct?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,853
Country
netherlands
Not sure if I understand what you mean with baking vs applying the pbr textures. In MSFS all materials have pbr textures anyway, so how would baking help there?
 
Messages
85
Country
germany
I could download a texture from i.e. cc0textures.com and directly apply it to a material in Blender, like faces of the building as the "Roof" material. And use another texture for the "wall" material. This would result in multiple materials per object.

The other way would be, to uv unwrap the whole building (or parts of it), and create one texture (consisting of a png for diffuse, comp and normal, etc, for example with Armorpaint) and assign it to just one material containing all that's needed for the building.

So in terms of performance: Does the render engine know, that an image file that is used in different materials is still the same image file? Or does it load the image multiple times just looking at the material defined, so when two materials use the same image file, does it load it twice?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,853
Country
netherlands
Hi,

It would be more efficient if you can use the same material on all parts. That way the engine can render them at once.

If not, the rendering state has to be changed each time to active a different texture or change another material attribute. That changing of the state costs performance.
 
Messages
19
Country
australia
I could download a texture from i.e. cc0textures.com and directly apply it to a material in Blender, like faces of the building as the "Roof" material. And use another texture for the "wall" material. This would result in multiple materials per object.

The other way would be, to uv unwrap the whole building (or parts of it), and create one texture (consisting of a png for diffuse, comp and normal, etc, for example with Armorpaint) and assign it to just one material containing all that's needed for the building.

So in terms of performance: Does the render engine know, that an image file that is used in different materials is still the same image file? Or does it load the image multiple times just looking at the material defined, so when two materials use the same image file, does it load it twice?

I think what you are saying is that you want to bake different materials into a single image texture. That single image will then be used for a single material applied to your entire object. I have only baked the diffuse of one material into a texture (haven't used the Blender baking workflow for that long), but it could be possible. Worst case you could bake them to the UV's of the individual material faces (use an alpha layer for transparency when baking to the Image Texture) and manually add them together in Photoshop and export as a single texture.

Would be convenient if one could bake the diffuse of more than one building into one in Blender, but I would need to experiment with it first.
 
Messages
583
Country
italy
Take a look at the sdk docs, It has been improved A LOT since the begininng, It"s worth a reading


Furthermore, during latest q&a about the sdk, they promised there should be a Memory profiling tool available in order to check memory and CPU footprint for each element of the scenery:


I swear It's worth your time, the new sdk producer lady Is f****ing cute!

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Messages
85
Country
germany
I think what you are saying is that you want to bake different materials into a single image texture. That single image will then be used for a single material applied to your entire object. I have only baked the diffuse of one material into a texture (haven't used the Blender baking workflow for that long), but it could be possible. Worst case you could bake them to the UV's of the individual material faces (use an alpha layer for transparency when baking to the Image Texture) and manually add them together in Photoshop and export as a single texture.

Would be convenient if one could bake the diffuse of more than one building into one in Blender, but I would need to experiment with it first.
Well, I dont WANT to :) I am trying to decide which way to go.
I could create several materials and just put the PBR textures directly into the slots. This leads to great quality and detail, even though file size is small (when reusing the same texture on several buildings in the scenery), but true, this leads to higher CPU/GPU load, due to several different materials.

Or I could bake everything to one texture and just have one material per object. Quality and Detail is getting lost logically, but performance rises.

I think I am going for both, depending where on the airport the building is located.
 
Messages
204
Country
us-texas
A lot of how much effort into performance you devote depends on if you are building an airport in a large city or dense area.
If you are building some airport that is in a location that doesn't have performance issues, you might be wasting your time trying to optimize.
 
Messages
237
Country
germany
Sure. Im interested in this for the future more. Probably at my current project there isnt much need to fiddle around with it.
 
Top