-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: add remove mesh by blend shape component #275
feat: add remove mesh by blend shape component #275
Conversation
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.
Thank you for implementing RemoveMeshByBlendShape.
If one of the checked blend shapes translates all of the vertices of a triangle by more than "Tolerance" then the triangle is removed from the mesh.
I think removing triangle if any of the vertices is translated.
In RemoveMeshInBox, it's intended to remove polygon in box.
On the other hand, I think RemoveMeshByBlendShape should remove transformed vertices.
In addition, can you add to changelog?
Editor/Processors/SkinnedMeshes/RemoveMeshByBlendShapeProcessor.cs
Outdated
Show resolved
Hide resolved
This still doesn't remove the blend shapes that are removed, so a separate freeze blend shapes behavior should be used. Having used it on some avatars, I wonder if this is the right behavior and editor. Maybe it'd be better if deleting and freezing were in the same behavior. Even if this behavior were to remove the blend shapes, they would still appear in the freeze blend shapes editor. |
I think we should remove the blendshapes in
In SkinnedMeshRenderer, It's expected because AAO is non-desctructive avatar modification tool. If you mean you can find in other AAO components, we have to remove blendshape name in |
It isn't smart enough to handle the case where another blend shape transforms a subset of the vertices transformed by the deleted blend shapes. For example, Mamehinata has Shoulder_OFF and Shoulder_OFF_left. If you delete the vertices affected by Shoulder_OFF, Shoulder_OFF is deleted from the skinned mesh renderer, but a useless Shoulder_OFF_left remains. Maybe there could be a "Remove unused blend shapes" feature that would clean everything up using similar logic to find blend shapes that transform no vertex by more than some tolerance value. However, for my workflow it doesn't matter. I freeze every blend shape on that mesh anyway. |
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.
It looks good for me. Thanks a lot!
I think freezing meaningless BlendShapes is out of scope of this component. we can add some pass in Automatic Configuration component to remove such a BlendShapes in the feature.
Added by anatawa12: Closes #43
This PR adds a new component for removing mesh by blend shapes (#43). It's based on the "Remove Mesh in Box" and "Freeze BlendShapes" components. If one of the checked blend shapes translates all of the vertices of a triangle by more than "Tolerance" then the triangle is removed from the mesh.
It might also make sense to remove these blend shapes. However, they are still used by triangles that are only partially affected by the blend shapes. Maybe
FreezeBlendShapesProcessor
could be called at the end ofRemoveMeshByBlendShapeProcessor
, butFreezeBlendShapesProcessor
usesFreezeBlendShapes
andRemoveMeshByBlendShapeProcessor
doesn't have one.