Skip to content

Examples: Make tone mapping demos more interesting. #31045

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

Merged
merged 1 commit into from
May 6, 2025
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented May 5, 2025

Related issue: -

Description

We use the DamagedHelmet glTF asset in many demos. To add a bit more variety, I have updated the the tone mapping demos for WebGL and WebGPU renderer with a new one. Since the scene already uses an environment map that shows Venice, I though something cultural from that place would be nice. I've found a very aesthetic mask asset at Sketchfab that makes the demos more visual appealing. Thanks to gltf-transform, I was able to compress it under 5 MB without loosing much of its fidelity. The original size was over 40 MB.

@Mugen87 Mugen87 added this to the r177 milestone May 5, 2025
@Mugen87 Mugen87 changed the title Examples: Make tonemapping demos more interesting. Examples: Make tone mapping demos more interesting. May 5, 2025
@Mugen87 Mugen87 merged commit 31919b1 into mrdoob:dev May 6, 2025
11 checks passed
@WestLangley
Copy link
Collaborator

@Mugen87 The mask renders slightly differently with WebGPURenderer than with WebGLRenderer. The tiny beads around the face have a different appearance. (lighting or normals, perhaps?) I am guessing WebGLRenderer is rendering correctly in this case.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented May 6, 2025

Yes, the WebGLRenderer version looks correct. I bet this is related to normals but it would be good if we could isolate somehow the issue in a smaller test case.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented May 6, 2025

When adding the following below scene.add( gltf.scene );, the beads render identical. Can you confirm this on your side as well?

const object = gltf.scene.getObjectByName( 'zhu_low_lambert5_0' );
object.material.normalMap = null;

zhu_low_lambert5_0 is the mesh part that just represents the beads.

@WestLangley
Copy link
Collaborator

Well, yes, they render the same if you do that. But the WebGLRenderer unaltered version more closely matches the source -- except for the colors for some reason.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented May 6, 2025

That might be related to the different lighting, tone mapping or FX. I've often experienced this when comparing three.js and Sketchfab.

So for some reasons, WebGPURenderer does not handle the normal map in this particular asset correctly.

@WestLangley
Copy link
Collaborator

/ping @sunag

RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
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.

2 participants