Posts: 6
Threads: 2
Joined: May 2019
Reputation:
0
What I mean: I need to control the Blob, that rolls around the map and grows up in size everytime it absorbing other blobs. Time to time the Blob will meet on the way obstacles, that makes him to fall apart, but after passing the obstacles, all its parts should come together again in one big blob. Yeah, like "Liquid metal" did in "Terminator 2"
So, I need some advices from developers: how would you implement this mechanic using your asset?
For this moment, it looks like: https://gyazo.com/60a6610a9cee40d976cf6149f7b6b6bc
Settings of emitter and solver in attachments
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
06-05-2019, 11:32 AM
(This post was last modified: 06-05-2019, 11:32 AM by josemendez.)
(06-05-2019, 11:10 AM)MokhovDmitry Wrote: What I mean: I need to control the Blob, that rolls around the map and grows up in size everytime it absorbing other blobs. Time to time the Blob will meet on the way obstacles, that makes him to fall apart, but after passing the obstacles, all its parts should come together again in one big blob. Yeah, like "Liquid metal" did in "Terminator 2"
So, I need some advices from developers: how would you implement this mechanic using your asset?
For this moment, it looks like: https://gyazo.com/60a6610a9cee40d976cf6149f7b6b6bc
Settings of emitter and solver in attachments
Hi there,
There's nothing really specific that you need to do to achieve this. My advice would be to use fairly high surface tension coefficient for your fluid material so that particles stick to each other well, getting the "blob" look instead of many disconnected smaller drops.
Posts: 6
Threads: 2
Joined: May 2019
Reputation:
0
(06-05-2019, 11:32 AM)josemendez Wrote: Hi there,
There's nothing really specific that you need to do to achieve this. My advice would be to use fairly high surface tension coefficient for your fluid material so that particles stick to each other well, getting the "blob" look instead of many disconnected smaller drops.
well... I set surface tension coefficient about 2,000,000 but didn't see any difference. Can you share your settings, please?
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
06-05-2019, 03:12 PM
(This post was last modified: 06-05-2019, 03:14 PM by josemendez.)
(06-05-2019, 02:41 PM)MokhovDmitry Wrote: well... I set surface tension coefficient about 2,000,000 but didn't see any difference. Can you share your settings, please?
With such high surface tension, the simulation should blow up straight away (mine does at surface tension = 20). The usual range is 0-10, very rarely going over 3 if you're after realistic results.
Make sure the material you're modifying is the one actually being used by the emitter.
Posts: 6
Threads: 2
Joined: May 2019
Reputation:
0
(06-05-2019, 03:12 PM)josemendez Wrote: With such high surface tension, the simulation should blow up straight away (mine does at surface tension = 20). The usual range is 0-10, very rarely going over 3 if you're after realistic results.
Make sure the material you're modifying is the one actually being used by the emitter.
Here my project: link to GoogleDrive. The password: your forum nickname (in lowercase).
Can you say where exactly I made mistake?
Posts: 4
Threads: 2
Joined: Sep 2018
Reputation:
0
10-08-2019, 12:36 AM
(This post was last modified: 10-08-2019, 01:10 AM by MasterGeneralB.)
(06-05-2019, 11:32 AM)josemendez Wrote: Hi there,
There's nothing really specific that you need to do to achieve this. My advice would be to use fairly high surface tension coefficient for your fluid material so that particles stick to each other well, getting the "blob" look instead of many disconnected smaller drops.
In looking for a similar solution I thought i might as well ask on this thread a few related questions:
1) The gravity variable in the obi solver, is there a way to reference it in a script so as to modify its value (I checked and it seems this isnt the unity physics engines value for gravity, so am i correct in assuming its the obi solvers own?). Having blobs converge back on each other could then be done by getting either the largest blobs position as the center of gravity and ramping the strength of the field towards it (esentially making all the smaller blobs "fall" towards it) or an average center of all blobs as the center of the gravitational pull and doing the same.
2) Is there any way of identifying the edge perimeter of a liquid "blob" or are all the particles uninformed of their respective position relative to the body of fluid as a whole?
3) In my mild experimentation i have managed to break obi fluids, Im getting a "mesh 'particle imposters' abnormal mesh bounds - most likely it has some invalid"...
message. Im using a modified grabber (uses multiple grabbed particles in a given 2d circle rather than one grabbed particle) and moves them around on screen. Any idea why this error shows up, or more info is needed on my parameters?
EDIT: so looking through the manual more, there must be some value/info on the fluid boundary since atmo drag makes uee of it...
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
12-08-2019, 11:00 AM
(This post was last modified: 12-08-2019, 11:07 AM by josemendez.)
(10-08-2019, 12:36 AM)MasterGeneralB Wrote: 1) The gravity variable in the obi solver, is there a way to reference it in a script so as to modify its value (I checked and it seems this isnt the unity physics engines value for gravity, so am i correct in assuming its the obi solvers own?). Having blobs converge back on each other could then be done by getting either the largest blobs position as the center of gravity and ramping the strength of the field towards it (esentially making all the smaller blobs "fall" towards it) or an average center of all blobs as the center of the gravitational pull and doing the same.
To modify gravity, just do:
Code: solver.parameters.gravity = <your gravity>
solver.UpdateParameters();
But keep in mind that gravity is not spatially-variable, not a vector field. You're talking about having smaller blobs fall towards the bigger one, you can only accomplish this using per-particle external forces, since gravity is the same for all particles in the solver.
Code: solver.externalForces[emitter.particleIndices[i]] = <your external force>
I'd simply calculate the center of mass of all particles, then apply an acceleration proportional to their distance to it. Since the largest blob is also the heaviest one, the center of mass will always be relatively close to it. No need to identify individual blobs.
Quote:2) Is there any way of identifying the edge perimeter of a liquid "blob" or are all the particles uninformed of their respective position relative to the body of fluid as a whole?
Nope, no way to do that. All particles behave in exactly the same way and do not know anything about the fluid as a whole. This helps a lot with multithreading as we can perform the exact same operations on each particle, independently of all others, no potential race conditions.
Quote:3) In my mild experimentation i have managed to break obi fluids, Im getting a "mesh 'particle imposters' abnormal mesh bounds - most likely it has some invalid"...
message. Im using a modified grabber (uses multiple grabbed particles in a given 2d circle rather than one grabbed particle) and moves them around on screen. Any idea why this error shows up, or more info is needed on my parameters?
Without seeing your code, it's close to impossible to tell why is this happening.
Quote:EDIT: so looking through the manual more, there must be some value/info on the fluid boundary since atmo drag makes uee of it...
Nope, atmospheric drag works by modifying the particle's speed using the norm of the gradient of the density field. This is a continuous quantity that happens to be larger for particles closer to the surface, however no classification of particles takes place anywhere in the code (no binary surface/not surface flag or anything).
|