How do I use/monitor Instances in Scenery Development?

Hi there,

I’m trying to understand if I’m doing things right. :smiley: I have an airport scenery with a lot of objects. I mean–A LOT! I just learned about “instancing”, but I don’t think the docs clearly state how to implement them into the scenery.

I’m guessing when you add an object, click the button “Assign Instance ID”, that will create an instance. From there I’m making sure to duplicate that object and put it where I want. Is THAT how you do instancing in scenery development? :person_shrugging:t5:

If that’s the case is there a way to monitor the performance as a whole? I know I can run “Display FPS”. I’m aware of the “Statistics Profile”, but to be honest I don’t know how to interpret it. Thank you for any insight into this.

https://docs.flightsimulator.com/html/Asset_Creation/3D_Models/General_Principles.htm?rhsearch=instances

https://docs.flightsimulator.com/html/Developer_Mode/Project_Editor/#assign_instance

https://docs.flightsimulator.com/html/Developer_Mode/Menus/Tools/The_Statistics_Profiler.htm

Hi,

The type of instance described in the docs on “GENERAL MODELLING PRINCIPLES” is about your needs (placing your model multiple time on the scene)
You can monitor it using the Debug model Lod , at the bottom of the windows you will see the Instance Statics
It is quite a fast process, (unless with my large global mods when the engine has to deal with several thousands of instances at the same time!!)

Thats basic instancing,placing the same object (same GUID) multiple times
(The assign instance ID is likely making the specific scenery object unique, and you want to avoid that unless you have a very good reason , as specified interaction with missions and worldscripts, that are poorly documented at present time)


There is another interesting instance type described in the docs, related to the 3d object, that look very useful for stuff like Blender arrays or “alt+d” copy, however it is supported only with the Autodesk plugin

1 Like

Hi mamu… if I understood what you’re saying. Objects with the same GUID is better for rendering rather than having the same Instance ID? I would have thought having the same instance ID would make it better? I’ll have to play around with it. Thanks for your take on this.

So… is duplicating an object considered creating another instance? I noticed that the objects have the same GUID, but the instance ID’s are indeed different! :astonished: I don’t think I can remove the instance ID!!! That means I’ll have to do this again. :frowning_face:

The official Blender exporter supports it now. I have successfully used it on a few models and the expected reduction in vertices is reflected in the LOD debug in-sim.

Thanks for the tip-off on Alt+D. Didn’t know that existed. I’ve always just done the standard Ctrl+D duplicate and then Ctrl+L link object data.

1 Like

The way I interpret the SDK, it’s basically stating that assigning an Instance ID will allow a script to be able to specifically target that model for visibility, triggers, or whatever. I believe it will still be “instanced” from a performance perspective as the mesh is still using the same GUID.

The Instance ID should never be the same. It’s probably not hurting you since it’s not being called by a script, but it is extra bloat, so I would just remove them all.

If you duplicate or place down a second copy of a model (has to be the same model, using the same GUID) it does become an instance. Basically this is taking rendering load off of the GPU, however the CPU is still making a call for each placement of the object (but it would have to do that even if it wasn’t instanced).

As far as removing the Instance ID, I don’t know if it can be removed from the UI or not. I have never assigned one to need to remove it. Though, what I would do in this case is just open the XML file in an editor like Notepad ++ and just search for and remove those instance ID’s by hand. You could probably even open it in WordPad or Notepad if the file isn’t too big.

1 Like

Excellent points, thank you both for your feedback.

2 Likes