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

Incorrect display of OpenGL 3 shadows #88123

Open
Tracked by #57416
piramidamsc opened this issue Feb 9, 2024 · 10 comments
Open
Tracked by #57416

Incorrect display of OpenGL 3 shadows #88123

piramidamsc opened this issue Feb 9, 2024 · 10 comments

Comments

@piramidamsc
Copy link

piramidamsc commented Feb 9, 2024

Tested versions

Building the engine v4.3 dev3 win64

System information

win10 ,opengl3,GTX 560 ti

Issue description

shadows are displayed incorrectly in opengl 3 mode, the problem occurs when importing a 3d model in glb format, there are no problems when using obj format.
S
r

Steps to reproduce

Create a new project with the opengl 3 visualization system, and export the 3d model in the format.glb without a second UV channel, then generate a uv2 light map in the editor.
Новый игровой проект.zip

Minimal reproduction project (MRP)

N / A

@Calinou
Copy link
Member

Calinou commented Feb 9, 2024

This is likely due to mesh LOD being used too early. You can probably see the issue going away if you disable Generate > LODs in the Import dock for the .glb file.

@piramidamsc
Copy link
Author

piramidamsc commented Feb 9, 2024

This is likely due to mesh LOD being used too early. You can probably see the issue going away if you disable Generate > LODs in the Import dock for the .glb file.

this is not related to the Lods generator.The error occurs if create shadow meshes is active.

In Godot_v4.3-dev2_win64 this error is not reproduced.

@Calinou Calinou added this to the 4.3 milestone Feb 9, 2024
@akien-mga akien-mga moved this from Unassessed to Release Blocker in 4.x Release Blockers Feb 20, 2024
@akien-mga
Copy link
Member

Can you clarify what is the expected correct look in 4.3-dev2?

I tested on my system (Linux, AMD) and the MRP looks the same in 4.3-dev2 and 4.3-dev3, as well as 4.2-stable.

@Calinou
Copy link
Member

Calinou commented Feb 20, 2024

The expected appearance is the one from CSG meshes and OBJ (notice how their shadows connect to the ground properly).

However, double-check the glTF scenes aren't using a different material by default which may skew the rendering (the fallback 3D material is not pure white, but the material you imported in the glTF scene might be).

@piramidamsc
Copy link
Author

piramidamsc commented Feb 22, 2024

Apparently shadow meshes are distorted when they are generated.
I just can't understand how the creation of uv2 lightmap affects them.

@piramidamsc
Copy link
Author

Can you clarify what is the expected correct look in 4.3-dev2?

I tested on my system (Linux, AMD) and the MRP looks the same in 4.3-dev2 and 4.3-dev3, as well as 4.2-stable.

Yes, this is my mistake, I just checked the builds from version 4.2 beta 1 to 4.3 dev 3 creating a new project for each version and the error popped up in all cases.

@akien-mga akien-mga moved this from Release Blocker to Bad in 4.x Release Blockers Feb 24, 2024
@clayjohn
Copy link
Member

Taking a look at this locally. It seems the issue is not present when using the imported meshes directly even if they have UV2s generated.

The only meshes that are impacted are ones where Arraymeshes are being used directly (i.e. not connected to a GLB or OBJ file). So, the clear workaround for now is to just reimport your meshes.

Seeing that you are using dev builds, I wonder if the ArrayMeshes were extracted during a period where mesh compatibility was broken. For example, if you had extracted those meshes during the Dev phase of 4.2, they could have been broken in a way that is fixed in newer builds. But you have preserved the broken mesh data by extracting them

@clayjohn clayjohn modified the milestones: 4.3, 4.x May 4, 2024
@clayjohn
Copy link
Member

clayjohn commented May 4, 2024

I'm not sure if there is anything actionable anymore as this issue can't really be reproduced and seems to just be an issue with those specific ArrayMeshes.

@piramidamsc Can you confirm that the issue went away after reimporting your GLTF meshes?

@Calinou
Copy link
Member

Calinou commented May 18, 2024

Closing due to lack of response. Please comment if you can still reproduce this following the instructions in #88123 (comment).

@Calinou Calinou closed this as completed May 18, 2024
@Calinou Calinou removed this from the 4.x milestone May 18, 2024
@piramidamsc
Copy link
Author

piramidamsc commented Jun 20, 2024

I'm not sure if there is anything actionable anymore as this issue can't really be reproduced and seems to just be an issue with those specific ArrayMeshes.

@piramidamsc Can you confirm that the issue went away after reimporting your GLTF meshes?

Hello.Sorry for taking so long to answer.I was busy.

Yes, I still have a problem.when generating UV2 for the lighting map, my shadows break.Maybe it's related to my PC since my hardware is outdated, gtx 560 ti and intel core i5 760.

Yes, if you re-import the model, the shadows are displayed correctly and UV2 is saved for light maps.

I have prepared an archive for you with a .blend file from which I exported the model into an empty Godot 4.2.2 for the purity of the experiment.

poy_test.zip
Screenshot_1
Screenshot_2
Screenshot_3

@Calinou Calinou reopened this Jun 21, 2024
@Calinou Calinou removed the archived label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants