# \#octree

**URL:** https://forum.babylonjs.com/tag/octree/174.md

[Latest](https://forum.babylonjs.com/latest.md) · [Categories](https://forum.babylonjs.com/categories.md) · [Tags](https://forum.babylonjs.com/tags.md)

---

## [Octree submesh picking returns incorrect subMeshId](https://forum.babylonjs.com/t/octree-submesh-picking-returns-incorrect-submeshid/59716)

<div class="topic-metadata">

**Author:** [@Scott\_Baldric](https://forum.babylonjs.com/u/Scott_Baldric)\
**Replies:** 3\
**Last updated:** [July 25, 2025, 4:48pm UTC](https://forum.babylonjs.com/t/octree-submesh-picking-returns-incorrect-submeshid/59716 "2025-07-25T16:48:18Z")

</div>

Hello, While attempting to use the submesh octree to speed up submesh selection, I came across what appears to be a bug in the submesh octree picking info result. Here is a reproduction where if I am or am not using th…

---

## [Snapshot rendering glow layer penetration](https://forum.babylonjs.com/t/snapshot-rendering-glow-layer-penetration/47459)

<div class="topic-metadata">

**Author:** [@zhangyahan](https://forum.babylonjs.com/u/zhangyahan)\
**Replies:** 9\
**Last updated:** [January 29, 2024, 9:35pm UTC](https://forum.babylonjs.com/t/snapshot-rendering-glow-layer-penetration/47459 "2024-01-29T21:35:15Z")

</div>

with some angles, the box does not block the luminous layer behind it. I struggled with this problem for a long time, until I replicated it at pg. Please give me some advice I applied everything that could be optimize…

---

## [Ray casting from selected submeshes](https://forum.babylonjs.com/t/ray-casting-from-selected-submeshes/42980)

<div class="topic-metadata">

**Author:** [@Karan](https://forum.babylonjs.com/u/Karan)\
**Replies:** 6\
**Last updated:** [August 28, 2023, 12:42pm UTC](https://forum.babylonjs.com/t/ray-casting-from-selected-submeshes/42980 "2023-08-28T12:42:23Z")

</div>

Hello, I am trying to ray cast from selected submeshes. But I am not getting the unexpected result as follow. What is the correct way to cast a ray from selected submesh

---

## [Best practices for octree-optimized collision detection](https://forum.babylonjs.com/t/best-practices-for-octree-optimized-collision-detection/37957)

<div class="topic-metadata">

**Author:** [@han\_Gao](https://forum.babylonjs.com/u/han_Gao)\
**Replies:** 4\
**Last updated:** [February 8, 2023, 9:06am UTC](https://forum.babylonjs.com/t/best-practices-for-octree-optimized-collision-detection/37957 "2023-02-08T09:06:21Z")

</div>

I want to use octree to optimize the collision detection of roaming space, now there are three problems Whether the space division is for the whole scene or the mesh for collision detection, I think it is the whole …

---

## [Meshes that added to scene after createOrUpdateSelectionOctree get invisible](https://forum.babylonjs.com/t/meshes-that-added-to-scene-after-createorupdateselectionoctree-get-invisible/32927)

<div class="topic-metadata">

**Author:** [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Replies:** 1\
**Last updated:** [August 10, 2022, 11:17pm UTC](https://forum.babylonjs.com/t/meshes-that-added-to-scene-after-createorupdateselectionoctree-get-invisible/32927 "2022-08-10T23:17:02Z")

</div>

Attention to lines: // scene.createOrUpdateSelectionOctree(); BABYLON.MeshBuilder.CreateBox("box", {size: 1}, scene); // scene.createOrUpdateSelectionOctree(); it’s provide to expected behavior: But when we add a …

---

## [Is there available to get intersectsMesh with using of octree?](https://forum.babylonjs.com/t/is-there-available-to-get-intersectsmesh-with-using-of-octree/32829)

<div class="topic-metadata">

**Author:** [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Replies:** 5\
**Last updated:** [August 8, 2022, 1:49pm UTC](https://forum.babylonjs.com/t/is-there-available-to-get-intersectsmesh-with-using-of-octree/32829 "2022-08-08T13:49:21Z")

</div>

I did not found suitable method with Octree to get interectsMesh. As I guess it should be possible to use octree optimization for interectsMesh. I have a scene with a lot of meshes, and when I run interectsMesh() to eve…

---

## [How do octrees work?](https://forum.babylonjs.com/t/how-do-octrees-work/32043)

<div class="topic-metadata">

**Author:** [@arcman7](https://forum.babylonjs.com/u/arcman7)\
**Replies:** 3\
**Last updated:** [July 12, 2022, 4:11pm UTC](https://forum.babylonjs.com/t/how-do-octrees-work/32043 "2022-07-12T16:11:24Z")

</div>

I set up a playground to do some simple testing of the octree methods. I don’t think I understand what the octree.intersects method is supposed to be doing. In the playground I linked below, an octree is created using th…
