Hi I am new to Babylon (but not games dev) and thought I would plan a small project to encourage my learning of this impressive platform.
I want to create a pool of 200 agents, all sharing the same model, but moving, and coming into and out of existence separate entities.
The engineer in me feels it would be preferable to have a fixed memory pool of units, rather than create and destroy dynamically during gameplay.
I had thought of instancing the model, grouping them all in a container to aid scene loading management etc , but after reading this recent post about the challenges of switching an individual instance’s visibility I am less am unsure as to the best approach.
Any suggestion, or pitfalls learned from experience most welcome, for me and hopefully anyone else planning a similar project.
What if the instances are slightly different, like the materials diffuse color is slighly different shade of blue?
Is this a big performance trade off?
You can copy the matrix of the last thin instance of the buffer over the thin instance you want to remove and decrement the thin instance count by one.