Closed will-ca closed 1 year ago
Hi! It's on by default in this viewer —
I've been hoping to discourage the non-physically-based mode, and eventually remove that from three.js, so I'd rather not let people disable that here if it's OK! There's no easy conversion of a glTF light to the non-physically-based mode.
@donmccurdy Okay... I assumed when I was opening test models that it was off, because glTFs with light intensities scaled to reasonable values for lumens (I.E. a couple dozen to several hundred) looked really blown out, while light intensities scaled to non-physical values (E.G. 0.5 to 10.0) looked more like how they did in Blender. ...Which I just tried again and is still the case. I suppose that means that I have to play with the exposure?
....But then, the "exposure" slider doesn't actually do anything AFAICT on the website, and IIRC when I previously used it in my own application the exposure property only had an effect when I had tonemapping enabled or something like that?
I'm sorry, I've just gotten more and more confused as I've tried to dig deeper 😆. This is a pipeline I come back to every now and then, only to first discover I need something new implemented and then that I'm not as familiar with the system as a whole as I remembered.
Okay, can you advise on how I can use the viewer to test that a glTF file, exported with lumen-based units for light intensity as per KHR_lights_punctual, looks as it "should"?
Sorry for that, the exposure slider is indeed broken at the moment. (https://github.com/donmccurdy/three-gltf-viewer/issues/269) 😔
glTFs with light intensities scaled to reasonable values for lumens (I.E. a couple dozen to several hundred) looked really blown out, while light intensities scaled to non-physical values (E.G. 0.5 to 10.0) looked more like how they did in Blender.
I've been testing Blender exports with your patch this evening, and am seeing exactly the same thing. Testing in several engines (three.js, babylon.js, khronos viewer) are all pretty close to one other, and all severely blown out compared to Blender.
So I think something is not quite going as expected, either in our conversion math or in Blender itself. Let's discuss in the other threads, may need more eyes on this!
Fixed exposure slider and added a tone mapping option in f656ab26920ebc0109b9b50d218caea89bde0522
To better support the lights extension, and in this case so I can actually test https://github.com/KhronosGroup/glTF-Blender-IO/pull/1760
I was going to PR this, but today does not feel like a good day to install Node.JS.