Cloth and PhysX - how to know which operators work with which system?
#1
Question 
Hello,

I know that there are the purple cloth particle nodes and the blue nodes, which mainly work only with physX objects.
But some of them work also with cloth and some not.

Is there a list, which nodes are compatible or another way to find out? It would be great if that would be written right in the description of the node.

For example, I had a "scale" operator, which did not affect cloth, but a "spread" or "slow" operator which affected them.


Thanks for advise
  Reply
#2
All operators work with all other operators in principle...the difference is only regarding which solvers will be activated at the end of the time step. The Cloth operator, for example, isn't processed by the PhysX solver. And similarly, PhysX operators aren't processed by the bind/cloth solver. But both can still affect the properties of any particle. You could, for example, apply PhysX shapes to each particle of a cloth mesh.

As for the scale operator, it does affect cloth...but I think you may be assuming it will scale the entire cloth instead of simply changing the scale of cloth particles. Assign a Shape operator to your cloth particles (so each vertex of the cloth has a shape mesh as well) and then apply a Scale operator...you'll see it works as intended (ie, on the particles).
  Reply
#3
Thanks!
I haven't been aware, that a shape operator can enable this for cloth.

If someone knows a comprehensive tutorial about the operator compatibilities between physX and cloth and how to troubleshoot them, let me know.
I have seen many, but most only cover one workflow direction and show what is possible but never what is "not possible" and how to deal with it Wink

I have a thought about a feature suggestion:
Couldn't a visual feedback be implemented into the operator stack, to see wheather there is an operator, that does not change the flow at all?

Imagine I put a cloth operator into a physX shape sim.
I guess that Tyflow can easily "see" that this operator doesn't work, when it compares the flow before and after.
So it could mark this operator with a certain color and the user instantly knows, that this operator makes no sense or has currently settings, that make it not working.

Sometimes changes are so small, that you think, an operator is doing something and let it simulate again and again until you realize, it is not.

Or you add three operators, whcih change the simulation drastically, but one of them is not doing anything. Because you only simulate after doing changes to all three of them, it takes a while until you find out.
  Reply
#4
Indication that operator "doesn't work" would not be true, because they always work, it's just your understanding on what is going under hood is confusing you.
Once you have a little better understanding, everything will be straight forward.


Quote:Alexx31
Imagine I put a cloth operator into a physX shape sim.
I guess that Tyflow can easily "see" that this operator doesn't work, when it compares the flow before and after.

It will work.
If you place cloth/bind after the PhysX Shape operator, you will create bunch of new particles. 
You should be aware that when you apply cloth bind operator it does this: 
1) Creates new particle on each vertex of the mesh (and deletes old particles and their particle meshes)
2) Binds new particles together according to the cloth settings 
3) Creates new mesh (this is not a particle mesh, it's just "rigged mesh" to the particles) 

So, with cloth bind under the PhysX you basically deleted particles and particle meshes that PhysX uses (that's why it won't work anymore), creates bunch of new particles that are just points in space (that PhysX (without particle meshes) can't use. 
However... 
If you now place (bellow cloth) a shape operator (and choose, for example a little spheres), it will create particle meshes on each particle, and if you place PhysX shape bellow, the little spheres will drop on the floor (PhysX shape will work) 

Hope this helps. 


Quote:tyFlow
As for the scale operator, it does affect cloth...but I think you may be assuming it will scale the entire cloth instead of simply changing the scale of cloth particles. 

Hey Ty. 
Is there a way to scale cloth mesh in Tyflow? 
Actually, imagine I tear cloth to many small pieces (each cloth piece contains several verticies/particles moving on the wind). 
Can I somehow convert each cloth piece to single particle, and then use scale to scale them down (over time)?
Or some workaround fort that? 
Thanks.
  Reply
#5
(08-20-2021, 11:13 AM)d4rk3lf Wrote: Hey Ty. 
Is there a way to scale cloth mesh in Tyflow? 
Actually, imagine I tear cloth to many small pieces (each cloth piece contains several verticies/particles moving on the wind). 
Can I somehow convert each cloth piece to single particle, and then use scale to scale them down (over time)?
Or some workaround fort that? 
Thanks.

That's exactly what I have tried yesterday, to scale cloth parts down over time. I have seen once a workaround (I think in Anselm's skull disintegration tutorial) to convert to cloth just to get it deformed, then immediately to convert back to a physX shape to get it scaled down over time.
So I'm interested in the answer, too Smile
  Reply
#6
Scaling cloth isn't entirely straight-forward (at least, not as simple as scaling a particle), but it's definitely possible. First you have to understand what cloth is in a computational sense...it's not a mesh or a surface, but instead a network of constraints (called "binds" in tyFlow) which join together masses (in tyFlow's case, particles). So scaling of cloth can be done by simply scaling the binds that connect all of a cloth's particles together. This can be done using a Modify Bindings operator, and the operation would be scaling the lengths of the binds. For example, you can set mode to "multiply current" and enable the spinners for stretch/shear/bend and set them all to some number less than 1 (ex: 0.75) and also set the timing of the operator to continuous...that will continually multiply the rest lengths of all the binds by 0.75 each step, causing them to shrink which will result in the entire cloth shrinking down to 0 over time.
  Reply


Forum Jump: