New Pops: Where has "justhit" gone?!

   1675   2   0
User Avatar
Member
43 posts
Joined: Sept. 2010
Offline
Hallo,
I have attatched an hipnc file that illustrates my problem.
I try to get control over the bounce of particles in a special way. in old pops it worked well but I can' t duplicate the effect in the new pops.


I don' t no if i' m right but I think the reason for the problem could be the following:

In the old pops i sometimes used the local variable $JUSTHIT. this variables is 1 if a particle has just collided. this variable is cleared (getting 0) at the beginning of each timestep.

i used this variable to group (preserve group unchecked) particles, that have JUST collided. After the next timestep they shouldn't be inside the group anymore.

in the new pops you can only use vex expressions for defining a gouping rule.
i hoped that the colorhits option will replace the justhit variable.
You find this colorhits option inside a popcollisiondedtect -> Behaviour -> Color Hits. If it is turned on, particles that have just collided will have turned their Cd attribute to specivic value like 1,0,0

It seems to me that the particles will keep this value after collission. and that seems to be the problem.

is there a way, that they loose the value in the next timestep? Or am I completely wrong with my troubleshooting?


… I hope somebody can help me

Greetings
Gerd

Attachments:
example.hipnc (1.1 MB)

User Avatar
Member
39 posts
Joined: July 2013
Offline
Hi Gerd,

I think the attribute you need is “hitnum”. If you select the “Add hit attributes” button in the collisions tab of the popsolver node it will add this attribute to you particles.

I've set this up in the attached scene and replaced the group parameters in the color and velocity nodes to only affect the particles if the hitnum is 1.

Attachments:
example_SeanR.hipnc (1.1 MB)

User Avatar
Member
43 posts
Joined: Sept. 2010
Offline
Hallo Rowe,
thank you for your quick answer. Anyhow isn't your approach working If I try.
Some particles always stay in the air without moving after they have bounced once.
Another thing: If you delete the popcolor node, and turn on color hits again, than all particles that have collided should turn red by defauld. But what really happens is that most particles don' t change color (so they stay white) and only some turn to red. the white particles are bouncing and falling down and the red particles “stay in the air” aufter they have bounced one time. that means they are just hanging in the air without moving. .. very strange! And no matter which Attribute I use for grouping: the one that' s created by “color hits” or “hitnum”

I have modified my example. It has now a switcher, to show the different approaches.

Greetings

Gerd

Attachments:
example2.hipnc (1.1 MB)

  • Quick Links