Posts: 6
Threads: 2
Joined: May 2019
Reputation:
0
Hello again. Can you explain, how I can move the fluid without container-object with ObiColliders as it's done in FaucetAndBucket scene?
As I see, I can move it with the Solver, with enabled "Simulate in Local space", but then all the fluids generated by ObiEmmiter will move. All I want is to move a particular puddle and merge it with other puddles
Posts: 6,300
Threads: 24
Joined: Jun 2017
Reputation:
397
Obi Owner:
10-05-2019, 10:04 AM
(This post was last modified: 10-05-2019, 10:05 AM by josemendez.)
(10-05-2019, 09:28 AM)MokhovDmitry Wrote: Hello again. Can you explain, how I can move the fluid without container-object with ObiColliders as it's done in FaucetAndBucket scene?
As I see, I can move it with the Solver, with enabled "Simulate in Local space", but then all the fluids generated by ObiEmmiter will move. All I want is to move a particular puddle and merge it with other puddles
Add forces/velocities to move your particles around. You can either set their velocities directly (solver.velocities[particleIndex] = whatever) or if you prefer to use forces: solver.externalForces[particleIndex] = your force.
Note that the FaucetAndBucket scene does not do this. The fluid moves because it collides with the bucket, that you're in control of.
Simulating in local space will just perform the simulation using the solver's position/orientation/scale as reference. So if you move the solver, all particles in the simulation will move with it. This is not what you want in your case.
Posts: 6
Threads: 2
Joined: May 2019
Reputation:
0
(10-05-2019, 10:04 AM)josemendez Wrote: Add forces/velocities to move your particles around. You can either set their velocities directly (solver.velocities[particleIndex] = whatever) or if you prefer to use forces: solver.externalForces[particleIndex] = your force.
Note that the FaucetAndBucket scene does not do this. The fluid moves because it collides with the bucket, that you're in control of.
Simulating in local space will just perform the simulation using the solver's position/orientation/scale as reference. So if you move the solver, all particles in the simulation will move with it. This is not what you want in your case.
Oh, I see. But, what if I have just one Solver and few Emmiters, connected to him? I guess, all fuilds, connected to Solver, will move at the same time.
And, if I get correct, all fluids, connected to one Solver will able to interact to each other, but, fluids connected to various Solvers will ignore each others?
Posts: 6,300
Threads: 24
Joined: Jun 2017
Reputation:
397
Obi Owner:
10-05-2019, 10:25 AM
(This post was last modified: 10-05-2019, 10:26 AM by josemendez.)
(10-05-2019, 10:17 AM)MokhovDmitry Wrote: Oh, I see. But, what if I have just one Solver and few Emmiters, connected to him? I guess, all fuilds, connected to Solver, will move at the same time.
Yes, but using local-space simulation to move fluids around is not a good idea, because your'e not actually moving the fluid. You're changing the simulation's reference frame, which "teleports" particles to a new location, but the fluid velocity is not affected by this. Using forces or velocities is much better, and will also allow for CCD (continuous collision detection) and friction to work appropriately.
(10-05-2019, 10:17 AM)MokhovDmitry Wrote: And, if I get correct, all fluids, connected to one Solver will able to interact to each other, but, fluids connected to various Solvers will ignore each others?
Yes, correct. Particles in one solver are completely independent of particles in other solvers. Each solver is a separate "world", so to speak.
Posts: 6
Threads: 2
Joined: May 2019
Reputation:
0
(10-05-2019, 10:25 AM)josemendez Wrote: Yes, but using local-space simulation to move fluids around is not a good idea, because your'e not actually moving the fluid. You're changing the simulation's reference frame, which "teleports" particles to a new location, but the fluid velocity is not affected by this. Using forces or velocities is much better, and will also allow for CCD (continuous collision detection) and friction to work appropriately.
Yes, correct. Particles in one solver are completely independent of particles in other solvers. Each solver is a separate "world", so to speak.
Thank you so much for showing patience! With each answered question, it becomes more and more clear to me: how your asset works and how I should work with it!
|