Posts: 3
Threads: 1
Joined: Oct 2019
Reputation:
0
I am finding the frame rate goes down about 20X and is unusable when pouring fluid into a transparent glass, like the picture illustrated on the Obi Fluid product.
I am using Unity 2019, and have built a simple project like the water faucet demo that works fine with the bucket included. When I try to use a transparent glass setup like the bucket to receive the liquid, it works, but the frame rate is orders of magnitude slower and unusable.
The picture on the product shows fluid flowing from one transparent container to another, is this possible?
-Jeff
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
16-10-2019, 06:55 AM
(This post was last modified: 16-10-2019, 06:57 AM by josemendez.)
(15-10-2019, 11:14 PM)cognaut Wrote: I am finding the frame rate goes down about 20X and is unusable when pouring fluid into a transparent glass, like the picture illustrated on the Obi Fluid product.
I am using Unity 2019, and have built a simple project like the water faucet demo that works fine with the bucket included. When I try to use a transparent glass setup like the bucket to receive the liquid, it works, but the frame rate is orders of magnitude slower and unusable.
The picture on the product shows fluid flowing from one transparent container to another, is this possible?
-Jeff
Hi there,
Yes, it is entirely possible and shouldn't cause any performance impact whatsoever. In fact, the rendering order should be: first the fluid, then the glass. So by the time the glass is rendered, fluid has already been simulated and rendered, it is unaffected by anything you render after it. What shader are you using for your transparent object?
Posts: 3
Threads: 1
Joined: Oct 2019
Reputation:
0
(16-10-2019, 06:55 AM)josemendez Wrote: Hi there,
Yes, it is entirely possible and shouldn't cause any performance impact whatsoever. In fact, the rendering order should be: first the fluid, then the glass. So by the time the glass is rendered, fluid has already been simulated and rendered, it is unaffected by anything you render after it. What shader are you using for your transparent object?
Thanks for your reply, I think I see one of the issues - the mesh for every glass and cup I use even individual LOD3 meshes appear too complex or other scale issues. The only container that works to some degree is the Obi Bucket.
So if I apply a transparent material to the Obi container it works the same.
The bigger problem interacting with all this is the scale thing others reported on the blog. I want to have a normal sized glass filled with fluid. Adjusting the Obi material resolution which is always recommended helps somewhat, but it's still unusable.
Can Obi provide an example in normal scale? Wondering why Obi's Facet example is scaled 10 times larger than normal if this product can work at normal scale?
I attached a picture of a large glass created from the Obi bucket, and been spending hours trying to get it to fill with some sort of realistic fluid at normal scale.
The product appears to work wonderful if you can scale up your world by 2 orders of magnitude, but not seeming useful at normal scale.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
18-10-2019, 08:09 AM
(This post was last modified: 18-10-2019, 08:14 AM by josemendez.)
(18-10-2019, 06:35 AM)cognaut Wrote: Thanks for your reply, I think I see one of the issues - the mesh for every glass and cup I use even individual LOD3 meshes appear too complex or other scale issues. The only container that works to some degree is the Obi Bucket.
So if I apply a transparent material to the Obi container it works the same.
The bigger problem interacting with all this is the scale thing others reported on the blog. I want to have a normal sized glass filled with fluid. Adjusting the Obi material resolution which is always recommended helps somewhat, but it's still unusable.
Can Obi provide an example in normal scale? Wondering why Obi's Facet example is scaled 10 times larger than normal if this product can work at normal scale?
I attached a picture of a large glass created from the Obi bucket, and been spending hours trying to get it to fill with some sort of realistic fluid at normal scale.
The product appears to work wonderful if you can scale up your world by 2 orders of magnitude, but not seeming useful at normal scale.
Hi there,
Why is adjusting the material resolution unusable? It simply changes the amount of particles per volume unit. Setting it high enough should work. In the manual you can see an example of setting the resolution to x5, as you can see the behavior of the fluid is exactly the same regardless of resolution:
http://obi.virtualmethodstudio.com/tutor...rials.html
Another approach would be using local space simulation, and scaling the entire simulation down. See:
http://obi.virtualmethodstudio.com/tutor...space.html
Also, for good performance when colliding against dense/complex meshes, you should use distance fields instead of raw MeshColliders. A MeshCollider requires multiple ray/triangle intersection tests for each particle, while a distance field only requires a few table lookups.
http://obi.virtualmethodstudio.com/tutor...ields.html
Posts: 3
Threads: 1
Joined: Oct 2019
Reputation:
0
(18-10-2019, 08:09 AM)josemendez Wrote: Hi there,
Why is adjusting the material resolution unusable? It simply changes the amount of particles per volume unit. Setting it high enough should work. In the manual you can see an example of setting the resolution to x5, as you can see the behavior of the fluid is exactly the same regardless of resolution:
http://obi.virtualmethodstudio.com/tutor...rials.html
Another approach would be using local space simulation, and scaling the entire simulation down. See:
http://obi.virtualmethodstudio.com/tutor...space.html
Also, for good performance when colliding against dense/complex meshes, you should use distance fields instead of raw MeshColliders. A MeshCollider requires multiple ray/triangle intersection tests for each particle, while a distance field only requires a few table lookups.
http://obi.virtualmethodstudio.com/tutor...ields.html
When I increase the resolution, the fluid becomes unrealistic like bubbles, and is all jittery. I tried reducing the surface tension and many other things to no avail. At least 8hrs of playing with this so far to try to get normal scale results. I have not tried distance fields, maybe that will help, but they do not seem required for oversized implementations.
The local space work around seems to defeat the purpose to interact with the rest of the scene.
I had seen the tutorial you pointed out but just adjusting the resolution does not work well in practice. I am curious why Obi has not posted a real scale example for folks to see? Can this be provided to validate that it does actually work in normal scale and help people set it up if it is as easy as changing the resolution? Something simple like just a glass of water or the faucet demo in normal scale?
(as a side note, I am unable to attach any images to the forum here, how can I get images attached to better show what I am seeing?)
The faucet demo included with Obi Fluid is just stunning, it seems it would help others also if we could figure out how to implement something like this at normal scale.
-Jeff
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
20-10-2019, 07:59 PM
(This post was last modified: 20-10-2019, 08:09 PM by josemendez.)
Quote:I am curious why Obi has not posted a real scale example for folks to see? Can this be provided to validate that it does actually work in normal scale and help people set it up if it is as easy as changing the resolution? Something simple like just a glass of water or the faucet demo in normal scale?
There's no such thing as "normal" scale, it all depends on what exactly you are trying to simulate and its relative size to other things in your scene. This being said, Obi uses real-world units for all quantities (sizes in meters, mass in kilograms, force in newtons, etc..).
I've had no problems at all when trying to bring down the size of fluid particles using either approach (increasing particle resolution, or using local-space mode and scaling the whole thing). The latter might be preferable if you wish to work at a very small scale or far away from the scene's origin, because it helps retain floating point math precision (since simulation is performed in solver space, and the results then scaled up/down).
Quote:The local space work around seems to defeat the purpose to interact with the rest of the scene.
When simulation is performed in local space, collisions and interaction with other objects in the scene happens as usual (colliders are internally expressed in local space too) so I don't see why would it prevent interaction with the rest of the scene? Also I would not consider it a "work around", but a very valid (and often the only) way to precisely control the position/rotation/scale of a simulation in your world.
Here's a video of the bucket/faucet scene. I simply duplicated the faucet (made it 15 cm high), the emitter, and fluid material. Then set the material's resolution to 1000, left all other parameters intact. The FluidRenderer has been disabled and fluid is rendered using the ParticleRenderer to make it easy to see the size of particles. Works fine for me, maybe you can be a bit more specific about your setup?
Posts: 4
Threads: 1
Joined: Jan 2020
Reputation:
0
31-01-2020, 06:58 PM
(This post was last modified: 31-01-2020, 07:00 PM by kwikdawg.)
The scaling down demonstration of the faucet — it does not show fluid behavior, only particle emitter.
After playing with it for ~8 hours, it is my belief that working at "normal scale" is NOT the same as 10x scale. Bumping up the resolution "to 1000" doesn't yield the expected results.
Normal scale can be made to work "somewhat", but not "the same" — and it doesn't match the world scale of our game.
Can you please provide *a full example* (a new faucet Scene package) proving that "normal scale" works *the same* as a large simulation?
(By the way, Obi Fluid is super cool — just hoping to get it working!)
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
03-02-2020, 08:30 AM
(This post was last modified: 03-02-2020, 08:32 AM by josemendez.)
(31-01-2020, 06:58 PM)kwikdawg Wrote: The scaling down demonstration of the faucet — it does not show fluid behavior, only particle emitter.
After playing with it for ~8 hours, it is my belief that working at "normal scale" is NOT the same as 10x scale. Bumping up the resolution "to 1000" doesn't yield the expected results.
Normal scale can be made to work "somewhat", but not "the same" — and it doesn't match the world scale of our game.
Can you please provide *a full example* (a new faucet Scene package) proving that "normal scale" works *the same* as a large simulation?
(By the way, Obi Fluid is super cool — just hoping to get it working!)
What do you mean it does not show the fluid behavior? Particles behave as fluid, as far as I can see. Do you mean it doesn't render the fluid surface?
If cranking up fluid resolution doesn't work for you (even though it's guaranteed to yield the exact same behavior at any resolution, as all it does is decrease particle size and mass), you could just simply scale down the solver. Simulation is performed in the solver's local space, so scaling it down will scale the simulation results at any size you need.
Posts: 4
Threads: 1
Joined: Jan 2020
Reputation:
0
03-02-2020, 05:53 PM
(This post was last modified: 03-02-2020, 05:55 PM by kwikdawg.)
(03-02-2020, 08:30 AM)josemendez Wrote: What do you mean it does not show the fluid behavior? Particles behave as fluid, as far as I can see. Do you mean it doesn't render the fluid surface?
If cranking up fluid resolution doesn't work for you (even though it's guaranteed to yield the exact same behavior at any resolution, as all it does is decrease particle size and mass), you could just simply scale down the solver. Simulation is performed in the solver's local space, so scaling it down will scale the simulation results at any size you need.
Yes, let me be clear ("does not show the fluid behavior"):
1. You provided a video — on this thread — showing 'scaling down the faucet'. But the video does not show rendered liquid, or filling the glass, and when I do this, it is *not* the same effect — water gets 'clumpy', jumps around in the glass / won't settle, OR kills the frame rate
2. Have tried all suggestions about scaling the Solver, boosting the Resolution, lowering Surface Tension, and none worked to fix these problems. There are *so many* settings, maybe we are doing it wrong, but we have tried *for hours* without success
3. You write "it's the exact same behavior at any resolution" but then leave it to your customers to figure out — unfortunately, we are not seeing these "exact same" results
4. A page that should show a solution is blank: http://obi.virtualmethodstudio.com/tutor...space.html
So this is the request —
Please provide a demo Scene (or scenes) of water pouring into a cup (not a "bowl" as in the faucet demo) at normal scale
Everyone on this thread is asking for the same thing.
Will you be able to provide more actual demonstrations, for benefit of your customers?
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
03-02-2020, 06:41 PM
(This post was last modified: 03-02-2020, 07:19 PM by josemendez.)
(03-02-2020, 05:53 PM)kwikdawg Wrote: Yes, let me be clear ("does not show the fluid behavior"):
1. You provided a video — on this thread — showing 'scaling down the faucet'. But the video does not show rendered liquid, or filling the glass, and when I do this, it is *not* the same effect — water gets 'clumpy', jumps around in the glass / won't settle, OR kills the frame rate
2. Have tried all suggestions about scaling the Solver, boosting the Resolution, lowering Surface Tension, and none worked to fix these problems. There are *so many* settings, maybe we are doing it wrong, but we have tried *for hours* without success
3. You write "it's the exact same behavior at any resolution" but then leave it to your customers to figure out — unfortunately, we are not seeing these "exact same" results
4. A page that should show a solution is blank: http://obi.virtualmethodstudio.com/tutor...space.html
So this is the request —
Please provide a demo Scene (or scenes) of water pouring into a cup (not a "bowl" as in the faucet demo) at normal scale
Everyone on this thread is asking for the same thing.
Will you be able to provide more actual demonstrations, for benefit of your customers?
Hi,
1.- Rendering the fluid surface is not part of the simulation, it generates a surface from scratch at the end of each frame using ellipsoid splatting. So enabling/disabling the fluid renderer does not (in fact, cannot) have any effect whatsoever on the physical behavior of the fluid.
2.- I haven't been able to reproduce *any* of the issues you describe above when using any of the solutions in this thread. Tomorrow I will record videos and provide samples using smaller resolutions as you ask.
3.- There's nothing to figure out. Simply change the fluid resolution parameter, behavior is guaranteed to be the same (finer, or coarser looking, but overall the same).
4.- That page does not exist. If using Obi 4.X, try:
http://obi.virtualmethodstudio.com/tutor...space.html
If using 5.X, all simulations are performed in local space by design (as described here: http://obi.virtualmethodstudio.com/tutor...olver.html) so scaling the solver down will just work.
|