Cable animation with hair, lots of flickering

Hi everybody,

I am working on a cable animation using a cloth animation, geometry nodes and hair. So I made cloth animation of a rigid type of cable. I translated this cable into geometry nodes to generate a woven cable structure. This workflow was inspired by the amazing geometry nodes experiments of @albin_merle

I translated these to hair curves and also used the “new” hair nodes to create more duplicate hairs. And use the “frizz” hair curve nodes to create a bit more change to the strands.

The problem I am facing is that I have a lot of flickering in the hair part of the animation.

The materials I used for the hair is just a basic principled hair shader with direct coloring. The hair strands are thin. But I actually also tried a test render with thicker strands and it also seems to happen.

Has somebody has any idea were I have to look into for solving this?

I would first try to figure out if the flickering is caused by the geometry nodes or by the denoising.

This looks like it might be caused by the hair strands getting re-generated differently each frame.

Can this hair be rendered in Eevee? Try a few frames, if the problem is visible in Eevee too, you will know it’s not a denoising problem and the strands are actually flickering physically.

It’s true that the pattern is moving.
This changes little by little according to the movement of the rope.

It may not be recognized in general, but since it’s a close-up scene, I think I can see the problem well. :slightly_smiling_face:

Yes, I believe you are right. I will check the geometry nodes setup and make some changes. I guess it has to do with me adding the hair node (modifiers) after the original geonodes setup. I will make some changes and try a new animation test.

Thanks

I cannot render this geonodes setup with Eevee, so I couldn’t test this. But I believe it looks like the strands are generated different each frame. But I cannot really see if this is the case, let alone how to solve this.

I tried to remove the hairnodes after the surface deform and instead include them within my geonodes setup, that didn’t solve anything.
Then I tried to remove the frizz and noise from the setup, but I still see some weird flickering that doesn’t seem noise related.

Then I tried to render frames from earlier on in the geonodes tree, so the base from where the curves eventually are generated. This is a woven structure. This seem to render out with nothing really weird happening.

Maybe in my overall setup something is not correct. Below is a link to the Blend file:
https://1drv.ms/u/s!AnIZ7Oo8UYS4jtQpQoQMkEpJuu8heg?download=1

If anyone has any idea? I will keep tinkering.

Well, there is no way I could possibly understand those geometry nodes, especially considering nothing is commented or explained.

But, I can tell you that I do see some flickering on the base. If you zoom in on a single loop segment and scroll through the timeline frame by frame, you will see the polygons pop between frames and have their vertices suddenly change positions. To avoid this, you would likely need more geometry, possibly an unreasonnable amount (and I’m not sure it would avoid the re-generation at all, maybe it would still happen more slowly).




I don’t know how useful I can be in a scene so complex, but I might have some suggestions.

If I had to make a rope, I would consider trying 2 methods.

  • Model a short, modular section of rope, that can plug into itself without a visible seam. Make it a simple basic mesh, with all modifiers applied, that contains all the details it will ever need. Then, array that rope section to make a longer rope and deform it onto a curve. This might get heavy, but there would be the possibility to have the array visible only at render, or to use the curve’s radius as preview for the rope’s size.

  • Make a seamless rope displacement texture. Instead of modeling the rope, use a simple cylinder and use micro displacement for the detail.

I don’t know much about nodes, so I don’t have any input to help, but the problem observed in animation seems to be that the edges of the mesh are not fixed and keep changing.

This looks like a pattern like the movement of the hair on the rope.

Thanks for the tips. The geonodes setup is very chaotic :joy: , I should have organized it a bit more.

I do believe it has to do with the base mesh not having enough geometry. So I am now working on a solution to create more smooth and high poly curves. Hopefully this can help. Currently I am doing another test, the VRAM is peaking at 14 Gb, so now I am still managing :sweat_smile:

I understand your tips, and normally this is how I would do it. But I want to do some closeup shots, and I thought it would be very cool to see the hair strands. I was very inspired by the method of @albin_merle, https://albinmerle.artstation.com/projects/lDE2yY

And he uses a similar method, but his base geometry is generated differently, and he has a lot less geometry I guess.

If the geometry nodes way fails, what about doing it with textures? Here is an example where I recreated the effect as close as possible using the simplest geometry.

This is done using nothing more than multiple layers of cylinders with transparent hair textures (with a solid core to save on render time).

I have given the geometry adaptive subdivision, so it holds up no matter how close you get (it’s not just for displacement! Though be sure to set the standard subdivision levels to 0 before switching modes, there is a problem where the 2 types of subdivision are used at the same time otherwise).

Here is the scene:
rope_closeup.blend (4.4 MB)

As long as your rope has the UVs to accept a texture running along its length, you could duplicate the geometry a few times, inflate the copies by different amounts and give them sparse hair textures.

That looks pretty good, and I will have a look at your setup. Thanks.

I tinkered around with my geonodes setup, and I believe I found the problem. So my base for the geonodes is the cloth sim of tube. But because I am using internal springs for the cable cloth sim, there is some noise on the surface.

So I addes a smooth modifier before the geo nodes with a lot of iterations to smooth out the surface.

Then I am using a nodegroup from @higgsas to convert a tube to a curve, so it places a curve in the center of the tube. I found out this created a spline with very uneven vertex spacing and spacing changed a lot during frames. (Below I plugged in a curve to mesh node to illustrate the problem)

So to solve this I played around with the epsilon value of the node group and I plugged this curve into a “resample curve” node with a fixed count.

Then I noticed that I used the “resample curve” another time, but based on length division. I realized this is not very smart to do, because cloth stretches and compresses, so the overall length may change a bit over time, so it’s better to use a fixed number of vertices for every frame. Eventually this resulted in a not yet perfect but much better result then last time.

I do believe this “tubes to spline” node group is the main culprit of my problem, so I may need to find another method. I know @albin_merle uses an edge loop (vertex group) from the original cloth sim as a base spline, so I may need to do that.