Particle Stick and Cling

   7912   3   2
User Avatar
Member
165 posts
Joined: Oct. 2008
Offline
I'm doing an effect where particle snow is falling on a character and sticking on to him, however when he's doing rapid motions I want the snow to fall off. I've tried various combinations of particle collisions but unfortunately I can't seem to get the Cling attribute to work with sticking particles.

Am I missing something or they just not compatible with each other, and if so. How can I achieve that effect best?
User Avatar
Staff
2518 posts
Joined: July 2005
Offline
Cling is a particle state. Put down a State POP to see all the various states a particle can be in. This drives the pstate attribute which you can view in the spreadsheet/details view. It won't mean that much except that there is a value that determines the state of a particle which you can control with a State POP.

Once a particle is sliding, several other attributes are used to determine how the particle slides on the surface. You use the Property POP to set these attributes:

Property POP > Physical tab
Mass: Heavier particles require more energy to get going. Lighter ones less. If you make the mass too light, the particles will not cling. Best to increase the timestep on the POP Network SOP up.

Center of Mass: No need to touch this on simple particles but if you are using instance geometry, then you can play with this value. Rarely accessed for most particle sims but does come in handy when using bounce.

Dynamic Friction: This controls the friction value once the particles are moving/sliding on the surface and is exposed as a point attribute fdynamic.

Static Friction: This controls the friction value when a particle has stopped sliding and is exposed as a point attribute fstatic. This is the energy required to move the point when it is motionless on the surface.

Property POP > Misc tab
Drag: Controls the amount of drag applied to the particles. Higher values will erode the velocity faster. Again this is exposed as a point attribute drag

Cling: Controls the cling force on the particles and is exposed as the point attribute cling. I find that this is very sensitive to the oversampling. If you find that particles are sliding off too easily you may have to increase the accuracy of the sim by increasing the timestep on the POP Network SOP above. Defaults to 1. Try 5 or 10. If the object is moving real fast, you will have to up the timestep just to get more substeps for the cling to work properly. I usually crank it up and see the results. Then dial it back down and watch how many particles fly off. When I get what I want, I leave it there. You can use oversampling as a way to control how many particles fly off.


I rarely use the Cling POP for cling. It takes a lot to set up properly when the Collide POP sets up the Prim Num and Prim U/V attributes for you for free. It also doesn't offer you the ability to control the various properties affecting cling that are contained in the Property POP.

See the attached hip file for a simple setup.

Attachments:
control_sliding_particles.hip (86.0 KB)

There's at least one school like the old school!
User Avatar
Member
165 posts
Joined: Oct. 2008
Offline
Hi, thanks for the reply.

However that approach I've tried and it gets me quite near what I want. However I'm more interested in sticking the particles to the geometry and them letting them go than to slide them.

When using slide they seem to have a little problem with staying still on the geometry.
User Avatar
Staff
2518 posts
Joined: July 2005
Offline
If you stick particles they will remain stuck until you release them by changing the state which means State POP and some sort of logic. Probably use a group POP driven by the velocity magnitude, curvature of the surface, upvector, or whatever works for your situation then feed that group in to a State POP and set the stuck to 0 for that group.

Stuck particles do not use cling to determine anything by default.
There's at least one school like the old school!
  • Quick Links