Posts: 7
Threads: 2
Joined: Jun 2021
Reputation:
0
13-07-2021, 08:09 AM
(This post was last modified: 13-07-2021, 09:00 AM by moyashiking.)
Hello!
I want to make a sunk object float in Fluid.
Is there a way to do that?
If there is a method, please tell me how to set it
PS
It seems to float if the resolution of Blueprint is 1.
If it is smaller than 1, it does not seem to float.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
13-07-2021, 10:42 AM
(This post was last modified: 13-07-2021, 10:44 AM by josemendez.)
(13-07-2021, 08:09 AM)moyashiking Wrote: Hello!
I want to make a sunk object float in Fluid.
Is there a way to do that?
If there is a method, please tell me how to set it
PS
It seems to float if the resolution of Blueprint is 1.
If it is smaller than 1, it does not seem to float.
Resolution has little to no impact of buoyancy (how much an object floats). Density does.
Set the rest density of the fluid blueprint such that it is higher/lower than the density (mass per volume unit) of the rigidbodies that must float on it. If the density of the rigidbody is higher than the fluid’s, it will sink. If it’s approximately equal, it will float in place. If it’s lower, it will rise to the surface. Check the MultiphaseBuoyancy sample scene for an example of fluids/rigidbodies of different densities.
Note this is how buoyancy works in real life too. Let me know if you need any help!
Posts: 7
Threads: 2
Joined: Jun 2021
Reputation:
0
(13-07-2021, 10:42 AM)josemendez Wrote: Resolution has little to no impact of buoyancy (how much an object floats). Density does.
Set the rest density of the fluid blueprint such that it is higher/lower than the density (mass per volume unit) of the rigidbodies that must float on it. If the density of the rigidbody is higher than the fluid’s, it will sink. If it’s approximately equal, it will float in place. If it’s lower, it will rise to the surface. Check the MultiphaseBuoyancy sample scene for an example of fluids/rigidbodies of different densities.
Note this is how buoyancy works in real life too. Let me know if you need any help! Thank you for your reply!
I saw MultiphaseFluidBuoyancy
I have a questions.
Looking at the Sphere and Cube Mass, it's heavier than the Bluprint Mass.
Isn't these just values to compare?
Please tell me the correct interpretation method.
Dense 2 (BlueWater)
Rest Density 1000
Particle mass (kg):
2D:10
3D;1
Light 2 (PinkWater)
Rest Density 300
Particle mass (kg):
2D:3
3D;0.3
Sphere
Mass 50
Cube (2)
Mass 20
By the way, I have something to worry about.
The object with the Obi Component was outside the Obi Solver hierarchy.
Is this okay?
I'm not good at English, so I use Google Translate.
I'm sorry if the meaning of the sentence is esoteric.
Posts: 7
Threads: 2
Joined: Jun 2021
Reputation:
0
(13-07-2021, 10:42 AM)josemendez Wrote: Resolution has little to no impact of buoyancy (how much an object floats). Density does.
Set the rest density of the fluid blueprint such that it is higher/lower than the density (mass per volume unit) of the rigidbodies that must float on it. If the density of the rigidbody is higher than the fluid’s, it will sink. If it’s approximately equal, it will float in place. If it’s lower, it will rise to the surface. Check the MultiphaseBuoyancy sample scene for an example of fluids/rigidbodies of different densities.
Note this is how buoyancy works in real life too. Let me know if you need any help! I tried various things while comparing with the sample scene.
Probably the cause is not the buoyancy setting, but the Resolution is too small and rough, and the object is not pressed well.
The test object was a 1m sphere. I think the balance between the roughness of the Resolution and the size of the object was too bad.
I think it will be good if I adjust the balance.
By the way, as I asked earlier, if you have any good criteria for specifying the Mass of Blueprint and the Mass of Object, please give me some advice.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
14-07-2021, 09:35 AM
(This post was last modified: 14-07-2021, 09:35 AM by josemendez.)
(14-07-2021, 06:29 AM)moyashiking Wrote: I tried various things while comparing with the sample scene.
Probably the cause is not the buoyancy setting,
The fluid blueprint has a buoyancy setting, but that's the buoyancy of the fluid vs the athmosphere. That will control how much the fluid floats in the air surrounding it, and allows you to simulate gases.
What you want to control if the buoyancy of rigidbodies vs the fluid. This depends on the mass of the fluid vs the mass of the rigidbody, or more accurately, their mass/volume ratios: their density.
(14-07-2021, 06:29 AM)moyashiking Wrote: but the Resolution is too small and rough, and the object is not pressed well.
Resolution only has a secondary effect on buoyancy, because it is harder for a rigidbody to move among larger particles (lower resolution) compared to small particles (higher resolution). This is a purely mechanical effect.
(14-07-2021, 06:29 AM)moyashiking Wrote: By the way, as I asked earlier, if you have any good criteria for specifying the Mass of Blueprint and the Mass of Object, please give me some advice.
Denser objects will sink, less dense objects will rise. So if your rigidbody is heavier than the fluid particles, it will tend to sink.
Posts: 7
Threads: 2
Joined: Jun 2021
Reputation:
0
(14-07-2021, 09:35 AM)josemendez Wrote: The fluid blueprint has a buoyancy setting, but that's the buoyancy of the fluid vs the athmosphere. That will control how much the fluid floats in the air surrounding it, and allows you to simulate gases.
What you want to control if the buoyancy of rigidbodies vs the fluid. This depends on the mass of the fluid vs the mass of the rigidbody, or more accurately, their mass/volume ratios: their density.
Resolution only has a secondary effect on buoyancy, because it is harder for a rigidbody to move among larger particles (lower resolution) compared to small particles (higher resolution). This is a purely mechanical effect.
Denser objects will sink, less dense objects will rise. So if your rigidbody is heavier than the fluid particles, it will tend to sink.
I apologize for the inconvenience many times.
It turns out that density is an important factor.
As I wrote before, I don't know how to compare densities.
What is the density of Sphere and Cube (2)?
> Looking at the Sphere and Cube Mass, it's heavier than the Bluprint Mass.
> Isn't these just values to compare?
> Please tell me the correct interpretation method.
>
> Dense 2 (BlueWater)
> Rest Density 1000
> Particle mass (kg):
> 2D:10
> 3D;1
>
> Light 2 (PinkWater)
> Rest Density 300
> Particle mass (kg):
> 2D:3
> 3D;0.3
>
> Sphere
> Mass 50
>
> Cube (2)
> Mass 20
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
15-07-2021, 08:29 AM
(This post was last modified: 15-07-2021, 08:45 AM by josemendez.)
(15-07-2021, 01:13 AM)moyashiking Wrote: I apologize for the inconvenience many times.
It turns out that density is an important factor.
As I wrote before, I don't know how to compare densities.
What is the density of Sphere and Cube (2)?
Density = mass/volume. mass is expressed in Kilograms, volume in cubic meters (m3). So density is expressed in Kg/m3.
To calculate the density of a rigidbody, you divide its mass by its volume. For 3D colliders, unity does not include any means to calculate its volume (though you can directly specify a density using Rigidbody.SetDensity). Fortunately most collider shapes (cubes, spheres, capsules) have very simple analytical formulas for volumes:
https://www.varsitytutors.com/hotmath/ho...rea-volume
Posts: 7
Threads: 2
Joined: Jun 2021
Reputation:
0
(15-07-2021, 08:29 AM)josemendez Wrote: Density = mass/volume. mass is expressed in Kilograms, volume in cubic meters (m3). So density is expressed in Kg/m3.
To calculate the density of a rigidbody, you divide its mass by its volume. For 3D colliders, unity does not include any means to calculate its volume (though you can directly specify a density using Rigidbody.SetDensity). Fortunately most collider shapes (cubes, spheres, capsules) have very simple analytical formulas for volumes:
https://www.varsitytutors.com/hotmath/ho...rea-volume I was wondering if there was an easy way to compare densities.
I should calculate it myself.
Thank you for your polite commentary.
It was very helpful!
|