# \#batchedmesh

**URL:** https://discourse.threejs.org/tag/batchedmesh/1121.md

[Latest](https://discourse.threejs.org/latest.md) · [Categories](https://discourse.threejs.org/categories.md) · [Tags](https://discourse.threejs.org/tags.md)

---

## [AFK City: a city that builds itself while you watch (three.js r186, runs on phones)](https://discourse.threejs.org/t/afk-city-a-city-that-builds-itself-while-you-watch-three-js-r186-runs-on-phones/96910)

<div class="topic-metadata">

**Author:** [@Kushal\_Chudiwala](https://discourse.threejs.org/u/Kushal_Chudiwala)\
**Replies:** 10\
**Last updated:** [November 14, 2026, 3:50pm UTC](https://discourse.threejs.org/t/afk-city-a-city-that-builds-itself-while-you-watch-three-js-r186-runs-on-phones/96910 "2026-11-14T15:50:33Z")

</div>

Hi all! I made AFK City, a free browser game where a city builds itself. Sit back and watch towers rise, traffic flow and day turn to night, or take over and zone it yourself. Play (free, desktop and mobile, no download…

---

## [More robust three-mesh-bvh and batchedmesh integration](https://discourse.threejs.org/t/more-robust-three-mesh-bvh-and-batchedmesh-integration/96951)

<div class="topic-metadata">

**Author:** [@Dmitry\_Pryadkin](https://discourse.threejs.org/u/Dmitry_Pryadkin)\
**Replies:** 2\
**Last updated:** [November 11, 2026, 9:48am UTC](https://discourse.threejs.org/t/more-robust-three-mesh-bvh-and-batchedmesh-integration/96951 "2026-11-11T09:48:21Z")

</div>

Hi Everyone, I’m about to optimize parts of my code related to batchedmesh and mesh-bvh by adding workers. My devices are not very modern Samsung galaxy tabs, they can work hours a day with my code in the browser. My j…

---

## [Big question about batched mesh](https://discourse.threejs.org/t/big-question-about-batched-mesh/94258)

<div class="topic-metadata">

**Author:** [@Gabriel\_Cuadros\_Caceres](https://discourse.threejs.org/u/Gabriel_Cuadros_Caceres)\
**Replies:** 3\
**Last updated:** [September 12, 2026, 8:29am UTC](https://discourse.threejs.org/t/big-question-about-batched-mesh/94258 "2026-09-12T08:29:50Z")

</div>

i have tons of batched and instanced mesh and im analzying my game using spector.js and im seeing alof of framebuffer, one per each of batchedd or instanced mesh im using , is that normal behavior? none of the draw hav…

---

## [Optimized Rendering of Large 3D BIM Models](https://discourse.threejs.org/t/optimized-rendering-of-large-3d-bim-models/93709)

<div class="topic-metadata">

**Author:** [@suryashch](https://discourse.threejs.org/u/suryashch)\
**Replies:** 7\
**Last updated:** [September 8, 2026, 7:34pm UTC](https://discourse.threejs.org/t/optimized-rendering-of-large-3d-bim-models/93709 "2026-09-08T19:34:26Z")

</div>

QSViewer - A novel way to view BIM models on the web. Construction 3D models face unique challenges from a computer graphics perspective. They require high memory. They demand a powerful GPU. They exhaust your CPU p…

---

## [BatchedMesh batch ID](https://discourse.threejs.org/t/batchedmesh-batch-id/91306)

<div class="topic-metadata">

**Author:** [@byDezign](https://discourse.threejs.org/u/byDezign)\
**Replies:** 2\
**Last updated:** [April 30, 2026, 12:52pm UTC](https://discourse.threejs.org/t/batchedmesh-batch-id/91306 "2026-04-30T12:52:16Z")

</div>

Im struggling with a complex shader that when similarly used for instanced objects I can reliably get the index of each object with instanceIndex however with BatchedMeshes I cant get any kind of index or way to ID which…

---

## [BatchedMesh recursive raycasting](https://discourse.threejs.org/t/batchedmesh-recursive-raycasting/89738)

<div class="topic-metadata">

**Author:** [@marluc](https://discourse.threejs.org/u/marluc)\
**Replies:** 1\
**Last updated:** [February 9, 2026, 9:03pm UTC](https://discourse.threejs.org/t/batchedmesh-recursive-raycasting/89738 "2026-02-09T21:03:40Z")

</div>

Hi, I’m working on an app with R3F where a lot of the model handling is based on BatchedMesh. I managed to implement per-batch clipping, but I’m now stuck with intersections between batches that are not clipped but are…

---

## [BatchedMesh #setMatrixAt delay with webGPU](https://discourse.threejs.org/t/batchedmesh-setmatrixat-delay-with-webgpu/89108)

<div class="topic-metadata">

**Author:** [@Emeric\_Beaufays](https://discourse.threejs.org/u/Emeric_Beaufays)\
**Replies:** 1\
**Last updated:** [January 14, 2026, 3:41pm UTC](https://discourse.threejs.org/t/batchedmesh-setmatrixat-delay-with-webgpu/89108 "2026-01-14T15:41:21Z")

</div>

Using BatchedMesh with webGPU renderer: when setting a per instance matrix via #setMatrixAt, I notice that the matrices aren’t necessarily updated on GPU synchronously. Instances (sometimes) appear at the wrong location …

---

## [BatchedMesh LOD](https://discourse.threejs.org/t/batchedmesh-lod/82449)

<div class="topic-metadata">

**Author:** [@agargaro](https://discourse.threejs.org/u/agargaro)\
**Replies:** 0\
**Last updated:** [May 12, 2025, 10:30pm UTC](https://discourse.threejs.org/t/batchedmesh-lod/82449 "2025-05-12T22:30:20Z")

</div>

Hi guys, I added to my npm package @three.ez/batched-mesh-extensions an extension to handle LODs of BatchedMesh. Currently only LODs of geometries that share the same vertex array are supported. When adding a geometry t…

---

## [BatchedMesh 1 milion instances using a BVH](https://discourse.threejs.org/t/batchedmesh-1-milion-instances-using-a-bvh/82028)

<div class="topic-metadata">

**Author:** [@agargaro](https://discourse.threejs.org/u/agargaro)\
**Replies:** 3\
**Last updated:** [May 6, 2025, 7:37pm UTC](https://discourse.threejs.org/t/batchedmesh-1-milion-instances-using-a-bvh/82028 "2025-05-06T19:37:50Z")

</div>

Hi guys, I added to my npm package @three.ez/batched-mesh-extensions an extension to create and use a BVH to speed up raycasting and frustum culling of BatchedMesh. Here is the example (should runs smooth on mobile too)…

---

## [BatchedMesh uniform per instance](https://discourse.threejs.org/t/batchedmesh-uniform-per-instance/81665)

<div class="topic-metadata">

**Author:** [@agargaro](https://discourse.threejs.org/u/agargaro)\
**Replies:** 7\
**Last updated:** [April 27, 2025, 6:48pm UTC](https://discourse.threejs.org/t/batchedmesh-uniform-per-instance/81665 "2025-04-27T18:48:56Z")

</div>

Hi guys, I’ve developed a small library to be able to set custom uniform for each instance of BatchedMesh, if anyone is interested: Any uniform of the material, can be overwritten. The uniforms texture supports the p…

---

## [BatchedMesh set per-instance opacity](https://discourse.threejs.org/t/batchedmesh-set-per-instance-opacity/64170)

<div class="topic-metadata">

**Author:** [@kikedao](https://discourse.threejs.org/u/kikedao)\
**Replies:** 10\
**Last updated:** [February 28, 2025, 11:40am UTC](https://discourse.threejs.org/t/batchedmesh-set-per-instance-opacity/64170 "2025-02-28T11:40:57Z")

</div>

Hi! I really need to be able to animate the opacity of each instance (geometry) in a BatchedMesh with thousands of instances. I know how to do that using InstancedMesh and an InstancedBufferAttribute with no problem an…

---

## [Vertex shader to prevent instances to be affected by camera zoom and rotation](https://discourse.threejs.org/t/vertex-shader-to-prevent-instances-to-be-affected-by-camera-zoom-and-rotation/77185)

<div class="topic-metadata">

**Author:** [@kikedao](https://discourse.threejs.org/u/kikedao)\
**Replies:** 10\
**Last updated:** [January 31, 2025, 12:14pm UTC](https://discourse.threejs.org/t/vertex-shader-to-prevent-instances-to-be-affected-by-camera-zoom-and-rotation/77185 "2025-01-31T12:14:47Z")

</div>

Hi all! I’m using InstancedMesh and BatchedMesh to display thousands (even dozens/hundreds of thousands) of labels I use for the UI of my project. To be able to use them as intended I need them to look always the same …

---

## [Disable rendering of certain InstancedMesh and BatchedMesh instances](https://discourse.threejs.org/t/disable-rendering-of-certain-instancedmesh-and-batchedmesh-instances/75261)

<div class="topic-metadata">

**Author:** [@kikedao](https://discourse.threejs.org/u/kikedao)\
**Replies:** 2\
**Last updated:** [December 17, 2024, 2:27pm UTC](https://discourse.threejs.org/t/disable-rendering-of-certain-instancedmesh-and-batchedmesh-instances/75261 "2024-12-17T14:27:19Z")

</div>

Hi all! I have the following problem: My app renders a graph that can have many nodes/symbols. Let’s say more than 200k. To render it I use InstancedMesh and BatchedMesh (BatchedMesh for the links between symbols). Be…

---

## [BatchedMesh Outline](https://discourse.threejs.org/t/batchedmesh-outline/74484)

<div class="topic-metadata">

**Author:** [@marluc](https://discourse.threejs.org/u/marluc)\
**Replies:** 0\
**Last updated:** [November 27, 2024, 11:44am UTC](https://discourse.threejs.org/t/batchedmesh-outline/74484 "2024-11-27T11:44:29Z")

</div>

Hi, I have a scene for which I’m using BatchedMesh for draw calls optimisation - I’m handling user passed models and it might be up to ~3k elements with milions of faces and so far BatchedMesh is handling it good… My on…

---

## [Strange behaviour SetColorAt with BatchedMesh](https://discourse.threejs.org/t/strange-behaviour-setcolorat-with-batchedmesh/74446)

<div class="topic-metadata">

**Author:** [@Maddog\_Eddy](https://discourse.threejs.org/u/Maddog_Eddy)\
**Replies:** 4\
**Last updated:** [November 26, 2024, 8:00pm UTC](https://discourse.threejs.org/t/strange-behaviour-setcolorat-with-batchedmesh/74446 "2024-11-26T20:00:17Z")

</div>

I was seeing something strange in my app when i switch to BatcheMesh. In the app you can select a mesh from a model and that selected one then changes the color. When i then set the color back it is different from the o…

---

## [BatchedMesh for InstancedBufferGeometry](https://discourse.threejs.org/t/batchedmesh-for-instancedbuffergeometry/73404)

<div class="topic-metadata">

**Author:** [@Chaser\_Code](https://discourse.threejs.org/u/Chaser_Code)\
**Replies:** 4\
**Last updated:** [October 30, 2024, 9:13am UTC](https://discourse.threejs.org/t/batchedmesh-for-instancedbuffergeometry/73404 "2024-10-30T09:13:27Z")

</div>

I found that BatchedMesh convert InstancedBufferGeometry to BufferGeometry. Maybe in future will be added option to save InstancedBufferGeometry it will be hellpfull for grass instancing and performance instead Instanced…

---

## [How can I use DataTexture for BatchedMesh to access per-instance data in shader?](https://discourse.threejs.org/t/how-can-i-use-datatexture-for-batchedmesh-to-access-per-instance-data-in-shader/72996)

<div class="topic-metadata">

**Author:** [@ingun37](https://discourse.threejs.org/u/ingun37)\
**Replies:** 5\
**Last updated:** [October 21, 2024, 11:11am UTC](https://discourse.threejs.org/t/how-can-i-use-datatexture-for-batchedmesh-to-access-per-instance-data-in-shader/72996 "2024-10-21T11:11:22Z")

</div>

I was using InstancedMesh with custom InstancedBufferAttributes. Then I got to have many of such InstancedMeshs that use the same material, so I tried to use BatchedMesh to draw them at once. But I was getting some inter…

---

## [Can I draw many InstancedMeshes using BatchedMesh](https://discourse.threejs.org/t/can-i-draw-many-instancedmeshes-using-batchedmesh/71077)

<div class="topic-metadata">

**Author:** [@ingun37](https://discourse.threejs.org/u/ingun37)\
**Replies:** 3\
**Last updated:** [September 24, 2024, 8:52am UTC](https://discourse.threejs.org/t/can-i-draw-many-instancedmeshes-using-batchedmesh/71077 "2024-09-24T08:52:26Z")

</div>

I need to draw many InstancedMeshes that use the same material. Can I somehow use batch rendering in this case? I guess I can’t directly use BatchedMesh but is there a work around?

---

## [batchedMesh remove batchID not available](https://discourse.threejs.org/t/batchedmesh-remove-batchid-not-available/70853)

<div class="topic-metadata">

**Author:** [@JeromeP](https://discourse.threejs.org/u/JeromeP)\
**Replies:** 0\
**Last updated:** [September 18, 2024, 10:17am UTC](https://discourse.threejs.org/t/batchedmesh-remove-batchid-not-available/70853 "2024-09-18T10:17:02Z")

</div>

using batchedMesh, i succeed to decrease the Rendring calls from 30000 to 130, wich is fine. But when i want to unload objects from my scene, i’m not able to remove specific geometriesfrom existing batchedMesh

---

## [How to optimize draw calls in Three.js when updating polyline in real-time?](https://discourse.threejs.org/t/how-to-optimize-draw-calls-in-three-js-when-updating-polyline-in-real-time/69203)

<div class="topic-metadata">

**Author:** [@wc19950724](https://discourse.threejs.org/u/wc19950724)\
**Replies:** 1\
**Last updated:** [August 12, 2024, 11:27pm UTC](https://discourse.threejs.org/t/how-to-optimize-draw-calls-in-three-js-when-updating-polyline-in-real-time/69203 "2024-08-12T23:27:12Z")

</div>

I’m working on a Three.js demo that simulates a car driving and dynamically visualizes its surrounding environment in real-time. To maintain smooth performance, the update method is triggered frequently in each render lo…

---

## [Geometry flickering in BatchedMesh with opacity and different colors on camera control](https://discourse.threejs.org/t/geometry-flickering-in-batchedmesh-with-opacity-and-different-colors-on-camera-control/66862)

<div class="topic-metadata">

**Author:** [@nikmusi](https://discourse.threejs.org/u/nikmusi)\
**Replies:** 3\
**Last updated:** [June 17, 2024, 2:19pm UTC](https://discourse.threejs.org/t/geometry-flickering-in-batchedmesh-with-opacity-and-different-colors-on-camera-control/66862 "2024-06-17T14:19:24Z")

</div>

Hello everyone, I am experiencing geometry-flickering issues between different colored geometries, when the setColorAt() function is used to assigned different colors to elements of a batchedMesh with opacity. As shown …

---

## [BatchedMesh: per-geometry opacity?](https://discourse.threejs.org/t/batchedmesh-per-geometry-opacity/61284)

<div class="topic-metadata">

**Author:** [@trusktr](https://discourse.threejs.org/u/trusktr)\
**Replies:** 2\
**Last updated:** [February 10, 2024, 9:53pm UTC](https://discourse.threejs.org/t/batchedmesh-per-geometry-opacity/61284 "2024-02-10T21:53:19Z")

</div>

Based on past conversations InstancedMesh was not ideal for having a setOpacityAt method because of lacking sorting. (I disagreed because there are still use cases that don’t require sorting) The new BatchedMesh class d…

---

## [Text not showing up on Android devices](https://discourse.threejs.org/t/text-not-showing-up-on-android-devices/30777)

<div class="topic-metadata">

**Author:** [@D13](https://discourse.threejs.org/u/D13)\
**Replies:** 0\
**Last updated:** [October 12, 2021, 10:31pm UTC](https://discourse.threejs.org/t/text-not-showing-up-on-android-devices/30777 "2021-10-12T22:31:15Z")

</div>

I’m using a batchedMesh that has a custom shader. The shader shows up everywhere even on iOS now, after some tweaking, but, not android. Is there a known issue with android with certain types of shaders? Is there somethi…
