Skip to content
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

Examples: Add webgl_loader_gltf_lights. #25506

Merged
merged 6 commits into from
Feb 17, 2023
Merged

Examples: Add webgl_loader_gltf_lights. #25506

merged 6 commits into from
Feb 17, 2023

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Feb 14, 2023

Fixed #18629.

Description

Adds an example that makes use of the KHR_lights_punctual extension.

@donmccurdy
Copy link
Collaborator

Maybe we should make this GLB use AVIF, to resolve #25173? Reduces the model from 4.5 MB to 0.5 MB —

Archive.zip

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Feb 14, 2023

I would prefer to use a separate example for this. Otherwise it might not be clear for the user why the lights example does not work in Edge and Safari.

@donmccurdy
Copy link
Collaborator

Ok – maybe let's use the WebP version in the archive above instead, then? It'll work in all modern browsers and is still much smaller than 4.5 MB.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Feb 14, 2023

I've checked the WebP version but I see many compression artifacts on the metal stand.

Dev:

image

WebP:

image

The compression is probably a bit too aggressive in this case.

@donmccurdy
Copy link
Collaborator

donmccurdy commented Feb 14, 2023

Here's a version with the normal maps losslessly compressed, 4.5 MB → 2.2 MB. I think 4.5 MB is larger than necessary for this example.

LightsPunctualLamp.glb.zip

before after
before after

@mrdoob
Copy link
Owner

mrdoob commented Feb 15, 2023

Could you try using moonless_golf_1k.hdr as scene.background and scene.environment?
I think it'll look nice and still show the feature.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Feb 15, 2023

Updated the example with the env map.

Unfortunately, I can't generate the new screenshot right now on my mac Mini (still getting the runtime error mentioned in #25504 (comment)). I'll do it later on my Windows machine.

@WestLangley WestLangley added this to the r150 milestone Feb 16, 2023
@mrdoob mrdoob merged commit 1ae6d2d into mrdoob:dev Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We need glTF model including lights extension
4 participants