Jump to content
kiryha

Slow down bullet bjects

Recommended Posts

How to mimic a very dense environment (like water or stronger) to dramatically reduce objects energy? Drag force gives opposite results from what I expected...  
I need my boxes as static as possible, just resolve intersections. 

 

slowBullet_001.hipnc

Share this post


Link to post
Share on other sites

POP drag seems to 'just work' for me.

While with drag, I found it only works as expected if you set operation to Set Always rather than the default Set Initial...I'm by no means an expert tho.

(even more confused that Gravity by default is Set Initial...yet it works all the time as expected...)

Edited by Noobini

Share this post


Link to post
Share on other sites

I sometimes make my own poor-mans drag with a popwrangle. Something simple like

@v *= 0.99;

or you can also modulate it with a ramp 

float normalizedVel = fit(length(@v), your vel min, your vel max, 0, 1);

@v *= chramp("DragCurve", normalizedVel);

 

Basically what you want for water is to drastically slow down fast velocities while keeping slow ones (e.g. for sinking behaviour).

Share this post


Link to post
Share on other sites

Well, I have an extremely simple scene and I am still not able to setup drug force, Set Always does not help as well. If I create a drag force my cubes explodes...

Share this post


Link to post
Share on other sites
18 minutes ago, kiryha said:

Well, I have an extremely simple scene and I am still not able to setup drug force, Set Always does not help as well. If I create a drag force my cubes explodes...

you want to be really careful with the settings on the drag force when using it with RBD. I don't remember if pop drag is more stable but as @FlorianEggers mentioned, a wrangle with a multiplier on the v always works and is what I do as soon as drag forces make my RBD explode.

Edited by 3dome

Share this post


Link to post
Share on other sites

first of all you should have a name attrib on those guys. put down assemble and tick on pack geometry.

apart from that (even without it) your scene works as expected. sure, some boxes start to fly because they get hit by another growing box

Share this post


Link to post
Share on other sites
49 minutes ago, 3dome said:

you want to be really careful with the settings on the drag force when using it with RBD. I don't remember if pop drag is more stable but as @FlorianEggers mentioned, a wrangle with a multiplier on the v always works and is what I do as soon as drag forces make my RBD explode.

Would you mind clarifying what would the main difference between "set initial" & "set always" do in terms of forces over time. My understanding is that it might only affect it on the first frame of the sim and the other does it every frame? I may be hella wrong here. 

Share this post


Link to post
Share on other sites
4 minutes ago, char said:

Would you mind clarifying what would the main difference between "set initial" & "set always" do in terms of forces over time. My understanding is that it might only affect it on the first frame of the sim and the other does it every frame? I may be hella wrong here. 

AFAIK, Set always and Set initial refers to changes of the values. E.g. "Set Initial" sets the value once, while "Set always" allows the value to change over time. Both modes are active constantly. 

Same goes if you import data. "Set initial" imports it once, "Set Always" imports it every frame. (E.g. getting constraint network geo from SOPs)

  • Like 1

Share this post


Link to post
Share on other sites
19 minutes ago, 3dome said:

first of all you should have a name attrib on those guys. put down assemble and tick on pack geometry.

But the objects already packed in Copy SOP. Do I need to pack them again or turn of packing in Copy SOP and pack with a separate node. And the main question why do I need the name attrib ot them?

22 minutes ago, 3dome said:

some boxes start to fly because they get hit by another growing box

Right! So this was my original question, how to slow down them dramatically so they would lose energy very fast.

Share this post


Link to post
Share on other sites
8 minutes ago, kiryha said:

Right! So this was my original question, how to slow down them dramatically so they would lose energy very fast.

You need to reduce torque aswell.

I increased the drag and added drag to torque, check the file.

v@v *= 0.88; // Increased drag from .99 to .88
@w *= 0.88; // Added drag to torque

slowBullet_001_TorqueDrag.hipnc

Edited by FlorianEggers
added code
  • Like 1

Share this post


Link to post
Share on other sites

Ok, now it's working! Now I wonder to know why :)
@v and @w is a velocity and torque, and every frame we multiply them by a constant number (0.88, the lower the number, the faster energy loses) to reduce the speed?

Share this post


Link to post
Share on other sites
34 minutes ago, kiryha said:

Ok, now it's working! Now I wonder to know why :)
@v and @w is a velocity and torque, and every frame we multiply them by a constant number (0.88, the lower the number, the faster energy loses) to reduce the speed?

yes, exactly!

Share this post


Link to post
Share on other sites

Gotcha, danken! 
I found this solution with decreasing velocity and torque in wrangler earlier but did not manage it to work, cos I was thinking the higher the multiplication number the faster energy will lose... so silly.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×