We’re facing an issue with the groom binding on short fur. The algorithm is creating triangle-shaped patterns on the fur when the underlying geometry deforms.
See the repro project and the following images (two versions provided, one with long furs and one with short furs relaxed to put in evidence the triangle patterns):
The fur on rest pos:
long
[Image Removed]
short relaxed
[Image Removed]
The fur deformed by Unreal:
long
[Image Removed]
short relaxed
[Image Removed]
The fur deformed by Houdini and imported as a groom cache:
long
[Image Removed]
short relaxed
[Image Removed]
I believe the issue is that only one frame coordinate is computed per-triangle, so every strand on a triangle gets the exact same transformation ?
And so when two neighbour triangles are deforming somewhat differently it creates this breaking pattern ?
Could an improvement of this be that the transformation of each strand be computed individually via a smoothed frame coordinate between the three points of the triangle ? Using barycentric coordinates as weight.
Steps to Reproduce
Open the level sequence and observe that the unreal binding is creating triangle-shaped patterns while the houdini groom cache is staying smooth.
Indeed, when normals are available, the tangent frame is reconstructed based on the current triangle’s vertices. This means the same tangent frame is shared for all the hair lying on the same triangle. When normals are available (I don’t recall when we introduced that probably 5.6), the tangent frames use the interpolated normal to reconstuct a smooth surface, and alleciate the artifact you showed.
I don’t see any attached project. Would you mind sharing it?
It seems to work all fine in 5.8. So I supposed you are missing some change. It looks like the normal interpolation was in 5.6, but there was a bug in the geometry cache, causing the normal buffer to be incorrect under certain condition. IIRC, this happens when the geometry cache has topology changes while playing its animation. I believe there is an option on import to enforce a fixed topology. Could that be the answer?
Otherwise you could try to integrate the fix from CL 44065777 (Github).
Hi, thanks for the details. I could see and reproduce the issue in 5.6. Technically we would need to vertex tangent info for interpolating the tangent frame smoothly. But due limit in storage space this is not possible. I did some small change which encode a prefered tangent orientation, and seems to produce better result. I attached the shader changes, that you need to decompress in Engine\Shaders\Private\HairStrands.
I tried to do a larger change to pipe the actual mesh tangent vectors and use it during the interpolation, but it seems there are some seams (see the red line having divergent direction for some of the vertices in the picture below). Thus it feels this approach won’t work as well.
[Image Removed]In the past, projects encountering that artifact, increased the surface’s tesselation. So I think you will have to resort to this as well.
For visiblity to other, I protopyped an approach using the underlying vertex tangent basis. As mentioned before, this is a relatively invasive change. I attached a zip containing all the necessary changes for 5.6. With that change I get smooth tangent basis for the rendering strands, and the triangle shapes are no longer visible.
I tested your fixes, on the little patch of this ticket it works great, but unfortunately on the full groom and geometry of our character it creates lots of problems.
Initially (works ok but we can see the clumping induced by the main issue of this ticket)
On my side, I also developed a binding system internally that we are using since a long time, and on this case I also have quite bad results even though I do some kind of smoothing. The result is different, less “triangulated”, but still wrong. Though Houdini is making it very good, might need to check how they do it.
Thanks for the insight on using subdiv, I’ll make some tests with that and let you know.