How can I create InstanceBufferGeometry from BufferGeometryLoader?

Hello! How can I create an instanceBufferGeometry from the buffer geometry loader? Does a .clone () function create instances in the same way as instanceBufferGeometry? I’m trying to improve performance in my project http://alovert.ru/

I use just bufferGeometry

The following example demonstrates how to convert an instance of BoxBufferGeometry to an instanced geometry.

https://threejs.org/examples/webgl_buffergeometry_instancing_dynamic

The idea is to assign the index and attributes that are equal for all instances. The actual per-instance data are generated in the next step and assigned as an InstancedBufferAttribute to the InstancedBufferGeometry. Also notice that you need a custom shader material in order to process the per-instance data in the shader.

As you can BufferGeometryLoader is not relevant in this scenario. You load the geometry as usual and then convert it to an instanced geometry similar to the example.

BTW: There is another example that shows how you can extend a build-in material so it’s compatible with InstancedBufferGeometry.

https://threejs.org/examples/webgl_buffergeometry_instancing_lambert

Thank you very much, i try it…