# \#instancedbuffergeometry

**URL:** https://discourse.threejs.org/tag/instancedbuffergeometry/1345.md

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

---

## [States of a box](https://discourse.threejs.org/t/states-of-a-box/87186)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 3\
**Last updated:** [September 26, 2025, 7:18am UTC](https://discourse.threejs.org/t/states-of-a-box/87186 "2025-09-26T07:18:32Z")

</div>

Hi community! Picture: Demo: https://codepen.io/prisoner849/full/qEbEveG The first thought was “let’s build a box of boxes, using InstancedBufferGeometry, but coortinates of an instance will be based in its index”. …

---

## [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…

---

## [Instanced Buffer Attribute - Can't set from onBeforeRender callback](https://discourse.threejs.org/t/instanced-buffer-attribute-cant-set-from-onbeforerender-callback/67548)

<div class="topic-metadata">

**Author:** [@Alforofus](https://discourse.threejs.org/u/Alforofus)\
**Replies:** 26\
**Last updated:** [July 5, 2024, 4:43pm UTC](https://discourse.threejs.org/t/instanced-buffer-attribute-cant-set-from-onbeforerender-callback/67548 "2024-07-05T16:43:21Z")

</div>

I have this example here which doesn’t set a buffer if it is in onBeforeRender callback. Why doesn’t this work?

---

## [Instanced Buffer Attribute - Shader not receiving any values from attribute](https://discourse.threejs.org/t/instanced-buffer-attribute-shader-not-receiving-any-values-from-attribute/66949)

<div class="topic-metadata">

**Author:** [@Alforofus](https://discourse.threejs.org/u/Alforofus)\
**Replies:** 0\
**Last updated:** [June 17, 2024, 12:56pm UTC](https://discourse.threejs.org/t/instanced-buffer-attribute-shader-not-receiving-any-values-from-attribute/66949 "2024-06-17T12:56:23Z")

</div>

Already posted this into THREEJS discord server, so just gonna copy it here: You can open this sandbox code: sandbox code In the sandboxe code, IdMaterial is a material that should act as an identifier for objects from…

---

## [envMap not working on instancedBufferGeometry + shaderMaterial](https://discourse.threejs.org/t/envmap-not-working-on-instancedbuffergeometry-shadermaterial/60221)

<div class="topic-metadata">

**Author:** [@Evan\_Jin](https://discourse.threejs.org/u/Evan_Jin)\
**Replies:** 6\
**Last updated:** [January 14, 2024, 8:10am UTC](https://discourse.threejs.org/t/envmap-not-working-on-instancedbuffergeometry-shadermaterial/60221 "2024-01-14T08:10:43Z")

</div>

Hi, I want to apply envMap on instancedBufferGeometry but not working… based on this example: https://codepen.io/kabukimono/pen/eYpaNKK?editors=0010 I made my geometry like below, const COUNT = 100 const particleG…

---

## [Nefertiti of Golden Ribbons](https://discourse.threejs.org/t/nefertiti-of-golden-ribbons/57015)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 2\
**Last updated:** [October 14, 2023, 10:16pm UTC](https://discourse.threejs.org/t/nefertiti-of-golden-ribbons/57015 "2023-10-14T22:16:17Z")

</div>

Hi community! Video: Demo: https://codepen.io/prisoner849/full/RwEOZrv Having this, it was inevitable to come to the idea of the using of DepthTexture with instanced ribbons. :slight\_smile:

---

## [Noisy ribbons \[instancing, shadows\]](https://discourse.threejs.org/t/noisy-ribbons-instancing-shadows/56830)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 5\
**Last updated:** [October 11, 2023, 6:59am UTC](https://discourse.threejs.org/t/noisy-ribbons-instancing-shadows/56830 "2023-10-11T06:59:47Z")

</div>

Hi community! Video: Demo: https://codepen.io/prisoner849/full/JjwwVWq This sketch inspired by the awesome video from @akella : https://www.youtube.com/watch?v=HbM3u3Qu\_Mc I like the visual, so I made it m…

---

## [Are InstancedBufferGeometry or InstancedMesh suitable for child meshes in quadtrees?](https://discourse.threejs.org/t/are-instancedbuffergeometry-or-instancedmesh-suitable-for-child-meshes-in-quadtrees/55676)

<div class="topic-metadata">

**Author:** [@Attila\_Schroeder](https://discourse.threejs.org/u/Attila_Schroeder)\
**Replies:** 1\
**Last updated:** [September 5, 2023, 12:45am UTC](https://discourse.threejs.org/t/are-instancedbuffergeometry-or-instancedmesh-suitable-for-child-meshes-in-quadtrees/55676 "2023-09-05T00:45:10Z")

</div>

I became aware of InstancedBufferGeometry while doing my research yesterday afternoon. At the moment I create a new bufferGeometry and a new mesh for each child in my quadtree. The material is always a clone because each…

---

## [Shadows on InstancedBufferGeometry mesh](https://discourse.threejs.org/t/shadows-on-instancedbuffergeometry-mesh/54490)

<div class="topic-metadata">

**Author:** [@Upgrayedd](https://discourse.threejs.org/u/Upgrayedd)\
**Replies:** 1\
**Last updated:** [August 1, 2023, 10:05am UTC](https://discourse.threejs.org/t/shadows-on-instancedbuffergeometry-mesh/54490 "2023-08-01T10:05:42Z")

</div>

I’m trying to make shadows work on InstancedBufferGeometry mesh. I created the mesh and applied extended standard material to it. I modified vertex shader to offset each instance of geometry by random vector. Unfortunate…

---

## [Is there a way to render some segments of LineSegmentsGeometry instead of all the segments?](https://discourse.threejs.org/t/is-there-a-way-to-render-some-segments-of-linesegmentsgeometry-instead-of-all-the-segments/49722)

<div class="topic-metadata">

**Author:** [@zeroFire](https://discourse.threejs.org/u/zeroFire)\
**Replies:** 0\
**Last updated:** [March 28, 2023, 11:22pm UTC](https://discourse.threejs.org/t/is-there-a-way-to-render-some-segments-of-linesegmentsgeometry-instead-of-all-the-segments/49722 "2023-03-28T23:22:50Z")

</div>

I have a Line2 object, using LineSegmentsGeometry. without changing the buffers, can i render a range of segments, instead of all the segments? …/examples/jsm/lines/LineSegmentsGeometry.js

---

## [Vertexless: Line + InstancedBufferGeometry + DataTexture](https://discourse.threejs.org/t/vertexless-line-instancedbuffergeometry-datatexture/46016)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 2\
**Last updated:** [December 21, 2022, 7:45am UTC](https://discourse.threejs.org/t/vertexless-line-instancedbuffergeometry-datatexture/46016 "2022-12-21T07:45:06Z")

</div>

Hi community! Picture: Demo: https://codepen.io/prisoner849/pen/ZEjEwmJ Working on it was a good reminder of not to call normalize() on vectors of zero length :smiling\_face\_with\_tear:

---

## [InstancedBufferGeometry & glsl -\> uv texture question](https://discourse.threejs.org/t/instancedbuffergeometry-glsl-uv-texture-question/44483)

<div class="topic-metadata">

**Author:** [@midw](https://discourse.threejs.org/u/midw)\
**Replies:** 0\
**Last updated:** [November 9, 2022, 7:18am UTC](https://discourse.threejs.org/t/instancedbuffergeometry-glsl-uv-texture-question/44483 "2022-11-09T07:18:30Z")

</div>

Hello hi, I’d like to ask you a question about threejs Instant Buffer Geometry & glsl. The screenshot above is what the Blender editor window. As you can see, the instanced particles have a color value according …
