Setting environment to 'Modelviewer' as seen in editor

Hi,

I’m hoping this is a really simple thing that I’ve just missed or I’m not understanding properly. I have a glb file that I’m trying to integrate into my site that’s been sent by my client, I was having a quick play around on the editor page on the main site, and I found that the difference between when I change the ‘Environment’ setting to ‘Modelviewer’ vs what it normally starts with is massive, it’s much closer to what I want it to be.

Is that something that is simple enough to set? I’ve tried reverse engineering it from the editor page but I was wondering if I’m missing something obvious.

Cheers

1 Like

Try it like so: https://jsfiddle.net/a1j50yfv/

2 Likes

Superstar.

Perfect, thank you, that’s what I was after

When a glb file is dragged and dropped into the editor and it appears as black silhouette before switching the environment setting to modelviewer, does this mean that the model in blender or the blender file itself is missing something that perhaps should be initiated or activated in blender before exporting as a glb file?

It’s rare for models exported from Blender or other software to contain their own lighting. They’re meant to be portable and can be brought into any lighting that your application or a viewer might choose to use. The environment is one type of lighting you can use, and usually the best option for PBR materials.

2 Likes

when i copied and pasted the pmremGenerator code, it throws the error: material.onBeforeRender is not a function. any idea why this is happening? i simply want a bright environment or an environment like “modelviewer” is the editor :frowning:

Hey, is it possible to integrate this into an AR scene as well? I’m having issues importing certain modules. I’m very new to three.js.