# Why the texture is unstable when I move camera?

**URL:** https://discourse.threejs.org/t/why-the-texture-is-unstable-when-i-move-camera/3389
**Category:** Questions
**Tags:** lights, textures
**Created:** [July 10, 2018, 4:04am UTC](https://discourse.threejs.org/t/why-the-texture-is-unstable-when-i-move-camera/3389 "2018-07-10T04:04:16Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![xiaomingTang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/xiaomingtang/32/2200_2.png) [@xiaomingTang](https://discourse.threejs.org/u/xiaomingTang)
#### Post date: [July 10, 2018, 4:04am UTC](https://discourse.threejs.org/t/why-the-texture-is-unstable-when-i-move-camera/3389/1 "2018-07-10T04:04:16Z")

</div>

![unstable-texture](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/8/82cc2fc63a449608c2361aebdb815ccffc840904.gif)

As you can see above.

```javascript
    // light
    let light = new THREE.AmbientLight(0xffffff)
    // I use OBJLoader to load the model of dolphin
    // load a group of image to 'build' the house refer to https://threejs.org/examples/webgl_panorama_cube.html

```

> Why the texture is unstable when I move camera?

 ![texture of the dolphin](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/0/0f0befaf9d547099f3df43f752b8a27706450b75.jpg)  
texture of the dolphin

---

<div class="post-metadata">

### Author: ![MateuszWis](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mateuszwis/32/38322_2.png) [@MateuszWis](https://discourse.threejs.org/u/MateuszWis)
#### Post date: [July 10, 2018, 5:56am UTC](https://discourse.threejs.org/t/why-the-texture-is-unstable-when-i-move-camera/3389/2 "2018-07-10T05:56:36Z")

</div>

it looks like your meshes are overlaping each other.  
You can either make some more space between overlaping faces or increase near parameter in your camera

---

<div class="post-metadata">

### Author: ![xiaomingTang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/xiaomingtang/32/2200_2.png) [@xiaomingTang](https://discourse.threejs.org/u/xiaomingTang)
#### Post date: [July 10, 2018, 7:14am UTC](https://discourse.threejs.org/t/why-the-texture-is-unstable-when-i-move-camera/3389/3 "2018-07-10T07:14:46Z")

</div>

Thanks for your reply, increasing near parameter is no effect, maybe it is overlaping between faces cause that.

I can’t confirm that( because the dolphin model is downloaded from… I dont know where ), I have create some simple cube, but they are well-behaved, maybe it’s too simple?..

![image](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/threejs/original/2X/a/acd5e46eea3c2d8eb6956f5dff1c1694982e49f6.jpg)

---

<div class="post-metadata">

### Author: ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)
#### Post date: [July 10, 2018, 8:20am UTC](https://discourse.threejs.org/t/why-the-texture-is-unstable-when-i-move-camera/3389/4 "2018-07-10T08:20:25Z")

</div>

Hi!  
Do you have link to the live code example with that model?

---

<div class="post-metadata">

### Author: ![pailhead](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pailhead/32/85_2.png) [@pailhead](https://discourse.threejs.org/u/pailhead)
#### Post date: [July 12, 2018, 8:31pm UTC](https://discourse.threejs.org/t/why-the-texture-is-unstable-when-i-move-camera/3389/5 "2018-07-12T20:31:38Z")

</div>

There are triangles in there overlapping almost for sure.

---

<div class="post-metadata">

### Author: ![marquizzo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/marquizzo/32/25192_2.png) [@marquizzo](https://discourse.threejs.org/u/marquizzo)
#### Post date: [July 12, 2018, 8:58pm UTC](https://discourse.threejs.org/t/why-the-texture-is-unstable-when-i-move-camera/3389/6 "2018-07-12T20:58:38Z")

</div>

You’re experiencing z-fighting. Here’s [a quick video demonstrating the effect](https://www.youtube.com/watch?v=CjckWVwd2ek) and an explanation [on Wikipedia](https://en.wikipedia.org/wiki/Z-fighting)

In essence, this happens a lot in 3D graphics when 2 planes occupy the same space, so the renderer doesn’t know which plane is in front of the other, and it flickers like that.

Just make sure the base of the dolphins isn’t being duplicated when you’re importing them. Also, since you don’t know where you downloaded the dolphin assets from, it might be an issue with the assets and not your code. It’s hard to tell without a code sample. It has nothing to do with ambient light, and changing the near parameter won’t fix it.

---

<div class="post-metadata">

### Author: ![xiaomingTang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/xiaomingtang/32/2200_2.png) [@xiaomingTang](https://discourse.threejs.org/u/xiaomingTang)
#### Post date: [July 14, 2018, 2:33pm UTC](https://discourse.threejs.org/t/why-the-texture-is-unstable-when-i-move-camera/3389/7 "2018-07-14T14:33:01Z")

</div>

Sorry I don’t have it, I got it from my colleague, I am a front-end coder, model is unfamiliar to me…

---

<div class="post-metadata">

### Author: ![xiaomingTang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/xiaomingtang/32/2200_2.png) [@xiaomingTang](https://discourse.threejs.org/u/xiaomingTang)
#### Post date: [July 14, 2018, 2:44pm UTC](https://discourse.threejs.org/t/why-the-texture-is-unstable-when-i-move-camera/3389/8 "2018-07-14T14:44:11Z")

</div>

Thanks for your simple and clear reply, although the problem still exist, I will be cautious in importing model.
