Threejs InstanceMesh in Studio

This might be more of a Threejs question. I am building an AR experience with objects moving around using a flocking algorithm. I managed to improve the performance by using ECS System and Behavior but I think the bottleneck here is still rendering.

Was looking into how to improve that and chance upon threeJS InstanceMesh but couldn’t figure out how to create InstanceMesh for my own models. I can create InstanceMesh with THREE.BoxGeometry but for glb files, I think I have to load it manually? ecs.assets.load gives me a blob data file, and I am assuming I need the GLTFLoader to parse the data to get the geometry and mesh. Hmm..

So the questions are:

  1. Is GLTFLoader accessible in component scripts within 8th Wall Studio?
  2. Is there another approach where I can get the ThreeJs geometry and material to create the InstanceMesh?
  3. Or is this something even possible with Studio?

I’ve created InstancedMeshes using Studio before but only with BufferGeometry or Primitive shapes, haven’t tested it with loaded GLTFs. This is something we’re looking into that’s apart of our performance pass.

1 Like

I guess will have to make do with lowering polycount and texture sizes for now. Thanks!

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.