-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a model corresponding to KHR_lights_punctual somewhere? #78
Comments
I made a couple others here: KhronosGroup/glTF#1223 (comment). They may require some cleanup, it's currently a bit fuzzy for all of these examples what counts as a passing test. |
A new PR has shown up, KhronosGroup/glTF-Sample-Models#210 |
There have been no comments in almost the last 5 years. The PR (#210) was closed without merging. It could be transferred to Sample-Assets if the initial request is still relevant or just closed. Do you have a preference @cx20 ? The default operation is to transfer this issue to glTF-Sample-Assets |
We still need a better sample model for KHR_lights_punctual, ideally one that somehow tests the various light sources, their influence and strength, to visually inspect conformance to spec. |
That 'visual inspection' may be a bit difficult. Regarding the one from KhronosGroup/glTF-Sample-Models#210 , there was the comment by @emackey at KhronosGroup/glTF-Sample-Models#210 (comment) with some concerns. These might, at the core, be the same concerns that I have when it comes to these 'simple test models', where the goal is not to "look cool", but to easily understand what the model contains. The models from KhronosGroup/glTF#1223 (comment) might be closer to this goal, because they have a very plain structure and 'documentation' (via these labels). I've also been playing with some options here, but it may be necessary to sort out what should be combined in a single model (or whether there should be dedicated models for point/spot lights, for example), and what the 'parameter space' is that should be covered. This one only covers 'different point light intensities' (and the aspect of mixing lights, even though I got a bit carried away in the 'looking cool' direction here...) |
I would just note that matching physically-based units in lighting also requires matching up the image formation step. Even if you do the unit conversion correctly when exporting from Blender, it doesn't look nearly the same in three.js (or other tools) without adjusting exposure, at the minimum. Probably there is some way to derive the correct exposure in each tool, but I don't have that conversion. |
The last example was not created in Blender. It was generated purely programmatically (with ... some cool library that you might know). Doing stuff like this in Blender sounds... daunting: The exact settings for the light handling in the final application have to be taken into account. Some of the "formal background work" (i.e. the maths, energy conservation aspects and whatnot) may already have been done in https://modelviewer.dev/fidelity/ . But ... these settings are ... somewhat independent of the model itself. |
This issue will be transferred by 29 Nov unless there is a comment to do differently |
To get this off the plate: If someone has a strong preference for what such a model should actually contain, then drop a note here. Otherwise, I'd create a PR for this model, which just shows a bunch of point lights with different colors and intensities: This is created with a utility class from input data like
We could also go full disco mode with
to create 😁 Creating ~"something similar" for directional lights will have a few more degrees of freedom, but I'll post a suggestion when it's ready. |
Here's yet another stress test: max number of light sources. |
I had accidentally hit a limit here: For that "disco" (random lights) I originally created 16x16 lights, which caused Three.js to bail out with
With 12x12 lights, it still works. Babylon.js seems to limit the number of lights to 4 (four!) to begin with, so... even the "serious" test model doesn't look that great... |
@javagl: The limit is just a constant you can change (https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction#limitations) |
@deltakosh I only used the sandbox at https://sandbox.babylonjs.com/ for that test, but it's good to know that this is configurable on the library level. |
@javagl No worries! We are thinking with @bghgary to change that option when loading a glTF with more than 4 lights. |
I would like to test the model corresponding to KHR_lights_punctual.
I found a model below.
https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual/schema/examples
https://github.com/mrdoob/three.js/tree/dev/examples/models/gltf/Monster/glTF-lights
I do not know who to ask for, but if you do not have a problem with rights, I would like you to donate to the glTF-Sample-Models repository.
The text was updated successfully, but these errors were encountered: