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

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)

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

I would like to get something like this nice viewer (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
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 :wink:

The recommendations in Enable Sketchfab-like lighting and shadows might help.

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

3 Likes

Thank you for the link!