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

Fix glossy material for Teapot example #30253

Merged
merged 2 commits into from
Jan 3, 2025
Merged

Fix glossy material for Teapot example #30253

merged 2 commits into from
Jan 3, 2025

Conversation

erich666
Copy link
Contributor

@erich666 erich666 commented Jan 2, 2025

Description

The glossy material for the teapot (I made this example) looks smooth, due to changes in the defaults for the MeshPhongMaterial. Changed lighting and colors & shininess power for glossy so that it looks glossy again:

color: 0xc0c0c0, specular: 0x404040, shininess: 300

Changes in the lighting means the smooth and flat materials are also not oversaturated (maximum white). Compare to original at https://threejs.org/examples/?q=teapot#webgl_geometry_teapot, where the glossy and smooth (choose from "Shading" in the upper right menu) look almost identical in the original. The alternate fix would be to dim the colors on the smooth and flat materials.

The glossy material for the teapot (I made this example) looks smooth, due to changes in the defaults for the MeshPhongMaterial. Changed lighting and colors & shininess power for glossy so that it looks glossy again.
@erich666
Copy link
Contributor Author

erich666 commented Jan 2, 2025

Aha, looks like the screenshot does not match the results, which makes sense. I do not know how to generate a new screenshot of the proper size and add it to this PR - I suspect whatever I hack up would fail this inspection. I poked around here and here but don't see anything. Help needed. I've posted to the forum, maybe I'll get a response.

@erich666
Copy link
Contributor Author

erich666 commented Jan 3, 2025

So, I generated a new screenshot for my fixed example. Great. But then I get, as you can see above in the Details of the CI / E2E testing:

List of failed screenshots: webgl_buffergeometry_attributes_integer

My PR has nothing to do with this entirely separate example program. I could submit a fixed screenshot for that program, too, to make my PR look correct by passing testing, but I should not do that - that would be fooling the system. Right?

I tried posting a question about this problem to https://discourse.threejs.org/t/how-do-i-make-a-new-screenshot-for-a-fix-ive-made-for-an-example-program/75928, got some help, but two of my posts have been reported as "spam" and are now hidden. (Update: a moderator restored them. No replies yet, though.)

I've now spent a few hours trying to submit a reasonable, three-line fix to an example program I wrote long ago and that changed when the API's defaults changed. I hope someone can rescue this PR and not just write it off as "well, it failed", as I don't know what else to do at this point.

@Mugen87 Mugen87 added this to the r173 milestone Jan 3, 2025
@Mugen87 Mugen87 merged commit 3778581 into mrdoob:dev Jan 3, 2025
11 checks passed
@erich666
Copy link
Contributor Author

erich666 commented Jan 3, 2025

Thanks for approving the request! Appreciated.

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