# \#layers

**URL:** https://discourse.threejs.org/tag/layers/287.md

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

---

## [Perception \[of visuals\]](https://discourse.threejs.org/t/perception-of-visuals/87466)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 2\
**Last updated:** [October 11, 2025, 2:25pm UTC](https://discourse.threejs.org/t/perception-of-visuals/87466 "2025-10-11T14:25:20Z")

</div>

Hi community! Picture: Demo: https://codepen.io/prisoner849/full/azdwJwX In essence, there is a scene, rendered into two rendertargets, with some objects, whose layers toggled at rendering. And then, those render t…

---

## [Issue with Rendering HTML iframe in WebXR Quad Layer with Three.js](https://discourse.threejs.org/t/issue-with-rendering-html-iframe-in-webxr-quad-layer-with-three-js/81761)

<div class="topic-metadata">

**Author:** [@wildy13](https://discourse.threejs.org/u/wildy13)\
**Replies:** 3\
**Last updated:** [May 2, 2025, 1:32am UTC](https://discourse.threejs.org/t/issue-with-rendering-html-iframe-in-webxr-quad-layer-with-three-js/81761 "2025-05-02T01:32:49Z")

</div>

Hi everyone, I’m currently working on a Three.js project where I want to display a 2D HTML interface (like an iframe or a webpage) in a WebXR environment (VR/AR) as a Quad Layer. Here’s what I want to achieve: I have…

---

## [Native video layer in WebXR](https://discourse.threejs.org/t/native-video-layer-in-webxr/81617)

<div class="topic-metadata">

**Author:** [@danrossi](https://discourse.threejs.org/u/danrossi)\
**Replies:** 1\
**Last updated:** [April 25, 2025, 1:13pm UTC](https://discourse.threejs.org/t/native-video-layer-in-webxr/81617 "2025-04-25T13:13:20Z")

</div>

I am investigating native video layers for Quest headsets in WebXR. There is two examples but not sure which method to use. I have a group of controls meshes that is overlayed on top so not sure how to add that into a la…

---

## [Best Way to Toggle Overlay Layers in React Three Fiber?](https://discourse.threejs.org/t/best-way-to-toggle-overlay-layers-in-react-three-fiber/78107)

<div class="topic-metadata">

**Author:** [@lhb](https://discourse.threejs.org/u/lhb)\
**Replies:** 1\
**Last updated:** [February 16, 2025, 2:31am UTC](https://discourse.threejs.org/t/best-way-to-toggle-overlay-layers-in-react-three-fiber/78107 "2025-02-16T02:31:34Z")

</div>

I want a corresponding layer to appear over the selected area when clicking any button, like in the image. I was thinking of creating extra models and toggling their visibility on click, but that doesn’t seem very effici…

---

## [Using layers for raycasting](https://discourse.threejs.org/t/using-layers-for-raycasting/77809)

<div class="topic-metadata">

**Author:** [@Jo\_Youzarsif](https://discourse.threejs.org/u/Jo_Youzarsif)\
**Replies:** 4\
**Last updated:** [February 9, 2025, 11:21am UTC](https://discourse.threejs.org/t/using-layers-for-raycasting/77809 "2025-02-09T11:21:03Z")

</div>

hello, I’m trying to use layers to manage my intersect objects but I’m lost! Let’s say I have a box that I intersect with raycast, I want to “disable” and “enable” it when needed. But the problem is I can’t understand …

---

## [Hidden layer's light not active when re enabled](https://discourse.threejs.org/t/hidden-layers-light-not-active-when-re-enabled/64165)

<div class="topic-metadata">

**Author:** [@ventoline](https://discourse.threejs.org/u/ventoline)\
**Replies:** 4\
**Last updated:** [April 16, 2024, 9:02pm UTC](https://discourse.threejs.org/t/hidden-layers-light-not-active-when-re-enabled/64165 "2024-04-16T21:02:25Z")

</div>

I have a scene with a ligh on an hidden layer, when i enable the layer the layer is not active, do i need to render the scene? let wireLight = new THREE.DirectionalLight(); wireLight.intensity = 10; wireLight.na…

---

## [Why does the subset of the object not inherit the layers of the parent first?](https://discourse.threejs.org/t/why-does-the-subset-of-the-object-not-inherit-the-layers-of-the-parent-first/60756)

<div class="topic-metadata">

**Author:** [@wc19950724](https://discourse.threejs.org/u/wc19950724)\
**Replies:** 2\
**Last updated:** [January 27, 2024, 1:22am UTC](https://discourse.threejs.org/t/why-does-the-subset-of-the-object-not-inherit-the-layers-of-the-parent-first/60756 "2024-01-27T01:22:42Z")

</div>

When I want an object to be on a separate layer, I find that I must set the layers of all its subsets to truly take effect. Why can’t I set the current object directly, and then all its subsets can inherit this layer? …

---

## [Layers and lights](https://discourse.threejs.org/t/layers-and-lights/4155)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 12\
**Last updated:** [January 16, 2024, 3:27pm UTC](https://discourse.threejs.org/t/layers-and-lights/4155 "2024-01-16T15:27:03Z")

</div>

Hi, community! Out of curiousity I wanted to create an example of objects, affected by lights. Here it is: https://jsfiddle.net/prisoner849/2w0stdfp/ There are two icosahedrons and two lights in the scene. One icosah…

---

## [Using layers to optimize application performance with Raycaster](https://discourse.threejs.org/t/using-layers-to-optimize-application-performance-with-raycaster/55822)

<div class="topic-metadata">

**Author:** [@RAUMIK\_RANA](https://discourse.threejs.org/u/RAUMIK_RANA)\
**Replies:** 2\
**Last updated:** [September 13, 2023, 8:48am UTC](https://discourse.threejs.org/t/using-layers-to-optimize-application-performance-with-raycaster/55822 "2023-09-13T08:48:21Z")

</div>

In this video, I’ll demonstrate how utilizing layers can significantly enhance the efficiency of raycasting in Three.js We don’t need to manage separate arrays which meshes should include in raycasting or not. …

---

## [How to load gltf models on different layer so that it can not overlap to each other?](https://discourse.threejs.org/t/how-to-load-gltf-models-on-different-layer-so-that-it-can-not-overlap-to-each-other/51992)

<div class="topic-metadata">

**Author:** [@vidyamodak](https://discourse.threejs.org/u/vidyamodak)\
**Replies:** 0\
**Last updated:** [May 25, 2023, 5:30am UTC](https://discourse.threejs.org/t/how-to-load-gltf-models-on-different-layer-so-that-it-can-not-overlap-to-each-other/51992 "2023-05-25T05:30:14Z")

</div>

hello, I am new to three js and I am trying to import multiple gltf model on same scene, but they are overlapping. I tried using different scene for each model but it made orbit controls functionality work unproperly. I …

---

## [Layers and WebXR](https://discourse.threejs.org/t/layers-and-webxr/17751)

<div class="topic-metadata">

**Author:** [@phxbf](https://discourse.threejs.org/u/phxbf)\
**Replies:** 5\
**Last updated:** [February 22, 2023, 6:39pm UTC](https://discourse.threejs.org/t/layers-and-webxr/17751 "2023-02-22T18:39:58Z")

</div>

Hi guys I’m playing a bit with layers (set, enable, etc…), so far I can assign a specific mask to an Object3D (lets say “A”) that can be filtered by a camera or a raycaster. For instance lets suppose A.layers.enable(2) …

---

## [Transform controls on a specific layer](https://discourse.threejs.org/t/transform-controls-on-a-specific-layer/13393)

<div class="topic-metadata">

**Author:** [@notchris](https://discourse.threejs.org/u/notchris)\
**Replies:** 3\
**Last updated:** [October 25, 2022, 8:04am UTC](https://discourse.threejs.org/t/transform-controls-on-a-specific-layer/13393 "2022-10-25T08:04:48Z")

</div>

Hello, I’m attempting to set transform controls to a specific layer, however, it seems that the controls are always set to layer 2? Attempting to toggle the layer does not change visibility of the controls in multiple re…

---

## [How to use EffectComposer with multiple layers?](https://discourse.threejs.org/t/how-to-use-effectcomposer-with-multiple-layers/43896)

<div class="topic-metadata">

**Author:** [@ramblinMatt](https://discourse.threejs.org/u/ramblinMatt)\
**Replies:** 3\
**Last updated:** [October 24, 2022, 2:10pm UTC](https://discourse.threejs.org/t/how-to-use-effectcomposer-with-multiple-layers/43896 "2022-10-24T14:10:09Z")

</div>

I am using EffectComposer via postprocessing and r3f to try and add effects to a scene with 3 layers. The scene contains a portal to another world. layer 0 is the world outside of the portal. layer 1 is my stencil buff…

---

## [Selective Bloom ordering puzzle](https://discourse.threejs.org/t/selective-bloom-ordering-puzzle/43150)

<div class="topic-metadata">

**Author:** [@flinton](https://discourse.threejs.org/u/flinton)\
**Replies:** 3\
**Last updated:** [October 5, 2022, 7:57pm UTC](https://discourse.threejs.org/t/selective-bloom-ordering-puzzle/43150 "2022-10-05T19:57:50Z")

</div>

Hello, I’ve been beaten by this issue, after extensively looking for a solution and trying many ways to overcome it I just cannot figure it out… The end result I’m looking for is the glow to be at the forefront of the …

---

## [Is there a way to have a mesh occlude other objects on multiple layers, but only be visible on one layer?](https://discourse.threejs.org/t/is-there-a-way-to-have-a-mesh-occlude-other-objects-on-multiple-layers-but-only-be-visible-on-one-layer/41774)

<div class="topic-metadata">

**Author:** [@infared\_wifi](https://discourse.threejs.org/u/infared_wifi)\
**Replies:** 5\
**Last updated:** [August 23, 2022, 7:13pm UTC](https://discourse.threejs.org/t/is-there-a-way-to-have-a-mesh-occlude-other-objects-on-multiple-layers-but-only-be-visible-on-one-layer/41774 "2022-08-23T19:13:06Z")

</div>

Hi, I currently have 2 renderers with 2 cameras, each rendering the same scene. I have a type of object that is on a layer with one of the cameras, so it is only visible on one of the renderers. I would like to maintain…

---

## [How to set layers of a CubeCamera?](https://discourse.threejs.org/t/how-to-set-layers-of-a-cubecamera/35852)

<div class="topic-metadata">

**Author:** [@jackkutilek](https://discourse.threejs.org/u/jackkutilek)\
**Replies:** 2\
**Last updated:** [March 14, 2022, 3:34pm UTC](https://discourse.threejs.org/t/how-to-set-layers-of-a-cubecamera/35852 "2022-03-14T15:34:40Z")

</div>

Setting a CubeCamera’s layers property does not set the child camera’s layers as well. This is expected, since layers do not automatically update in children. I see that the layers property is copied to each child camer…

---

## [An open source spline-like layer material for THREEJS](https://discourse.threejs.org/t/an-open-source-spline-like-layer-material-for-threejs/34436)

<div class="topic-metadata">

**Author:** [@drcmda](https://discourse.threejs.org/u/drcmda)\
**Replies:** 0\
**Last updated:** [February 2, 2022, 9:56pm UTC](https://discourse.threejs.org/t/an-open-source-spline-like-layer-material-for-threejs/34436 "2022-02-02T21:56:26Z")

</div>

Enjoy https://twitter.com/CantBeFaraz/status/1488992502036275206 :hugs:

---

## [Question about Mapbox-gl +Three.js interaction](https://discourse.threejs.org/t/question-about-mapbox-gl-three-js-interaction/33179)

<div class="topic-metadata">

**Author:** [@Equilibrium](https://discourse.threejs.org/u/Equilibrium)\
**Replies:** 0\
**Last updated:** [December 31, 2021, 4:58pm UTC](https://discourse.threejs.org/t/question-about-mapbox-gl-three-js-interaction/33179 "2021-12-31T16:58:23Z")

</div>

Hello! I am trying to use Mapbox-gl and Three.js together but have one problem and two questions. The problem is that if I switch Mapbox styles with 3d model attached to it, my application crashes after several style swi…

---

## [Is it possible to exclude elements from rendering in a Reflector?](https://discourse.threejs.org/t/is-it-possible-to-exclude-elements-from-rendering-in-a-reflector/31262)

<div class="topic-metadata">

**Author:** [@oveddan](https://discourse.threejs.org/u/oveddan)\
**Replies:** 1\
**Last updated:** [October 29, 2021, 8:30am UTC](https://discourse.threejs.org/t/is-it-possible-to-exclude-elements-from-rendering-in-a-reflector/31262 "2021-10-29T08:30:28Z")

</div>

I don’t want certain elements to be rendered in a Reflector, mostly for performance reasons (I want to reduce draw calls). One way I think would do this would be to: Modify the Reflector.js class with the following: a…

---

## [Layer-assigned elements sometimes slip over and under where my z-index declarations should lead](https://discourse.threejs.org/t/layer-assigned-elements-sometimes-slip-over-and-under-where-my-z-index-declarations-should-lead/31271)

<div class="topic-metadata">

**Author:** [@Mapper](https://discourse.threejs.org/u/Mapper)\
**Replies:** 0\
**Last updated:** [October 29, 2021, 5:50am UTC](https://discourse.threejs.org/t/layer-assigned-elements-sometimes-slip-over-and-under-where-my-z-index-declarations-should-lead/31271 "2021-10-29T05:50:57Z")

</div>

I have prepared a browser-window environment on which I used CSS to assign particular contents to desired layers using z-index declarations. In the examples in the pictures, the container is set to z-index 0 the label …

---

## [Set a background image for only one of the two cameras in a separate Viewport](https://discourse.threejs.org/t/set-a-background-image-for-only-one-of-the-two-cameras-in-a-separate-viewport/27520)

<div class="topic-metadata">

**Author:** [@AlexGoryushkin](https://discourse.threejs.org/u/AlexGoryushkin)\
**Replies:** 1\
**Last updated:** [June 25, 2021, 9:22am UTC](https://discourse.threejs.org/t/set-a-background-image-for-only-one-of-the-two-cameras-in-a-separate-viewport/27520 "2021-06-25T09:22:32Z")

</div>

Hello! Is there a way to make the background image for only one of the two cameras (Orthographic and Perspective) used in a separate Viewport? In this case, the project uses one scene. Or is it possible to set the backg…

---

## [How to get Frustrum camera plane](https://discourse.threejs.org/t/how-to-get-frustrum-camera-plane/27220)

<div class="topic-metadata">

**Author:** [@AlexGoryushkin](https://discourse.threejs.org/u/AlexGoryushkin)\
**Replies:** 1\
**Last updated:** [June 15, 2021, 10:47am UTC](https://discourse.threejs.org/t/how-to-get-frustrum-camera-plane/27220 "2021-06-15T10:47:37Z")

</div>

Hello everyone! Is it possible to get the coordinates of the Frustrum near camera plane points? Perhaps these coordinates are already contained in the camera object? My goal is to highlight this near camera plane with …

---

## [Layers, Masking?](https://discourse.threejs.org/t/layers-masking/26529)

<div class="topic-metadata">

**Author:** [@Colorfingers](https://discourse.threejs.org/u/Colorfingers)\
**Replies:** 3\
**Last updated:** [May 24, 2021, 10:20pm UTC](https://discourse.threejs.org/t/layers-masking/26529 "2021-05-24T22:20:35Z")

</div>

So, I am successfully attaching clothing to my model in three.js. When I export it as a gltf and place it in our environment… animating the model results in some of the underlaying body parts to “poke” through the cloth…

---

## [Multiple Scenes vs Layers](https://discourse.threejs.org/t/multiple-scenes-vs-layers/12503)

<div class="topic-metadata">

**Author:** [@Darcey](https://discourse.threejs.org/u/Darcey)\
**Replies:** 32\
**Last updated:** [April 2, 2021, 1:50pm UTC](https://discourse.threejs.org/t/multiple-scenes-vs-layers/12503 "2021-04-02T13:50:04Z")

</div>

Which, when, why and where? Other than rendering multiple viewports, which is better / best practice? To place objects and lights on different scenes or on different layers? Also which would give the best performance? …

---

## [THREE.ArrayCamera Layers doesn't work](https://discourse.threejs.org/t/three-arraycamera-layers-doesnt-work/24150)

<div class="topic-metadata">

**Author:** [@Andrew\_Bilous](https://discourse.threejs.org/u/Andrew_Bilous)\
**Replies:** 1\
**Last updated:** [March 7, 2021, 4:51pm UTC](https://discourse.threejs.org/t/three-arraycamera-layers-doesnt-work/24150 "2021-03-07T16:51:39Z")

</div>

I have a THREE.ArrayCamera with 4 cameras and trying to make my object visible from only 1 camera. I saw I can use Layers, which work well when I have 1 camera and doesn’t work at all with Array cameras. Object isn’t vis…

---

## [GLTF & layering- moved objects up a layer are clipped/hidden](https://discourse.threejs.org/t/gltf-layering-moved-objects-up-a-layer-are-clipped-hidden/22213)

<div class="topic-metadata">

**Author:** [@adev](https://discourse.threejs.org/u/adev)\
**Replies:** 1\
**Last updated:** [January 8, 2021, 12:43pm UTC](https://discourse.threejs.org/t/gltf-layering-moved-objects-up-a-layer-are-clipped-hidden/22213 "2021-01-08T12:43:31Z")

</div>

I’m attempting to move children of a glft scene up a layer, and apply a render pass. Moving the children up a level I’m able to render them differently, but while they are positioned correctly, they are now clipped/cut o…

---

## [Getting Visible Layers of Camera](https://discourse.threejs.org/t/getting-visible-layers-of-camera/22036)

<div class="topic-metadata">

**Author:** [@max](https://discourse.threejs.org/u/max)\
**Replies:** 3\
**Last updated:** [December 30, 2020, 11:07pm UTC](https://discourse.threejs.org/t/getting-visible-layers-of-camera/22036 "2020-12-30T23:07:01Z")

</div>

Hello, I am wondering if there is an easy way to know which layers are currently visible by the camera? I have looked at the docs and it does not seem clear that I can do this. I would like to call something like camera…

---

## [Glb model is not shown when a different layer is set](https://discourse.threejs.org/t/glb-model-is-not-shown-when-a-different-layer-is-set/21660)

<div class="topic-metadata">

**Author:** [@granola](https://discourse.threejs.org/u/granola)\
**Replies:** 2\
**Last updated:** [December 16, 2020, 11:41am UTC](https://discourse.threejs.org/t/glb-model-is-not-shown-when-a-different-layer-is-set/21660 "2020-12-16T11:41:43Z")

</div>

Hi everyone, I want to apply bloom effect to glb model with layers. In this fiddle, I’m trying to apply effect to a blue box and glb model. I expect glb model is bloomed when I enable L46 code for setting glb to la…

---

## [Optimise performance with invisible objects?](https://discourse.threejs.org/t/optimise-performance-with-invisible-objects/21119)

<div class="topic-metadata">

**Author:** [@stur86](https://discourse.threejs.org/u/stur86)\
**Replies:** 7\
**Last updated:** [November 30, 2020, 12:44pm UTC](https://discourse.threejs.org/t/optimise-performance-with-invisible-objects/21119 "2020-11-30T12:44:14Z")

</div>

I’m creating a scene containing hundreds of meshes, but many of them are invisible and will only be made visible on demand. However, the performance seems to feel the hit of their presence anyway. I used Layers to make t…

---

## [Can one use layers for instances of an instanced mesh?](https://discourse.threejs.org/t/can-one-use-layers-for-instances-of-an-instanced-mesh/20587)

<div class="topic-metadata">

**Author:** [@hofk](https://discourse.threejs.org/u/hofk)\
**Replies:** 1\
**Last updated:** [November 10, 2020, 9:52am UTC](https://discourse.threejs.org/t/can-one-use-layers-for-instances-of-an-instanced-mesh/20587 "2020-11-10T09:52:25Z")

</div>

I want to dynamically show or hide instances of an instansed mesh. This works by changing the position of each instance as desired. I set the position so that the camera does not show the instance. So further than far (C…

[Next page](https://discourse.threejs.org/tag/layers/287.md?match_all_tags=true&page=1&tags%5B%5D=layers)
