Instances should only be created for meshes with geometry

when I create instances,The web occur a question ,Instances should only be created for meshes with geometry

Instances are used to draw a mesh multiple times in a single drawcall.
if your mesh doesn’t have any geometry there is no benefit to use instances :slight_smile:

thank you! I want to ask that how do I load the GLTF model to create an instance?

Sorry, have no time to explain in details, just a couple of examples - https://playground.babylonjs.com/#AJA5J6#80
and https://playground.babylonjs.com/#AJA5J6#77 with instantiateModelsToScene() function (more about it in API).
(Note that the latest example not instances but clones the model because of doNotInstantiate: true parameter).

2 Likes