Jump to content

Wrangle: Add to Stream / Smooth


Recommended Posts

I'm trying to wrangle particles into a new pop stream with a nice and smooth transition, say over 15 frames

This is what I've currently got:

 

if (@Frame < 20) {

ingroup = 0;

}

else {

ingroup = 1;

}

 

But it's obvious that this is a 1 frame transition where I'm looking to have it smoothly transition over say 15 frames.

 

Any ideas or is "ingroup" a yes or no for all the particles?

 

 

Another option I tried was to use the Random tab within the pop stream which gave me a better result:

 

if (@Frame 15) {

chance = 0;

}

else {

chance = 0.01 * @Frame;

}

 

This gave me a smoother transition but I cant figure out how to make the transition happen between frames 15 - 30??

 

 

Link to comment
Share on other sites

I guess more than a problem with wrangling points into a pop network (which you are doing, and checking wheter a pt is in a group is a bool so is only 1/0 - Yes/No), the problem with the smooth transition would be in my opinion that your points are going from a state of stop to one of full pop control. So they might look like they "snap" where they have to be (as you said, 1 frame transition).

 

two ways I can think to build a workaround:

1-Use the good old blendshapes. If you're merging a fixed number of points into the pop stream, you can match them by $ID and blend between them with your desired transition length via keyframes or expression/vops (ie: fit($FF, 15,30 , 0, 1) on the blend node for example which will remap the frames 15->30 to be value from 0->1) - The problem I can see with this is that the particles will move linearly towards their desired output position, but then again, being the blended points animated via pop, the effect might work just fine, and it's by far the easiest solution.

 

2-Do a pcCloud lookup in a popvop and start averaging the velocity of newly added points into the sim during the amount of frame you want. Just be aware of the fact that sometimes pop forces add speed and not velocity so yeah just be careful if you have unwanted results :)

 

Of course those are my 2 cents and with a scene included it would be easier to help :)

Link to comment
Share on other sites

basically fit01(random(@id),65,75) will evaluate as a random number between 65 and 75 per particle, for simplicity let's call this number x

so you end up with ingroup = x < @Frame;

and that means that each particle will be part of the group only when @Frame is greater than x, so if particle has x=67, then it will be part of the group only after that frame, etc

resulting in particles being added to group gradually in 65-75 frame range

and of course instead of hardcoding 65 and 75 you may use parameter references

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...