# How to get proper lighting configuration for a custom GLTF viewer?

**URL:** <https://discourse.threejs.org/t/how-to-get-proper-lighting-configuration-for-a-custom-gltf-viewer/20281>\
**Category:** Questions\
**Tags:** lighting, product-viewer\
**Created:** [October 30, 2020, 3:07am UTC](https://discourse.threejs.org/t/how-to-get-proper-lighting-configuration-for-a-custom-gltf-viewer/20281 "2020-10-30T03:07:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![betofc89](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@betofc89](https://discourse.threejs.org/u/betofc89)\
**Post date:** [October 30, 2020, 3:07am UTC](https://discourse.threejs.org/t/how-to-get-proper-lighting-configuration-for-a-custom-gltf-viewer/20281/1 "2020-10-30T03:07:43Z")

</div>

Hello again, my friends!

I’m trying to get proper lighting in my custom viewer in order to show some products I modelled in Blender for a costumer (and the modellings can be seen here [Fechaduras Orbita](https://betofc89.github.io/viewer/index.html))

As you can see here in this example ([https://betofc89.github.io/viewer/modelo\_p7020\_preto.html](https://betofc89.github.io/viewer/modelo_p7020_preto.html)), I’m getting a very dark and boring setup:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/c/cd9fdda8b665c2de1533ead7652e35866d4dfeac.png)

I would like to get something like this nice viewer ([https://gltf-viewer.donmccurdy.com/](https://gltf-viewer.donmccurdy.com/)). I only would like to know the light configuration of this McCurdy viewer and how can I apply this HDRI.

This is the code where I set the lighting from lines 33 to 41: [betofc89.github.io/main\_2.js at 23165f44bcfd883381b2ce1070198ba685b16acd · betofc89/betofc89.github.io · GitHub](https://github.com/betofc89/betofc89.github.io/blob/23165f44bcfd883381b2ce1070198ba685b16acd/viewer/src/main_2.js)  
As you can see, I’ve set up a basic kind of spherical light configuration targeted to the center of the scene.

Any help would be much appreciated!

Thanks in advance!

P.S. I can’t see the buttons in this forum editor, neither the buttons to like answers, and other buttons as well. This commentary is not a criticism, but only to help 😉

---

<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 30, 2020, 9:12am UTC](https://discourse.threejs.org/t/how-to-get-proper-lighting-configuration-for-a-custom-gltf-viewer/20281/2 "2020-10-30T09:12:46Z")

</div>

The recommendations in [Enable Sketchfab-like lighting and shadows](https://discourse.threejs.org/t/enable-sketchfab-like-lighting-and-shadows/20226) might help.

> [@betofc89](#):
>
> P.S. I can’t see the buttons in this forum editor, neither the buttons to like answers, and other buttons as well. This commentary is not a criticism, but only to help

That seemed to be a temporary hosting issue. Should be solved now.

---

<div class="post-metadata">

**Author:** ![betofc89](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@betofc89](https://discourse.threejs.org/u/betofc89)\
**Post date:** [October 30, 2020, 11:42pm UTC](https://discourse.threejs.org/t/how-to-get-proper-lighting-configuration-for-a-custom-gltf-viewer/20281/3 "2020-10-30T23:42:45Z")

</div>

Thank you for the link!
