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

MSFS20 Mirror instances

Messages
55
Country
spain
Hi all,

I'm experimenting with instances to optimice GPU memory in models. In blender works well, but I'm not able to mirror the instance once compiled in the sim. Is there any way to make it work inside the sim?

Step1: Create the instance
blender1.jpg


Step2: Mirror the instance
blender2.jpg


I've tried also scale x -1 (same result), or Add->Mesh->Plane as parent and create the instance from it using Object Properties (worst restult, flips the instance)

Thanks in advance.
 
Last edited:
This has been addressed directly by Asobo in several ways and it seems like something you'd want to understand thoroughly, before starting your own system.

It is worth noting that the Microsoft Flight Simulator engine will make use of "instancing" when rendering your models within the scene. This means that if you place the same model 10 times in the same scene, then all 10 of these model "instances" will be batched into a single draw call, saving on performance.
The caveat to this is that it's only applicable to non-skinned meshes, and a model that uses a skinned mesh will not be instanced. Additionally, if a model has some skinned meshes and some non-skinned ones, then the non-skinned ones will be instanced, even though the skinned ones are not.

Also there is submodel merging:

 
But this would refer to the performance in the generation of multiple objects, in my opinion what @Socorrista22198 tries is to create only 1 object, but using the mirror to save memory in the use of textures (using "half" of a texture and mirroring it on the object, or am I wrong?
 
You cannot have a single object and two objects. I am not suggesting it will not work, I am saying "Moore's Law," memory is cheap, it is processor cycles we must trade with the devil for. You are adding cycles to save cycles and in so doing, you want to be extremely careful to not multiply redundancy, imo. I think you are looking at it like it is a real world airplane, barely fits in the hangar, but if we chop it in half, voila.

I don't see any great savings, I'm dull and I'll admit it, but here this dullard out. The polygons are only representational, the airplane is not real it is not made out of polygons, or matter. Polygons are packages of coordinates, vertices, color mappings and little more. Now you want to enter this "cloud of data" and make it smaller, by using calculations, instead of, wait for it, calculations and I don't see the great payoff. Do you?

I feel like it seems like I am negative and that is not my intention, by all means prove me wrong, I'd love to see a new innovation, make no mistake. Ok that said, all I am warning, is effort studying the SDK, over something like this is a great investment and just be prepared for this endeavor to be an exercise in learning what is and is not possible.
 
Instancing within a model is good for duplicating parts such as switches and knobs.

Duplicating half an aircraft though, I'm not sure what you expect to gain doing this.

If it's to save texture memory by mirroring the textures then duplicate the part, mirror it (if using scale -1 then you should apply the scale because MSFS ignores scale) and then JOIN IT back to the original part merging the points at the join.
This will:
a) work
b) save texture space and
c) produce the minimum number of drawcalls (if all the textures are on a single sheet and the model isn't animated then this will be 1 drawcall).

The disadvantage is if you use normal maps. I'm not sure how it works in MSFS but in FSX I would avoid mirrored normal maps because the mirroring causes the normal to mirror as well which looks terrible.

EDIT: Silly me, I copied the link to the local documentation and not the online docs:
f
 
Last edited:
This is what I was referring to, I understand (although I may be wrong) that this is what @Socorrista22198 is trying to do, beyond the fact that he mentions the use of instances, I think he was not referring to object instancing in MSFS.

Regarding what our colleague tries, the failure he gets is for not applying transformation, as Anthony mentions, and my suggestion was to use a modifier and not an object duplication.

I will wait for the author's comments
 
Thanks all, myth busted.


The other day I readed at the SDK documentation about the instancing is a good practice to save GPU memory instead CPU usage and I was only experimenting with it and trying to optimize the aircraft a little bit rendering only the half. You are true, it depends on what you use it for. In my case, 1080GTX i76700k 32RAM, usage of instancing the half of the plane is worse, the objects spend more time to load, minimal FPS impact, and the GPU usage is bigger :rolleyes: Don't know, maybe I'm doing something wrong.

What I'm sure is that every type of mirror done in Blender (scale -1, using mirror modifier...), doesn't mirror once compiled. To mirror and object (no instance) only works if you scale x -1 and flip normals only in Edit mode.

No instance, 3Dmodel 1200tris:
noinstances.jpg


Instancing the half of the plane, 3Dmodel 600tris:
withinstances.jpg
 
Last edited:
Back
Top