Bog Posted February 8, 2018 Share Posted February 8, 2018 (edited) Hi! First question here.... I've got a bunch of particles which are streaming from their emission, to a destination. I'm controlling them with a POP curve force. What I need the particles to do is emit density, but I need them to do so either based on speed (faster = more density emission) or on distance (starting a 0, ramping up to full emission as they reach the end of their course). I'm sure this should be straightforward, but I'm not sure how to convey my wishes to Houdini. Can anyone throw me a hint? Edited February 8, 2018 by Bog Clarity. Quote Link to comment Share on other sites More sharing options...
Atom Posted February 8, 2018 Share Posted February 8, 2018 (edited) You can drop down a wrangle before you stamp out your density into the fluidsource. This will allow you to use a ramp to shape density based upon age. float index_into_ramp = fit(@age,0,@life,0,1); f@density = chramp("shape",index_into_ramp); You could also examine velocity and construct something based upon that value as well. Assume particles are falling. // NOTE: -50 is determinend by looking at the spreadsheet for the fastest value. float index_into_ramp = fit(v@v.y,0,-50,0,1); f@density = chramp("shape",index_into_ramp) * 100; f@pscale = chramp("shape",index_into_ramp); You may want to create a second ramp to control the @pscale attribute for size of life perhaps? For distance to object plug your object into the second input of the wrangle and determine the length of the vector from the current particle to the center point of the object on the second input. Typically... float l = length(@P-OpInput1_P); ap_desnity_stamp_by_speed.hipnc Edited February 8, 2018 by Atom 1 Quote Link to comment Share on other sites More sharing options...
Bog Posted February 8, 2018 Author Share Posted February 8, 2018 Thanks! I'll see if I can get closer to where I need to be with this. 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.