Obi Official Forum
Help Force zone not working - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html)
+--- Thread: Help Force zone not working (/thread-2374.html)



Force zone not working - vannorman - 21-07-2020

Hello,

I want to use force zones, so I put the Spherical Force Zone on a script in a scene with Obi. However, it does not have any effect no matter its size, parameters, or position. How can I see the effect of this Force Zone?

I attached a video showing me using the Spherical Force Zone in the editor with no effect.

Thanks

Charlie


RE: Force zone not working - vannorman - 21-07-2020

Edit: It won't let me submit a video here, so here's the link instead.
Here's a video of me trying to use Spherical Force Zone. http://vannorman.ai/static/bin/forcezone.mp4
[url=http://vannorman.ai/static/bin/forcezone.mp4][/url]


RE: Force zone not working - vannorman - 22-07-2020

SOLVED: I had to add the following two lines to ObiSphericalForceZone, and now it works.
But I shouldn't need to modify OBI source code for this functionality. It makes me think I have missed some way to get the solver to update these values itself. Please advise if you know what I'm talking about.

Oni.SetParticleExternalForces(actor.solver.OniSolver, actor.solver.wind.GetIntPtr());
Oni.SetParticleWinds(actor.solver.OniSolver, actor.solver.wind.GetIntPtr());


RE: Force zone not working - josemendez - 23-07-2020

(22-07-2020, 06:04 AM)vannorman Wrote: SOLVED: I had to add the following two lines to ObiSphericalForceZone, and now it works.
But I shouldn't need to modify OBI source code for this functionality. It makes me think I have missed some way to get the solver to update these values itself. Please advise if you know what I'm talking about.

Oni.SetParticleExternalForces(actor.solver.OniSolver, actor.solver.wind.GetIntPtr());
Oni.SetParticleWinds(actor.solver.OniSolver, actor.solver.wind.GetIntPtr());

No need to modify the source code at all.

For ambient forces to affect the fluid, you need to crank up the fluid's atmospheric drag. No drag = no wind forces. See:
http://obi.virtualmethodstudio.com/tutorials/emittermaterials.html