Closed lucidium4 closed 2 years ago
The Google drive is not public.
This is Mesh LOD related.
As a workaround, set rendering/mesh_lod/lod_change/threshold_pixels
to 0.0
in the Project Settings to disable the rendering of automatic mesh LOD. To disable LOD temporarily in the editor, click the Perspective menu in the top-left corner of the 3D viewport and select Display Advanced… > Disable LOD. You can also use the Display Wireframe debug draw mode to check how different LOD levels look.
You can also disable LOD generation on specifc imported 3D scenes in the Import dock:
Reopening, as this issue should still be fixed :slightly_smiling_face:
I can confirm this on master
a0558b8af. All the LOD settings are at their default, so I don't know why this is happening. Object scales are also set to their defaults, though I don't know if you used a very large (or small) scale in your 3D DCC (such as Blender) for the character model. cc @fire
For easier reproduction, I edited the MRP to only include essential files: Mesh Rendering Bug_1.zip
@JFonS
The scale is weird.
The parent node of the skeleton has a 0.01 scale node and then the skins are 100 times bigger.
@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 https://github.com/godotengine/godot/pull/59147#issuecomment-1072778167 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
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 https://github.com/godotengine/godot/pull/60115. Importer option for permanent scaling of the scene.
Scene scale set to 0.01.
Root scale set to 100.
Still has problems > 100m.
https://user-images.githubusercontent.com/32321/173843880-dfdeb67a-7408-4e9d-bb07-f40cd765a7b5.mp4
Was this resolved in https://github.com/godotengine/godot/pull/65493?
Was this resolved in https://github.com/godotengine/godot/pull/65493?
@fire says it does in https://github.com/godotengine/godot/pull/65493#issuecomment-1240199556
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)