-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Vulkan: Incorrect glTF mesh rendering due to automatic LOD kicking in too early with scaled bones #57895
Comments
The Google drive is not public. |
This is Mesh LOD related. |
As a workaround, set You can also disable LOD generation on specifc imported 3D scenes in the Import dock: |
Reopening, as this issue should still be fixed 🙂 I can confirm this on For easier reproduction, I edited the MRP to only include essential files: Mesh Rendering Bug_1.zip |
@fire: I had some meshes like that - I had to manually change scales and/or reexport, a quirk of export/import from Blender maybe? (Besides, Blender export/import could really stand a better documentation so that people don't get those weird size issues) |
As per #59147 (comment) it seems the problem might be a bug in the mesh itself. |
Is there a way to detect such meshes and warn on import that the mesh itself should be fixed? |
Typically I see this problem happen when the scale is different from Vector(1,1,1). Maybe warn on this. Sign is important too. The most common case of lod failing is the mesh Ref having Vector3(0.01, 0.01, 0.01). The global scale of the skeleton node is then set to Vector3(100, 100, 100). |
Maybe we could detect a scale in the armature and apply this to the LOD process, or apply the armature before doing the LOD? (since we mostly care about the resulting indices anyway). |
The problem is probably with the AABB being incorrect for skinned meshes when any scaling/rotation/translation is done on the bones, be it rest or pose. This is why it's aggressively scaling, because the AABB it's using to determine scale is tiny compared to the mesh. I've noticed this when I was working with MakeHuman Rigged meshes with the wrong settings used on export that caused the AABB to be rotated by 90 degrees and 10x smaller compared to what it actually was.. Fixing said settings on export fixed the rig so that it wasn't scaled and rotated anymore, and suddenly ALOD was working fine. the LOD meshes haven't changed, just their sensitivity. |
May be resolved by #60115. Importer option for permanent scaling of the scene. SettingsScene scale set to 0.01. Root scale set to 100. Still has problems > 100m. 2022-06-15_06-49-58.mp4 |
Was this resolved in #65493? |
@fire says it does in #65493 (comment) Closing as fixed by #65493 |
I tested #65493 and manually confirmed it is fixed. |
Godot version
4.0 Alpha 2
System information
Windows 11, Vulkan, AMD Radeon RX 5700 XT
Issue description
Steps to reproduce
Import a GLTF Mesh into a 3D Scene
Minimal reproduction project
(https://drive.google.com/file/d/1-CfrKX1gIe6pAInUdzXSVZg63TRjLkzU/view?usp=sharing)
The text was updated successfully, but these errors were encountered: