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

solve the deform in rigged mesh brought by no-bone-weight vertex #44

Merged

Conversation

Jason0214
Copy link
Collaborator

@Jason0214 Jason0214 commented Jun 6, 2018

The problem of #36 #37 is that there exists vertex with no bone weights in the mesh.

As reduz said,

the way Godot works (which kind of applies to all modern game engines), unassigned vertices are not really supposed to work

so no-bone-weight vertex brings undefined behavior. I notice there is a fix in collada exporter, I mocked it in this PR, it solve the deform in #36, #37 in rest position, but it is really not robust. For pose it will still has the mesh deformed, as this fix merely assign the vertex to bone with index 0.

I am thinking about assigning no-bone-weight vertices to their neighboring vertex's bones, but what if their neighboring vertices also has no bones ? it will be very time consuming.

need some suggestion on how to solve this.

@Jason0214
Copy link
Collaborator Author

CC @sdfgeoff @mysticfall

@Jason0214
Copy link
Collaborator Author

Jason0214 commented Jun 6, 2018

smooth maybe this smooth of bone weights can be used

@sdfgeoff
Copy link
Collaborator

sdfgeoff commented Jun 6, 2018

#37 is caused when the exported weights aren't normalized (and so the vertex is partly bound to no bone), and this PR will definitely fix that.

I wouldn't apply any sort of smoothing, because this will change the export from what is visible in blender.

What is curious to me is that blender seems to do something clever. If you go into monster.blend, you'll see that quite a lot of the right-hand foreleg has zero weight, and yet it deforms with the bone.

@Jason0214 Jason0214 changed the title [WIP] solve the deform in rigged mesh brought by no-bone-weight vertex solve the deform in rigged mesh brought by no-bone-weight vertex Jun 6, 2018
@Jason0214
Copy link
Collaborator Author

  1. explicitly throw error for vertex in rigged mesh without bone weights
  2. confirmed Rigged mesh looks deformed when imported to Godot #37 is a normalize problem, it is now solved

@Jason0214
Copy link
Collaborator Author

Jason0214 commented Jun 6, 2018

Unfortunately #43 is not fixed,

@Jason0214 Jason0214 force-pushed the solve_non_bone_weights_vertex_issue branch from 324b4cf to 30844ae Compare June 7, 2018 07:54
@sdfgeoff sdfgeoff merged commit 30844ae into godotengine:master Jun 7, 2018
@Jason0214 Jason0214 deleted the solve_non_bone_weights_vertex_issue branch June 9, 2018 07:49
@Calinou Calinou added the bug label Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants