One scene for all models

Is there a recommended scene for all models?

Let’s say I have 100 different glTF models that a 3D artist have textured for me in substance painter and each one of the models have a different color with different materials, roughness, metalness etc.

Is there a best practice on what lights to use? What intensity? What environment map to use?

What is model-viewer doing for each model? Is it the same scene for all of the models?

What does other viewers like scene viewer and apple quick look are doing?

Are there any standardization efforts by khronos group regarding those issues?

Thanks.

The viewers you mention all use different specific lighting settings — there’s no one “right” lighting, a lot comes down to artistic preference. Khronos Group does some work related to ensuring that different engines/viewers can get the same results when they are configured with the same lighting, but there’s no taking away artists’ choice of lighting.

The most important part — by far — is an environment map, and how it is processed. See https://threejs.org/examples/?q=gltf#webgl_loader_gltf for an example of how to load an environment map (also called an IBL) in three.js. You can find many good IBLs on https://hdrihaven.com/.

If you’re doing something more stylized (like a game or data visualization) you might choose other lighting methods, or no lighting. But for physically-realistic models, use IBL.

2 Likes

Thanks!

I see that the example has an envMap on the scene.environment only and not on the meshes material. Is there a difference between the 2 approaches? Is there a way to adjust the environment intensity like you can with envMapIntensity?

Can you share more on how model-viewer are solving the issue? Is it always the same scene? If so, what is it?

Please check out the docs for Scene.environment for more information.

Thanks!

It doesn’t explain if and how can I change the intensity. If I will change the material’s envMapIntensity will it work even if the envMap is null?

Yes, it does. The setting applies for both cases (using Scene.environment and MeshStandardMaterial.envMap).

1 Like

Can you share more on how model-viewer are solving the issue? Is it always the same scene? If so, what is it?

I think you’d need to ask the authors of modelviewer.dev about this. They provide default lighting, but also allow users to customize it: https://modelviewer.dev/examples/lighting-and-environment.html

1 Like

I see.

Still, somehow the models on scene viewer and apple quick look always looks pretty similar to the artist intention.

Thank you both for your answers!

Still, somehow the models on scene viewer and apple quick look always looks pretty similar to the artist intention.

Yes. These teams at Google (model-viewer and scene viewer) did a lot of work to ensure that everything matches. You can find some of how they did that in https://modelviewer.dev/fidelity/, render fidelity tools, and documenting the quirks and limitations of Quick Look. Because you can’t really control the lighting in Apple’s Quick Look, and Apple doesn’t document this stuff well, if you want to look consistent with Quick Look anywhere else, you basically have to guess and do a lot of testing.

2 Likes