# Disable mesh selection + frustum clipping?

**URL:** <https://forum.babylonjs.com/t/disable-mesh-selection-frustum-clipping/57906>\
**Category:** Questions\
**Created:** [April 18, 2025, 11:15am UTC](https://forum.babylonjs.com/t/disable-mesh-selection-frustum-clipping/57906 "2025-04-18T11:15:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Pan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/peter_pan/32/45182_2.png) [@Peter\_Pan](https://forum.babylonjs.com/u/Peter_Pan)\
**Post date:** [April 18, 2025, 11:15am UTC](https://forum.babylonjs.com/t/disable-mesh-selection-frustum-clipping/57906/1 "2025-04-18T11:15:58Z")

</div>

Hi, I see that a lot of time is spend on evaluateActiveMeshes, so my main question is if its possible to disable it at all?

My scene itself has only one **orthographic** camera and a 2.5d top down view, since the view range is limited, all meshes which are shown are either in the cameras view or wouldn’t make a big difference if they are taken into account or not for rendering. I expect that 80% of the meshes will also **move or change its rotation** and **that meshes are added/removed constantly**.

I created a small playground which contains way more meshes then in my actual scene but it shows the problem I have:

> **[Babylon.js Playground](https://playground.babylonjs.com/#GBBIFZ%232)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

What I tried:

- doNotSyncBoundingInfo = true
- alwaysSelectAsActiveMesh = true
- skipFrustumClipping = true

But I still get mesh selection time of 4ms which is for the 240fps target I have too high (I would actually expect it to be at 0ms).

Adding something like that (just testing if that would help in some way) actually removes the selection time but creates problem that sometimes the meshes disappear:

> **[Babylon.js Playground](https://playground.babylonjs.com/#GBBIFZ%233)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

```auto
    setInterval(() => {
      scene.unfreezeActiveMeshes();
      setTimeout(() => {
        scene.freezeActiveMeshes(true, undefined, undefined, true, false);
        scene.skipFrustumClipping = true;
      }, 50);
    }, 1000);

```

**Am I understanding something wrong that alwaysSelectAsActiveMesh should actually reduce the time spent there by a lot since all meshes have that set?**

---

<div class="post-metadata">

**Author:** ![kzhsw](https://avatars.discourse-cdn.com/v4/letter/k/848f3c/32.png) [@kzhsw](https://forum.babylonjs.com/u/kzhsw)\
**Post date:** [April 18, 2025, 12:27pm UTC](https://forum.babylonjs.com/t/disable-mesh-selection-frustum-clipping/57906/2 "2025-04-18T12:27:59Z")

</div>

In fast mode of [Snapshot Rendering](https://doc.babylonjs.com/setup/support/webGPU/webGPUOptimization/webGPUSnapshotRendering/), `_evaluateActiveMeshes` is completely skipped, see the code below:

> <https://github.com/BabylonJS/Babylon.js/blob/42e38a98459687c3f41bc0bb8f7613aad77ff9d0/packages/dev/core/src/scene.ts#L4251>

---

<div class="post-metadata">

**Author:** ![Peter\_Pan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/peter_pan/32/45182_2.png) [@Peter\_Pan](https://forum.babylonjs.com/u/Peter_Pan)\
**Post date:** [April 18, 2025, 1:01pm UTC](https://forum.babylonjs.com/t/disable-mesh-selection-frustum-clipping/57906/3 "2025-04-18T13:01:06Z")

</div>

That indeed disables it completely, but then the meshes do not move/rotate and it does work only on webgpu, is something like that possible in webgl too?

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [April 18, 2025, 4:26pm UTC](https://forum.babylonjs.com/t/disable-mesh-selection-frustum-clipping/57906/4 "2025-04-18T16:26:54Z")

</div>

if you call this, you should not have ANY time spent on the evaluateActiveMeshes

```auto
scene.freezeActiveMeshes(true, undefined, undefined, true, false);

```

[Disable mesh selection | Babylon.js Playground](https://playground.babylonjs.com/#GBBIFZ#4)  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/6/66a342b486b9d1fb669ecce78cf3283e3fb3ecb0.png)

But as you are moving meshes around, it forces the system to reevaluate the World Matrices (which is expected as you move them :))

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [April 18, 2025, 4:27pm UTC](https://forum.babylonjs.com/t/disable-mesh-selection-frustum-clipping/57906/5 "2025-04-18T16:27:19Z")

</div>

snapshot is a Webgpu feature

---

<div class="post-metadata">

**Author:** ![Peter\_Pan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/peter_pan/32/45182_2.png) [@Peter\_Pan](https://forum.babylonjs.com/u/Peter_Pan)\
**Post date:** [April 18, 2025, 5:41pm UTC](https://forum.babylonjs.com/t/disable-mesh-selection-frustum-clipping/57906/6 "2025-04-18T17:41:02Z")

</div>

Yes thank you that was what I was searching for
