Search - User list
Full Version: Solver/Gravity Activation on event/collision (H13/H14)
Root » Houdini Learning Materials » Solver/Gravity Activation on event/collision (H13/H14)
Dawid Antczak2
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…
trojan_goat
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.
circusmonkey
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
Dawid Antczak2
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.
Dawid Antczak2
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).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB