Is it possible to instance a complete GLTF that is imported to three.js

You need to create a InstancedBufferGeometry using the original buffer attributes of your model and add a offset and orientation InstancedBufferAttribute in order to use instancing, in addition you need to patch your shader, here is a example pen that also makes shadows work with instances.

You can only make instances per geometry, so you’ll either have to make a instancing batch for each part of your model or merge it into one. If you use different materials and textures that will be an issue, if you’re interested, i’ve made a merging solution for this that allows to merge a model with multiple geometries, materials and textures into one, specifically made for instancing.

4 Likes