logix1390 Posted April 16, 2019 Share Posted April 16, 2019 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 Quote Link to comment Share on other sites More sharing options...
bunker Posted April 16, 2019 Share Posted April 16, 2019 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); Quote Link to comment Share on other sites More sharing options...
logix1390 Posted April 16, 2019 Author Share Posted April 16, 2019 @bunkerThank you, lots of stuff here to learn from. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.