decreasing particle size based on its distance to some object
2400 5 0- behzad_ph
- Member
- 27 posts
- Joined: Nov. 2017
- Offline
hey there, i'm trying to have some particles decrease size over time when they reach to some specific distance to some object.. if particles are within a defined radius to some object, they start to get smaller .. this is as far as i managed to achieve,uploaded the hip file and i'm stuck with its sudden size change when it gets into the radius range .. thanks for the help ..
- BabaJ
- Member
- 2024 posts
- Joined: Sept. 2015
- Offline
Two things.
In your Vop your passing the result of the distance node which is a float into the length node, which takes a vector.
So what happens is the length node takes the one float value and fills all 3 components of the vector needed with that value.
Then it calculates the length of that vector.
Then it gets passed to your compare node which has the threshold value you define.
When that threshold is reached it switches over to your value you defined in your constant node “final_size”.
So it is working as it should.
I'll work out an example a bit later for what you want, if no one beats me to the punch.
In your Vop your passing the result of the distance node which is a float into the length node, which takes a vector.
So what happens is the length node takes the one float value and fills all 3 components of the vector needed with that value.
Then it calculates the length of that vector.
Then it gets passed to your compare node which has the threshold value you define.
When that threshold is reached it switches over to your value you defined in your constant node “final_size”.
So it is working as it should.
I'll work out an example a bit later for what you want, if no one beats me to the punch.
- BabaJ
- Member
- 2024 posts
- Joined: Sept. 2015
- Offline
- behzad_ph
- Member
- 27 posts
- Joined: Nov. 2017
- Offline
- BabaJ
- Member
- 2024 posts
- Joined: Sept. 2015
- Offline
Yep…I originally had a solver sop - cause I ‘need’ to practice using them, in my original example.
But in this cause I used the solver to stop the pscale from getting bigger again once the particles move away from the object.
This was based on their current @pscale value ‘or’ their @age; Giving the the net desired effect.
Could have added a bit more indepth conditional in reference to @age and write some code to take into account the different velocities of each particle as well.
But in this cause I used the solver to stop the pscale from getting bigger again once the particles move away from the object.
This was based on their current @pscale value ‘or’ their @age; Giving the the net desired effect.
Could have added a bit more indepth conditional in reference to @age and write some code to take into account the different velocities of each particle as well.
- behzad_ph
- Member
- 27 posts
- Joined: Nov. 2017
- Offline
BabaJthanks a lot..
Yep…I originally had a solver sop - cause I ‘need’ to practice using them, in my original example.
But in this cause I used the solver to stop the pscale from getting bigger again once the particles move away from the object.
This was based on their current @pscale value ‘or’ their @age; Giving the the net desired effect.
Could have added a bit more indepth conditional in reference to @age and write some code to take into account the different velocities of each particle as well.
-
- Quick Links