Solver/Gravity Activation on event/collision (H13/H14)

   5772   4   1
User Avatar
Member
24 posts
Joined: Dec. 2013
Offline
Hallo!

Short description: Ball hitting sand castle.

How to:
1. Activate solver only when ball hits sand particles (or, matter of fact any particles). And probably how to control radius.

2. Activate gravity on impact area.

3. Proper method of doing this.

I can't group particles, and use them in gravity node, I can't attribtransform on POP's for threshold. Out of ideas.


Any link to the tutorial where there is some solver activation based on collision would be nice. I've seen few topics about this, with no response. I presume it's so obvious/basic that nobody cares, but still… I've searched common tuts, odforce, this forum for answers for H13> and can't find answer.

Maybe I'm asking wrong questions…

Attachments:
hit_sand.hipnc (401.4 KB)

User Avatar
Member
41 posts
Joined: June 2010
Offline
I'm sure there are many ways to do this. I'm not sure if you can activate the solver on and off in this situation. How will you detect collisions if the solver is off?

In this case I used popcollisiondetect to figure out what's colliding with the particles. Then you can affect the mass (and pscale for radius) using popwrangle.

Attachments:
add_mass_on_collision.hip (290.5 KB)

~t.goat
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
beaten to it , see an example > note the source pop > the particles are set to “stopped” Then I use a wrangle pop to activate them after a collision.

if (@hitnum == 1){
@stopped = 0;
}


I must admit its taking some time to get my head round the vex syntax compared to the old houdini expressions.

Rob

Attachments:
rse_pop_wrangle_activate_pop.hip (408.1 KB)

Gone fishing
User Avatar
Member
24 posts
Joined: Dec. 2013
Offline
thank you for the answer. Most helpful.

But I've got another question then:

how to test one particle group against another. Or particles between each other. I can't get popproximity or collision do it my way.

My way of thinking:
1. Colission with SOP object puts into group RED (classic collision)
2. Group RED tests based on X (pscale, or custom attrib) is there any other particle around. If so = creates group BLUE. In perfect grid situation it means, that every particle would join BLUE group (even distribution).
3. At the same time, X (pscale, or distance condition) is getting smaller with distance from RED group (or SOP object).

everything is about creating chain reaction with some limits.

I'm not sure do I make myself clear.
User Avatar
Member
24 posts
Joined: Dec. 2013
Offline
ok…

maybe then: how to “activate” poproximity on some condition.

I can't get it work.

for example:

if (@hitnum > 1 ) {
distance = 1;
}

but it's not working. question is why. I've tried to make attrib in voppop, but with no succes (but probably I was doing it wrong).
  • Quick Links