Cloth Simulation- But With Nodes?

Yes, animated colliders. So it’s basically unusable for any kind of character animation.

That’s a pity :frowning:

It sure is and until the devs decide to do something about it, it pretty much leaves GN based simulation for cloth and hair dead in the water.

While that little dev chat is ‘promising’, to me it still says that things won’t change for another year or more.

1 Like

Yeah I fear that’s the case too. In the 2024 roadmap blog, it says a Simulation overhaul is potentially coming in the second quarter. I think that’s pretty unlikely at this point.

Even if that ‘starts’ in Q2 (ie, now), a bunch of work needs to be done, design, planning, testing, actual code, review, etc. None of that makes it for Blender 4.2. As such, none of it ends up in Blender this year, so it won’t be till next year at the earliest.

5 Likes

I’m trying to make a simple hair solver using a PBD like method recently, and results are not so bad. Needs more test of course.
I have struggled by the realization of sub step for a quite long time, until one day I realized that I can combine simulation zone and repeat zone together and make that long ignored “delta time” slot on simulation node a good try!
The nodes are used in my work , I cannot share them at the moment unfortunately, but the general thought to do it is to put nodes need to be evaluated in sub steps inside the repeat zone, and the iteration count of the repeat zone is the sub step count per frame. And the simulation is time based, delta time is the evaluation time between frames, so we can divide delta time with the sub step count to get the evaluation time every sub step, which is every iteration in our repeat zone.
I’m typing with my phone and is on the subway right now, thinking quickly and a bit messy. I’ll post a simplified sub step method node tree shot later when I am available to my computer.

That’s the basic idea, but the problem is that position of external objects only update every frame, so substep collision detection is not possible.

3 Likes

Am I to understand then that if its a GN based/created object, that it could be referenced within the repeat zone and would then be updated with sub frame steps?

If that’s the case, would it then be possible to say create some sort of basic ‘collision cage’ that wraps around an external object and ‘follows’ its position, which the hair/cloth can be tested against.
Allowing for some sort of tolerance/buffer setting, it could then seem to be colliding with said character being moved around by an armature.

Of course I could be totally off here and just guessing about something that isn’t doable or just way to complex when what is really needed is for the Blender devs to add a node or code or something that just makes it work directly with external objects.

If the geonode network itself can be substepped, I reckon something like Houdini’s time shift node should solve the issue, right?

From within the node network, access the collision object at t, and at t+1, and interpolate collider’s vertex coordinates between them, using substeps as factor.

Still, that timeshift node would have to be implemented first.

1 Like

Yes, if we can get future position, we can interpolate animated colliders’ positions between frames.May not be accurate but dynamic collision is possible.
Node like time shift is needed in this case but it is still possible to get the future position by retrieving position data from another identical collider geometry which animation or cached data (abc or usd file for example) is offseted by 1.

1 Like

I fail to see how a cage would solve the problem of substepping, you’d still have the same clock issue. Or maybe I misunderstood what you meant.

That would be great, but that still wouldn’t work for interactive simulations like in the first video. A separate clock for simulations is actually already planned, so we might get that before time-shift.

I took it to understand that within a Geometry Nodes simulation and repeat setup, that substep detection is possible. So if a general cage was made within GN, that references/moves with the external object, you could maybe do the collision testing within frames.

Or it’s very possible I’m the one that totally misunderstood it all and we just need the devs to work on it.

https://youtu.be/XMIN1NDknIQ Hehe :sparkling_heart: Worth a try at least, please continue working on this project @Xeofrios

Hello Xeofrious,
I’m really new to Geometry Nodes, so maybe this isn’t what you’re searching for, but this guy apparently has created sub-step nodes, if I get it right:

Or is this still not sufficient for dynamic meshes?

Hi, sorry for the late reply. I can’t find the part where they talk about substep nodes, can you please note the time stamp?

Hi Xeofrios,

sorry for the very late reply as well, didn’t have much time for Blender stuff recently.

He starts mentioning substeps from min 1:19 (https://m.youtube.com/watch?v=81vfj1Ui-bc&t=79s&pp=2AFPkAIB) and as far as I understand, the nodes shown in the simulation zone are different substep nodes.

Sorry, if this isn’t, what you meant, my english is enough for conversations with my american friends, but if it comes to technical terms (like with Blender), my understanding is very limited…

Hi @Xeofrios, amazing work thank you for sharing this!

I have been reconstructing your blend file from scratch to learn more about how it works. Could you help me understand a few things?

  1. Why are there 2 spring constraints and “Set position” is used twice within them?
  2. What is the “Mu” attribute within the object collision group and where is it set?
  3. Right next to #2 - why is Island Index + 100 stored as the Y component of the raycast attribute? Seemingly unused?
  4. Why is “Original” used instead of “Relative” in the object collision collection?
  5. What is the “pr” attribute in the Bending constraint? Seemingly unused?

Hey! Sorry for the late reply

  1. Multiple iterations give better results, I don’t remember the reason for this exact setup, but that is the basic reason
  2. Mu (μ) is the coefficient of friction. It is set on the collider objects.
  3. From some previous experiments
  4. You’re right, it should be relative
  5. Initally I was using a method involving vector projection, its a remnant of that

Late again haha :sweat_smile:. Unfortunately in the video the word substep is used in a different sense.

1 Like

I decided I wanted to do custom simulations in blender, and stumbled on this thread. This is what I’ve got so far for a spring simulation

edge spring model.blend (1.2 MB)

I tried to annotate the node tree as much as possible.
@Xeofrios I really liked the domain transfer summation hack, it works really well, and I think I’ll keep using it

3 Likes