Jump to content

Control Pyro based on vex rules


logix1390

Recommended Posts

hello,

I have a simple smoke sim and I am curious to know how I would set my drag based on the height of my pyro in dops.

I thought maybe I could use a clamp function in dops with the gas field wrangle...or perhaps the drag node would let me set some rules, but i does not

I am familiar with sop solvers when using bullet but when it comes to pyro I am lost when I want to control my pyro in a little more advanced way. Like what if I wanted my smoke to dissipate based on a proximity to something ?

Any help in the right direction would be greatly appreciated.

I will attach my scene for anyone that wants to take a look.

Thank you. 

drag_based_on_y_pyro.hip

Link to comment
Share on other sites

you can use the fit function for that:

float drag = fit(@P.y,0,10,0,0.1); // zero drag at y=0, drag or 0.1 at y=10
v@vel *= 1-drag;


if you want to clamp the velocity it's a bit different:

float maxspeed = fit(@P.y,0,10,100,1); 
v@vel = normalize(v@vel)* min(length(v@vel),maxspeed);



 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...