Hi!
I just started learning houdini,it's amasing software!
but i have trouble with dynamics
so,i have many square piece of cloth and i want them falling and rotate around one of the axes
how can i do this?
Thanks for help!
rotating cloth
4878 4 3- anon_user_92319640
- Member
- 4 posts
- Joined: March 2013
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
It's not as easy as applying torque to a rigid body object described as a single point in the sim. With cloth you have to apply forces to all the points.
Cloth does respect the various Force based DOPs but the only one, Drag Force allows you to apply rotational drag but this node works much better for RBD objects than cloth.
Recent cloth in H12.5 doesn't like it when you drive your own velocity by overriding “v” directly. It even mentions it in the help as one of those attributes you shouldn't modify directly.
With cloth, there are two ways you can impart forces:
using rest and target geometry to drive internal cloth forces
…or…
using vertex/point attributes applied to the cloth.
Using Target Geometry to drive internal cloth forces
If you want to drag the cloth through a simulation, use the Target Geometry to add forces to motivate the cloth.
The default setup uses a specific target SOP to supply the target cloth. This setup is used if you already have some cached or animated geometry you want to impart forces in to the simulated cloth. Say a captured skin on your character or a destruction sequence with some pre-animated geometry you want to push in to your simulated cloth object to choreograph. Imagine linearly animating a flower petal to open then using this to drive a nice cloth simulation.
There are some local attributes you can add with a SOP Solver to control these forces: Mainly vector “targetv” and point vector “targetP” for forces along with float “targetstiffness” and float “targetdampening” that modulate the overall settings on the Cloth Object DOP.
As far as driving just rotate forces, this is not the best method to get the job done as it works best when you apply both “targetv” velocity and “targetP” position.
The problem with targetP and what you want to do is that it is either all or nothing. You either use this and targetP starts to take over or you don't use this method.
Pretty simple decision as to when to use this or not.
Using Geometry Vertex/Point Attributes:
There is another attribute you can add that allows you to inject your own external point/vertex velocities called vector “fexternal”.
Again from the help for the cloth object in H12.5.
Reading the help you see that there is the vector “fexternal” attribute that you can apply to the cloth.
If you want to impart velocity forces to your cloth based on a local pivot point for each cloth object, you can add a couple attributes to help you out: id for each cloth panel for nice randomness per panel and a central pivot point.
The rotate pivot is the tricky bit. If you take the worst case scenario where you copy grids to points and use this as your cloth object, there is only a single cloth object as far as DOPs is concerned. One cloth object with a bunch of unconnected panels. To keep the pivot points in order, you need to re-set this every timestep.
This isn't an issue if you have an individual Cloth Object for each panel.
As with all simulations, the more you direct, the more you need to do. Obviously the fexternal forces will continue to be applied even if the cloth is lying on the ground. And then you need to add a mask to negate this force as the cloth approaches the ground.
Again the more you force a sim, the more work you need to do.
—-
Then again you could just apply an interesting curly velocity force with one of the Force based DOPs with a Noise Field DOP in to the second green input to try to get them to whip about in the sim more naturally.
Cloth does respect the various Force based DOPs but the only one, Drag Force allows you to apply rotational drag but this node works much better for RBD objects than cloth.
Recent cloth in H12.5 doesn't like it when you drive your own velocity by overriding “v” directly. It even mentions it in the help as one of those attributes you shouldn't modify directly.
With cloth, there are two ways you can impart forces:
using rest and target geometry to drive internal cloth forces
…or…
using vertex/point attributes applied to the cloth.
Using Target Geometry to drive internal cloth forces
If you want to drag the cloth through a simulation, use the Target Geometry to add forces to motivate the cloth.
The default setup uses a specific target SOP to supply the target cloth. This setup is used if you already have some cached or animated geometry you want to impart forces in to the simulated cloth. Say a captured skin on your character or a destruction sequence with some pre-animated geometry you want to push in to your simulated cloth object to choreograph. Imagine linearly animating a flower petal to open then using this to drive a nice cloth simulation.
There are some local attributes you can add with a SOP Solver to control these forces: Mainly vector “targetv” and point vector “targetP” for forces along with float “targetstiffness” and float “targetdampening” that modulate the overall settings on the Cloth Object DOP.
As far as driving just rotate forces, this is not the best method to get the job done as it works best when you apply both “targetv” velocity and “targetP” position.
The problem with targetP and what you want to do is that it is either all or nothing. You either use this and targetP starts to take over or you don't use this method.
Pretty simple decision as to when to use this or not.
Using Geometry Vertex/Point Attributes:
There is another attribute you can add that allows you to inject your own external point/vertex velocities called vector “fexternal”.
Again from the help for the cloth object in H12.5.
Reading the help you see that there is the vector “fexternal” attribute that you can apply to the cloth.
If you want to impart velocity forces to your cloth based on a local pivot point for each cloth object, you can add a couple attributes to help you out: id for each cloth panel for nice randomness per panel and a central pivot point.
The rotate pivot is the tricky bit. If you take the worst case scenario where you copy grids to points and use this as your cloth object, there is only a single cloth object as far as DOPs is concerned. One cloth object with a bunch of unconnected panels. To keep the pivot points in order, you need to re-set this every timestep.
This isn't an issue if you have an individual Cloth Object for each panel.
As with all simulations, the more you direct, the more you need to do. Obviously the fexternal forces will continue to be applied even if the cloth is lying on the ground. And then you need to add a mask to negate this force as the cloth approaches the ground.
Again the more you force a sim, the more work you need to do.
—-
Then again you could just apply an interesting curly velocity force with one of the Force based DOPs with a Noise Field DOP in to the second green input to try to get them to whip about in the sim more naturally.
There's at least one school like the old school!
- galagast
- Member
- 252 posts
- Joined:
- Offline
Hi, I played around the cloth_dynamics_using_noisy_forces_v001_670.hip file, and noticed something.. it seems like the Wind Force is overwriting the Gravity Force. Is there a way to blend those two?
I tried changing some of the parameters to no avail. The only time I can see the effect of the gravity is if I disable the Wind Force, or just input a negative Y (-9.80665) for its velocity.
I was hoping that having both of those Forces as separate DOPs will each have their share of effect on the the cloth objects. (Gravity+Wind)
I tried changing some of the parameters to no avail. The only time I can see the effect of the gravity is if I disable the Wind Force, or just input a negative Y (-9.80665) for its velocity.
I was hoping that having both of those Forces as separate DOPs will each have their share of effect on the the cloth objects. (Gravity+Wind)
- dominikmk
- Member
- 26 posts
- Joined: Jan. 2013
- Offline
- anon_user_92319640
- Member
- 4 posts
- Joined: March 2013
- Offline
-
- Quick Links