# Objects out of fustrum when using arraycamera

**URL:** <https://discourse.threejs.org/t/objects-out-of-fustrum-when-using-arraycamera/19683>\
**Category:** Questions\
**Tags:** array-camera\
**Created:** [October 13, 2020, 3:21am UTC](https://discourse.threejs.org/t/objects-out-of-fustrum-when-using-arraycamera/19683 "2020-10-13T03:21:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cloud9c](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/cloud9c/32/13925_2.png) [@Cloud9c](https://discourse.threejs.org/u/Cloud9c)\
**Post date:** [October 13, 2020, 3:21am UTC](https://discourse.threejs.org/t/objects-out-of-fustrum-when-using-arraycamera/19683/1 "2020-10-13T03:21:36Z")

</div>

Normally, when I use a PerspectiveCamera, the objects are rendered normally.

[https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/b/bdf17bc7df60c250f91275248bbd16bd790832a4.mp4](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/b/bdf17bc7df60c250f91275248bbd16bd790832a4.mp4)
  
However, when I wrap the PerspectiveCamera in an ArrayCamera, objects outside of 1 units from 0 disappear. Why is this?  

[https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/5/5d79c3628cfd6f2b609504ca39085ab034f05d0d.mp4](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/5/5d79c3628cfd6f2b609504ca39085ab034f05d0d.mp4)

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [October 13, 2020, 8:05am UTC](https://discourse.threejs.org/t/objects-out-of-fustrum-when-using-arraycamera/19683/2 "2020-10-13T08:05:34Z")

</div>

When using `ArrayCamera`, it’s required to configure the `viewport` property for all sub cameras. This is also described in the [documentation](https://threejs.org/docs/index.html#api/en/cameras/ArrayCamera). Check out the following example to see how this is done.

> **[three.js webgl - arraycamera](https://threejs.org/examples/webgl_camera_array)**

---

<div class="post-metadata">

**Author:** ![Cloud9c](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/cloud9c/32/13925_2.png) [@Cloud9c](https://discourse.threejs.org/u/Cloud9c)\
**Post date:** [October 13, 2020, 2:10pm UTC](https://discourse.threejs.org/t/objects-out-of-fustrum-when-using-arraycamera/19683/3 "2020-10-13T14:10:33Z")

</div>

I’m sorry I didn’t include this detail, but I used a viewport of Vector4(0, 0, window.innerWidth, window.innerHeight). Is this the problem?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [October 13, 2020, 2:15pm UTC](https://discourse.threejs.org/t/objects-out-of-fustrum-when-using-arraycamera/19683/4 "2020-10-13T14:15:20Z")

</div>

Can you please show with a live example what you are doing? A video is hard to debug.

---

<div class="post-metadata">

**Author:** ![Cloud9c](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/cloud9c/32/13925_2.png) [@Cloud9c](https://discourse.threejs.org/u/Cloud9c)\
**Post date:** [October 13, 2020, 8:46pm UTC](https://discourse.threejs.org/t/objects-out-of-fustrum-when-using-arraycamera/19683/5 "2020-10-13T20:46:29Z")

</div>

This is my code for adding in the subcamera. Engine.Render is just an object that contains the arrayCamera and scene used when rendering.

```
var camera = new THREE.PerspectiveCamera();
camera.viewport = new THREE.Vector4(0, 0, window.innerWidth, window.innerHeight);
camera.position.set(0, 10, 40)
Engine.Render.arrayCamera.cameras.push(camera);
Engine.Render.scene.add(camera);
```

---

<div class="post-metadata">

**Author:** ![Cloud9c](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/cloud9c/32/13925_2.png) [@Cloud9c](https://discourse.threejs.org/u/Cloud9c)\
**Post date:** [October 18, 2020, 6:31pm UTC](https://discourse.threejs.org/t/objects-out-of-fustrum-when-using-arraycamera/19683/6 "2020-10-18T18:31:03Z")

</div>

With Camera: [https://repl.it/@cloud9c/threejs2#index.html](https://repl.it/@cloud9c/threejs2#index.html)  
With ArrayCamera: [https://repl.it/@cloud9c/threejs#index.html](https://repl.it/@cloud9c/threejs#index.html)

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [October 19, 2020, 10:54am UTC](https://discourse.threejs.org/t/objects-out-of-fustrum-when-using-arraycamera/19683/7 "2020-10-19T10:54:59Z")

</div>

I’ve answered your question at stackoverflow:

> <https://stackoverflow.com/questions/64398567/using-arraycamera-causes-objects-outside-of-1-unit-disappear/64425887#64425887>
