Hello. I working in setup of procedural fountains simulations. And I created point from which I emit particles, and also have attribute that represent height of each shooter, so how I can affect power/velocity of particles emitted, so they shoot only by height set in this this attribute? I have tried to use this attribute as velocity, but only few shooters match and then velocity increased exponentially (screenshot 1).
I'm also tried POP wrangle, where I set force for the particles that hire target value, it's kinda work, but I need to set initial velocity quite high, and when shooter need to be low, it looks very unnatural (screenshot 2), like just particles stopped by force to fall down, not by loosing energy. Any idea how to control this in smart way without loosing realism?
Restrict POP "shooting" by attribute
525 2 3- in_am_i
- Member
- 12 posts
- Joined: 10月 2018
- Offline
- Tanto
- Member
- 458 posts
- Joined: 11月 2016
- Online
If you have standard gravity and no other force, you could set the initial velocity from your height attribute this way:
(Used this page [www.quora.com])
v@v = set(0, sqrt(f@height * 9.81 * 2), 0);
(Used this page [www.quora.com])
Edited by Tanto - 2024年6月4日 08:59:03
- in_am_i
- Member
- 12 posts
- Joined: 10月 2018
- Offline
TantoThanks. It worked. I just modified it a nit:
If you have standard gravity and no other force, you could set the initial velocity from your height attribute this way:v@v = set(0, sqrt(f@height * 9.81 * 2), 0);
(Used this page [www.quora.com])
// Gravity constant
float g = 9.8;
float h = @height; // height attribute
// Calculate initial velocity
float initial_velocity = sqrt(2 * g * h);
// Set initial velocity
@v = set(0, initial_velocity, 0);
-
- Quick Links