-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
LDrawLoader: Fix slanted normals #22181
Conversation
Yes, I also see the colors are like pastel tones. Also it seems that all the edge (contour lines) materials, except the transparent ones, are all gray. I don't know if they are being affected by illumination or the environment map, which should not be the case. |
You need tone mapping when using an HDR environment map, which |
I don't think it's just tone mapping. The changes in 2f09982 set the output encoding to I think 3 (environment map, tone mapping, and linear color space shading) is the most "realistic" looking model but 4 (simple directional light lighting, linear color space shading) best approximates the look of a lego model instructions. Unfortunately 4 requires manually converting colors from srgb to linear after loading them so 5 is the simplest approach. I'm happy to help adjust the example to whichever version above is the most desirable in another PR. |
I did not mean to imply it was. I was just point out a fact. :-) |
Approach 5 looks good, but it is just not correct to implement lighting in sRGB colorspace. I assume we want to demonstrate best-practices in the examples. Approach 4 does that.
A studio environment map may provide more uniform lighting. White light will avoid hue-shifts. If I remember correctly, these models utilize many materials -- all with different values for |
Shouldn't the loader produce linear colors? What if someone wanted to mix Lego models with GLTF models? 🤔
I think I'm going to try doing a brighter |
Thanks! |
Related issue: --
Description
Fixes skewed normals from redundant quad vertices when generating smooth normals that were particularly noticeable on the studs. Here's a gif of the before and after fix:
And screenshots:
Also semi-related I notice that after 2f09982 the LDraw example page looks very washed out and the lego models don't look bright and vibrant the way I expect them to. Was this intentional? I'm not sure I feel an environment map is the best way to demonstrate the models.
cc @yomboprime