-
Notifications
You must be signed in to change notification settings - Fork 36
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
The mesh position after deformation is far away from the reference mesh position. #3
Comments
Hi Owen, So basically it is up to the user to move the transformed mesh to a desired position. corr_markers: List[(int,int)] = ... # List of vertex-id-tuples (source, target)
source: meshlib.Mesh = ...
pose: meshlib.Mesh = ...
target: meshlib.Mesh = ...
foot_marker: int = ???
source_height = source.vertices.T[2].max() - source.vertices.T[2].min()
target_height = target.vertices.T[2].max() - target.vertices.T[2].min()
scale: float = target_height / source_height
...
transf: Transformation = ...
result = transf(pose)
offset = pose.vertices[corr_markers[foot_marker][0]]] * scale - result.vertices[corr_markers[foot_marker][1]]
result.vertices += offset Won't fix it in code, since it depends on the case. |
Ok, I try this. Thank you. |
Couldn't this be resolved by offsetting the vertices based on target's reference position of one of the markers? (That sounds like a pretty generalized solution) I implemented such offsetting as well for a special use case in my fork, so seems a common requirement. |
Hello, I am trying on your fork, but it seems missing some packages.
|
Hi,
The mesh position after deformation is far away from the reference mesh position.
How can I deal with this problem?
Thanks.
The text was updated successfully, but these errors were encountered: