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

Weird rendering results in godot 4.x #88619

Closed
dszhblx opened this issue Feb 21, 2024 · 5 comments · Fixed by #88738
Closed

Weird rendering results in godot 4.x #88619

dszhblx opened this issue Feb 21, 2024 · 5 comments · Fixed by #88738

Comments

@dszhblx
Copy link

dszhblx commented Feb 21, 2024

Tested versions

Reproducible in 4.3dev3,4.2.1.stable.Not reproducible in 3.5.stable

System information

Windows 10 - Gotdot 4.3Dev3

Issue description

I used some Glb models to stitch the map. One of the models is rendered a little strangely in Godot4.3Dev3. Make two copies of this model, rotate one of them -90 degrees along the Y-axis and join them together. At this time, the surface colors of the two instances are inconsistent. But I used the same method to test in Blender and Godot3.5, and the surface colors obtained were consistent.

the surface colors of the two instances are inconsistent:
glb_4 3

the surface colors obtained were consistent:
glb_3 5

Steps to reproduce

unzip TestGlb.zip and open the project using godot 4.3dev3 or 4.2
open main.tscn

Minimal reproduction project (MRP)

TestGlb.zip

@dszhblx
Copy link
Author

dszhblx commented Feb 21, 2024

Blender test:
blender

U3D test:
u3d

@Saul2022
Copy link

Saul2022 commented Feb 21, 2024

This is likely to be , because of the lighting defaults, because in 4.x they were modifed to archieve a better default look. Try tweaking the world enviroment node that is in the 3 dots in the top and https://docs.godotengine.org/en/stable/tutorials/3d/environment_and_post_processing.html

Screenshot_2024-02-21-14-49-58-42_40deb401b9ffe8e1df2f1cc5ba480b12

Edit: It may also might be , because 4.2 uses a optimized, try dissabling it, if something changes.

@dszhblx
Copy link
Author

dszhblx commented Feb 22, 2024

This is likely to be , because of the lighting defaults, because in 4.x they were modifed to archieve a better default look. Try tweaking the world enviroment node that is in the 3 dots in the top and https://docs.godotengine.org/en/stable/tutorials/3d/environment_and_post_processing.html

Screenshot_2024-02-21-14-49-58-42_40deb401b9ffe8e1df2f1cc5ba480b12

Edit: It may also might be , because 4.2 uses a optimized, try dissabling it, if something changes.

Completely disable environment settings and only use a Directionallight to illuminate the models, the problem still exists.
It looks like the lighting calculation for the model on the right is wrong.

light
TestGlb_light.zip

@clayjohn
Copy link
Member

Running locally, it looks like the normals are getting compressed wrong

This is how the normals look
Screenshot from 2024-02-23 11-14-58

This is how the normals should look (captured by disabling mesh compression)
Screenshot from 2024-02-23 11-15-04

@clayjohn clayjohn added this to the 4.3 milestone Feb 24, 2024
@akien-mga akien-mga added the bug label Feb 27, 2024
@akien-mga akien-mga changed the title [4.x]Weird rendering results in godot 4.x Weird rendering results in godot 4.x Feb 27, 2024
@dszhblx
Copy link
Author

dszhblx commented Mar 1, 2024

Godot 4.3 dev 4 fixed this bug. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants