This question was created in reference to: [Groom binding precision [Content removed]
Hello Charles,
I could invest time in this matter and have a solution to propose !
First thing first, I tested your previous patch using tangents and barycentric smoothing, and it did improve a lot the binding.
This method successfully removes the triangle-shaped clumping issue on our groom, thanks to a shared reference basis for neighbour triangles so it’s consistent. The smoothing also helps transitions.
Unfortunately, it has a caveat on UV seams, that you already mentioned and predicted.
Because the tangents are Mikkt tangents, they are based on the UV space.
And the tangents are calculated per-vertex, which means that on points that are on UV seams there can be multiple and different tangents. This causes separate deformations from triangles apart the seam, which creates artefacts.
Here is an example:
[Image Removed]
Also, depending on the orientation of a triangle in the UV space and the deformation’s “direction”, the tangent will move more or less from one triangle to another even if the deformation is similar, which causes unnatural tangent deformation.
I previously mentioned that Houdini was doing a great job with groom binding, so I looked at what they do, and (after reaching out to them to have more details on their method) I could reproduce the math behind the Attribute Reorient node (which is the core of the method).
Here are the details of the implementation:
First step is to compute a basis on each point of the geometry (much like tangents, but necessitate both rest and deformed geometries, and not on UV vertices):
- compute normals on points of both geometries (smooth normals)
- retrieve connected edges and rotate them to align the normals (from rest to deformed)
- compute the angles between rest and deformed around the deformed normal axis
- average those angles to compute a mean rotation for this point (around the deformed normal axis)
Then the second step is the actual binding:
- use the 3 points of the triangle on which the hair is and interpolate the 3 rotations based on the barycentric coordinates of the hair
- apply this rotation (+ the translation difference of the root point) to all points of the hair
Attached is the VEX code of the first part, computing a rotation per-point.
What do you think of it ?
Would this be an acceptable solution to replace the current binding algorithm ?
How complex do you think it would be to implement in engine ?
Don’t hesitate if you have any questions about it ![]()
Thanks a lot,
Maxime
[Attachment Removed]