Restrict POP "shooting" by attribute

   523   2   3
User Avatar
Member
12 posts
Joined: 10月 2018
Online
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?

Attachments:
Screenshot 2024-06-04 121606.png (955.0 KB)
Screenshot 2024-06-04 122008.png (1.1 MB)

User Avatar
Member
458 posts
Joined: 11月 2016
Offline
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])
Edited by Tanto - 2024年6月4日 08:59:03
User Avatar
Member
12 posts
Joined: 10月 2018
Online
Tanto
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])
Thanks. It worked. I just modified it a nit:

// 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