Nicholas Yiallouris Posted January 20, 2014 Share Posted January 20, 2014 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?? Quote Link to comment Share on other sites More sharing options...
Akabane Posted January 20, 2014 Share Posted January 20, 2014 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 Quote Link to comment Share on other sites More sharing options...
Nicholas Yiallouris Posted January 20, 2014 Author Share Posted January 20, 2014 Thanks Emanuele I was hoping that there would be a simpler line of VEX ... Here's a file that might shed some light on what I'm trying to achieve. PopStreamTransition.hipnc Quote Link to comment Share on other sites More sharing options...
Nicholas Yiallouris Posted January 20, 2014 Author Share Posted January 20, 2014 Cant help but think it might be achieved with a fit / smooth expression after the if statement . Might need to create a temp variable ... Quote Link to comment Share on other sites More sharing options...
Hudson Posted January 20, 2014 Share Posted January 20, 2014 I would use a temp parameter variable, Key it from 0-1 between the frames 15-13 and smooth it in the channel editor. Then you can use it wherever you want. Correct me if I am wrong. But I don't have Houdini at home atm Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted January 20, 2014 Share Posted January 20, 2014 Hudson, +1 from me for Reel-SOP 1 Quote Link to comment Share on other sites More sharing options...
teratera Posted January 20, 2014 Share Posted January 20, 2014 (edited) I think you were almost there with a chance param. However, I'm really a beginner with VEX myself, so most probably there are more elegant solutions. Something like this works for me: float frame_ramp; frame_ramp = fit(@Frame, 15, 30, 0, 1); chance = frame_ramp; vex_popgroupbychance.hip Edited January 20, 2014 by teratera Quote Link to comment Share on other sites More sharing options...
Nicholas Yiallouris Posted January 21, 2014 Author Share Posted January 21, 2014 Thats it ! Simple and elegant, I'm going to try create two float channels now in the interface. Thank you teratera Quote Link to comment Share on other sites More sharing options...
anim Posted January 21, 2014 Share Posted January 21, 2014 or you can just type ingroup = fit01(random(@id),65,75) < @Frame; instead of your original VEXpression (in Rule tab, not Random tab) to get gradual transition over 65-75 frame range 1 Quote Link to comment Share on other sites More sharing options...
Nicholas Yiallouris Posted January 21, 2014 Author Share Posted January 21, 2014 (edited) You are a !! I understand most of this script except the "< @Frame" Why does the fit01 need to be less than the frame, isn't it always going to be? Edited January 21, 2014 by NicY Quote Link to comment Share on other sites More sharing options...
anim Posted January 21, 2014 Share Posted January 21, 2014 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.