-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Apply vertex attribute fixing to the LOD system for rigged meshes. #90180
Conversation
07cf5e4
to
3e57b0d
Compare
scene/resources/3d/importer_mesh.h
Outdated
struct MergedAttribute { | ||
Vector3 normal; | ||
Vector<int> primary_bone_influence; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have a Vector<int>
for every vertex. it is inefficient, especially given that there is at most a small constant number of influences per vertex
I think it should be possible with one influence and one weight, maybe two influences at most but I'd like to see a counter-example.
Remember that mesh simplify will try to avoid merging vertices with different values here:
Even if the vertex contains a lot more influences, the one or two most dominant influences should be enough to ensure the vertices are considered different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linked issue ‘s glb fails to decimate correctly if we limit to one or two influences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Limited to 1 influence
Screen.Recording.2024-04-04.at.8.34.21.AM.mov
Limited to 8 influences
Screen.Recording.2024-04-04.at.8.35.53.AM.mov
b2fe1c1
to
3f677f0
Compare
9d7b2e8
to
870f4f5
Compare
1cd0988
to
220751e
Compare
220751e
to
ddac36a
Compare
Adjust attribute weights and array sizes for LOD generation. Increase maximum attributes to 32 in rescaleAttributes function
ddac36a
to
c69d8e1
Compare
Fixes: #84479
Here's a sample video with me toggling the mesh lod settings in the background.
Godot Engine autolod patch rig lod success 02
https://youtu.be/JodufVyd3Ow and https://youtu.be/BMvh1J9ril0