# Black obj meshes with gltf loaded scene

**URL:** <https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080>\
**Category:** Questions\
**Created:** [January 25, 2022, 5:42pm UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080 "2022-01-25T17:42:35Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephane\_Ancelot](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/stephane_ancelot/32/13576_2.png) [@Stephane\_Ancelot](https://forum.babylonjs.com/u/Stephane_Ancelot)\
**Post date:** [January 25, 2022, 5:42pm UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/1 "2022-01-25T17:42:35Z")

</div>

Hi,  
I have a problem in a gltf scene that uses pbr materials.

Some additional obj meshes are loaded  
If I don’t define an hemispheric light, obj meshes are rendered as black.  
The problem adding an hemispheric has impact on the gltf scene highlighting.

Is there a way either in modifying obj materials or other method to be able to render these obj files without adding an hemispheric light ?  
Regards

---

<div class="post-metadata">

**Author:** ![msDestiny14](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/msdestiny14/32/9572_2.png) [@msDestiny14](https://forum.babylonjs.com/u/msDestiny14)\
**Post date:** [January 25, 2022, 5:53pm UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/2 "2022-01-25T17:53:56Z")

</div>

Hi @Stephane_Ancelot do you might making a playground with your example and I can play around with some things? 🙂

---

<div class="post-metadata">

**Author:** ![jeremy-coleman](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jeremy-coleman/32/15493_2.png) [@jeremy-coleman](https://forum.babylonjs.com/u/jeremy-coleman)\
**Post date:** [January 26, 2022, 12:15am UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/3 "2022-01-26T00:15:13Z")

</div>

By chance i saw this earlier today.

> **[Babylon.js Playground](https://playground.babylonjs.com/#0XSPF6%2317)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![Blake](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blake/32/21509_2.png) [@Blake](https://forum.babylonjs.com/u/Blake)\
**Post date:** [January 26, 2022, 1:47am UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/4 "2022-01-26T01:47:16Z")

</div>

> [@jeremy-coleman](#):
>
> saw this earlier today.

I uncommented the part that assigns the loaded node material and it seems to work (once it’s done loading). 🙂

> **[Babylon.js Playground](https://playground.babylonjs.com/#0XSPF6%2318)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![Blake](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blake/32/21509_2.png) [@Blake](https://forum.babylonjs.com/u/Blake)\
**Post date:** [January 26, 2022, 1:49am UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/5 "2022-01-26T01:49:37Z")

</div>

The light has an array of excluded meshes that you can push meshes onto and they won’t be affected by it. For example here the box mesh is affected by the HemisphericLight but the imported model isn’t (you can see on line 44 where I excluded it). Another solution could be to use a [separate scene](https://doc.babylonjs.com/divingDeeper/scene/multiScenes) for the meshes that need the light…

But also I might be misunderstanding and a playground showing the issue could help us understand and help fix it better. 🙂

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

---

<div class="post-metadata">

**Author:** ![Stephane\_Ancelot](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/stephane_ancelot/32/13576_2.png) [@Stephane\_Ancelot](https://forum.babylonjs.com/u/Stephane_Ancelot)\
**Post date:** [January 26, 2022, 7:41am UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/6 "2022-01-26T07:41:40Z")

</div>

This playground is very similar to my application (altough we don’t really see the light effect on this glb model)  
[GLB scene and obj materials | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#0XSPF6#20)

---

<div class="post-metadata">

**Author:** ![MarianG](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mariang/32/138_2.png) [@MarianG](https://forum.babylonjs.com/u/MarianG)\
**Post date:** [January 26, 2022, 7:49am UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/7 "2022-01-26T07:49:42Z")

</div>

Hey,  
just add a material with emissiveColor for obj meshes

> **[Babylon.js Playground](https://playground.babylonjs.com/#0XSPF6%2321)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![Stephane\_Ancelot](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/stephane_ancelot/32/13576_2.png) [@Stephane\_Ancelot](https://forum.babylonjs.com/u/Stephane_Ancelot)\
**Post date:** [January 26, 2022, 7:54am UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/8 "2022-01-26T07:54:54Z")

</div>

here is a playground with my model  
[GLB scene and obj materials | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#0XSPF6#25)

---

<div class="post-metadata">

**Author:** ![MarianG](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mariang/32/138_2.png) [@MarianG](https://forum.babylonjs.com/u/MarianG)\
**Post date:** [January 26, 2022, 4:02pm UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/9 "2022-01-26T16:02:12Z")

</div>

> **[Babylon.js Playground](https://playground.babylonjs.com/#0XSPF6%2326)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![jgonzosan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jgonzosan/32/10007_2.png) [@jgonzosan](https://forum.babylonjs.com/u/jgonzosan)\
**Post date:** [January 26, 2022, 6:16pm UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/10 "2022-01-26T18:16:49Z")

</div>

The objects will appear black because they think there is no light, so it’s like being put into a pitch-black room. If you don’t want to add any lights within Babylon you can use an environment texture: [Using An HDR Environment For PBR | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/materials/using/HDREnvironment) or you could bake out the lighting you currently have in your scene (in a 3d editor like Blender). The latter will be more time-intensive and tedious depending on your lighting environment, but if done right it’ll look great and be performant.

You could also use the albedo texture (color texture) for the emissive texture as well and it’ll essentially be self-illuminated. This is easier than baking but may also affect the overall look because things like roughness or metallic values may be overpowered.

---

<div class="post-metadata">

**Author:** ![Blake](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blake/32/21509_2.png) [@Blake](https://forum.babylonjs.com/u/Blake)\
**Post date:** [January 26, 2022, 7:05pm UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/11 "2022-01-26T19:05:36Z")

</div>

Here’s a version of your playground where the wheel model isn’t affected by your hemispheric light but the other, grey model is for example. 🙂

> **[Babylon.js Playground](https://playground.babylonjs.com/#0XSPF6%2328)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [February 24, 2022, 11:22am UTC](https://forum.babylonjs.com/t/black-obj-meshes-with-gltf-loaded-scene/27080/12 "2022-02-24T11:22:52Z")

</div>

Hello @Stephane_Ancelot just checking in, has your question been answered? 🙂
