# Ambient color doesn't effect GLTF model

**URL:** <https://discourse.threejs.org/t/ambient-color-doesnt-effect-gltf-model/11152>\
**Category:** Questions\
**Tags:** lights, materials\
**Created:** [December 2, 2019, 11:41am UTC](https://discourse.threejs.org/t/ambient-color-doesnt-effect-gltf-model/11152 "2019-12-02T11:41:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![wyy2](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wyy2/32/4746_2.png) [@wyy2](https://discourse.threejs.org/u/wyy2)\
**Post date:** [December 2, 2019, 11:41am UTC](https://discourse.threejs.org/t/ambient-color-doesnt-effect-gltf-model/11152/1 "2019-12-02T11:41:07Z")

</div>

I’m exporting GLTF model from blender. And for some reason in Threejs scene ambient color doesn’t effect imported model at all.  
Directional light works, but still it looks dark.

```
    var al = new THREE.AmbientLight( 0x324891 );
    al.intensity = 10;
    scene.add( al );

    var dl = new THREE.DirectionalLight( 0xffffff, 1 );
    dl.position.set( 0, 100, 0 ); 	
    scene.add( dl );

```

![fishes_ss](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/b/bcbf2a4de16bf7679edc387fe2a414194cba6ef1.png)

---

<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:** [December 2, 2019, 11:43am UTC](https://discourse.threejs.org/t/ambient-color-doesnt-effect-gltf-model/11152/2 "2019-12-02T11:43:06Z")

</div>

Can you please share your `glTF` model in this thread?

---

<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:** [December 2, 2019, 11:53am UTC](https://discourse.threejs.org/t/ambient-color-doesnt-effect-gltf-model/11152/4 "2019-12-02T11:53:28Z")

</div>

The material of your fish has a current `metalness` value of `1`. If you reduce this value, the lighting should be more as you would expect.

Tip: Set the property to `0` if you are not going to use an environment map.

---

<div class="post-metadata">

**Author:** ![wyy2](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wyy2/32/4746_2.png) [@wyy2](https://discourse.threejs.org/u/wyy2)\
**Post date:** [December 2, 2019, 12:17pm UTC](https://discourse.threejs.org/t/ambient-color-doesnt-effect-gltf-model/11152/5 "2019-12-02T12:17:13Z")

</div>

> [@Mugen87](#):
>
> `metalness`

That was it! TY!

---

<div class="post-metadata">

**Author:** ![trusktr](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/trusktr/32/13726_2.png) [@trusktr](https://discourse.threejs.org/u/trusktr)\
**Post date:** [October 19, 2020, 4:53pm UTC](https://discourse.threejs.org/t/ambient-color-doesnt-effect-gltf-model/11152/6 "2020-10-19T16:53:23Z")

</div>

I’ve the same issue, but setting metalness to 0 doesn’t work. Setting the metalness to either 0 or 1 does show a difference, but either way the object is very dim even with bright ambient or point lights.

Looks good in [https://gltf-viewer.donmccurdy.com](https://gltf-viewer.donmccurdy.com) though.

I double checked, and all materials in the GLTF import are `MeshStandardMaterial`, but lighting appears to have zero effect on texture.

The model is not black, but gray (it is supposed to be white, but looks as if it is in a dark room).

Anything else to try besides metalness? What other features of Three.js could lead to a `MeshStandardMaterial` not being affected by light?

---

<div class="post-metadata">

**Author:** ![trusktr](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/trusktr/32/13726_2.png) [@trusktr](https://discourse.threejs.org/u/trusktr)\
**Post date:** [October 19, 2020, 8:16pm UTC](https://discourse.threejs.org/t/ambient-color-doesnt-effect-gltf-model/11152/7 "2020-10-19T20:16:21Z")

</div>

> Anything else to try besides metalness? What other features of Three.js could lead to a `MeshStandardMaterial` not being affected by light?

^ cc @donmccurdy, do you know?

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [October 19, 2020, 9:20pm UTC](https://discourse.threejs.org/t/ambient-color-doesnt-effect-gltf-model/11152/8 "2020-10-19T21:20:31Z")

</div>

For MeshStandardMaterial: metalness, metalnessMap, aoMap, and aoMapIntensity could all reduce diffuse lighting contributions with certain settings. Maybe also refractionRatio, but GLTFLoader doesn’t use that.

I’ve occasionally seen models that contained vertex colors full of zeroes. Having a normal map without any vertex normals might also cause similar issues. Either of these cases could be considered a bug in the model.

---

<div class="post-metadata">

**Author:** ![trusktr](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/trusktr/32/13726_2.png) [@trusktr](https://discourse.threejs.org/u/trusktr)\
**Post date:** [October 20, 2020, 3:07am UTC](https://discourse.threejs.org/t/ambient-color-doesnt-effect-gltf-model/11152/9 "2020-10-20T03:07:13Z")

</div>

Ah interesting. Well I wasn’t able to reproduce with simple examples. The following examples _should_ represent what I’m doing in my actual app, and they use the same model from my app. In both demos we can see they are both receptive to lighting (unlike my app which has no reflectivity on the car body), however with r108 (same version as my app) the car is black in the demo (expected white), while with r121 the car is white in the demo (good):

White car, r121 (white is expected):

https://codepen.io/trusktr/embed/preview/BazzEwd?height=300&slug-hash=BazzEwd&default-tabs=js,result&host=https://codepen.io

Black car, r108 (expected white, got black):

https://codepen.io/trusktr/embed/preview/dyXpbBe?height=300&slug-hash=dyXpbBe&default-tabs=js,result&host=https://codepen.io

In my app (using r108), I don’t see a black shiny car, but the following:

 ![Screenshot from 2020-10-19 20-35-17](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/d/d47bbbe073092c5b91de4033103222bc8e013016.png)

As you can see, the windows are very bright, because I have a point light and directional light directly above the car, with intensities of `3`. However, for some reason, in my app, the body color is a constant gray, while in the above codepen demos the same model is shiny (but black in r108, and white in r121).

Hopefully the version differences aren’t the issue. I will try updating…

---

<div class="post-metadata">

**Author:** ![trusktr](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/trusktr/32/13726_2.png) [@trusktr](https://discourse.threejs.org/u/trusktr)\
**Post date:** [October 20, 2020, 5:46am UTC](https://discourse.threejs.org/t/ambient-color-doesnt-effect-gltf-model/11152/10 "2020-10-20T05:46:19Z")

</div>

I updated the project from r108 to r121, and the rendering changed a little (it added shininess along the mesh edges or something, due to my bright debug lights) but the car’s overall color remains the same:

 ![Screenshot from 2020-10-19 22-45-45](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/b/bb390976caa26d9e8b56c3ebc0f1d1ee28d4353e.png)

I wish I could share the code, but it is proprietary.

The GLTF model comes from Blender. Of course it looks fine in there. I will study to see how Blender properties map to the Three.js properties you mentioned @donmccurdy.
