Posts: 5
Threads: 1
Joined: Mar 2020
Reputation:
0
Hello, everyone.
Today I am going to discuss about obi fluid asset usage into my unity project.
I am really like the videos attached to the unity asset store for this asset.
But I saw it doesn't support in large scale mode like ocean or river.
Because when I set the maximum particle count to over 3000, then it crashes.
Is there anyone who has a solution for this?
Of course it will be better if anyone has a great solution with Unity HDRP.
Thanks. Alexay
Posts: 6,309
Threads: 24
Joined: Jun 2017
Reputation:
399
Obi Owner:
05-03-2020, 11:10 AM
(This post was last modified: 05-03-2020, 11:18 AM by josemendez.)
(05-03-2020, 11:00 AM)Alexay Wrote: Hello, everyone.
Today I am going to discuss about obi fluid asset usage into my unity project.
I am really like the videos attached to the unity asset store for this asset.
But I saw it doesn't support in large scale mode like ocean or river.
Because when I set the maximum particle count to over 3000, then it crashes.
Is there anyone who has a solution for this?
Of course it will be better if anyone has a great solution with Unity HDRP.
Thanks. Alexay
Hi there,
I assume you're using Obi 4.X, since in 5.X there's no maximum particle count setting. Anyway, it should not crash regardless of the particle count, we've tried with +60000 particles and apart from the terrible frame rate, it worked just fine.
Keep in mind that if you use it for large scale simulations, you will lose realtime performance. It's not that it won't work for large-scale simulations, it's just that it ceases to be practical for games.
Regarding HDRP, we are currently porting the fluid renderer to it now that it supports post-effects.
Edit: here's a stress test we did some time ago:
Posts: 5
Threads: 1
Joined: Mar 2020
Reputation:
0
Well, there is an option to change the number of particles in each blueprint file in obi fluid 5.x isn't it?
If I am wrong, I will purchase the asset and will try it myself.
By the way, my aim is to simulate the fluid in ocean scale, not bottle.
Here is the video file I am going to make similar to this with obi fluid v5.x :
https://mega.nz/#!ur4lQKRT!R1zabR0CgRinJ...qQIF8PD9A4
Is that possible? Thanks again. Alexay.
Posts: 6,309
Threads: 24
Joined: Jun 2017
Reputation:
399
Obi Owner:
05-03-2020, 11:29 AM
(This post was last modified: 05-03-2020, 11:35 AM by josemendez.)
(05-03-2020, 11:23 AM)Alexay Wrote: Well, there is an option to change the number of particles in each blueprint file in obi fluid 5.x isn't it?
Yes, but that's not the maximum amount of particles in the solver. It's just the capacity of that particular fluid blueprint.
(05-03-2020, 11:23 AM)Alexay Wrote: Here is the video file I am going to make similar to this with obi fluid v5.x :
https://mega.nz/#!ur4lQKRT!R1zabR0CgRinJ...qQIF8PD9A4
Is that possible? Thanks again. Alexay.
It's not just impossible, it's *very* impossible .
The simulation seen in that video is eulerian (that is, grid-based), and only simulates the surface of the fluid, not its internal dynamics. Doing this is far, far cheaper (and simpler) than what Obi does. It is also quite easy to implement in the GPU, without the need for compute shaders.
Stay away from particle-based simulators (SPH, PBF) and even grid-particle hybrids (MPM, PIC/FLIP, and all its variants). What you're looking for is a grid-based shallow water simulator.
Posts: 5
Threads: 1
Joined: Mar 2020
Reputation:
0
Thanks for your fast response.
Can you provide me some good unity projects like the video?
If you can help me for the issue, I am going to purchase your obi fluid asset for your friendly speaking & great support.
Thanks. Alexay
Posts: 6,309
Threads: 24
Joined: Jun 2017
Reputation:
399
Obi Owner:
05-03-2020, 11:48 AM
(This post was last modified: 05-03-2020, 11:49 AM by josemendez.)
(05-03-2020, 11:37 AM)Alexay Wrote: Thanks for your fast response.
Can you provide me some good unity projects like the video?
If you can help me for the issue, I am going to purchase your obi fluid asset for your friendly speaking & great support.
Thanks. Alexay
Hi Alexay.
As far as I'm aware, there's no commercial asset that does the simulation seen in your video (I might be wrong, though).
How to implement it depends a lot on how you implement the terrain too, as one of the inputs for the simulator is the terrain height/slope at each grid cell. This is probably the reason why there's no general, all purpose simulator for this. It's just too tightly coupled to the rest of your game.
Most people implement this themselves, it's not that hard if you know how to write code and have a few basic fluid physics notions. What I can do though is provide some resources on how to implement it. The following slides describe a very simple technique (literally 3 lines of code, see page #12) to simulate what you want (called "heighfield" fluids in the slides):
https://www.cs.ubc.ca/~rbridson/fluidsim...ds2007.pdf
Posts: 5
Threads: 1
Joined: Mar 2020
Reputation:
0
ok then how can I increase the number of particles over 60k in obi fluid 5?
Is there any option to control the amount in obi solver?
Posts: 6,309
Threads: 24
Joined: Jun 2017
Reputation:
399
Obi Owner:
05-03-2020, 01:12 PM
(This post was last modified: 05-03-2020, 01:14 PM by josemendez.)
(05-03-2020, 12:55 PM)Alexay Wrote: ok then how can I increase the number of particles over 60k in obi fluid 5?
Is there any option to control the amount in obi solver?
Simply set the blueprint capacity to 60000 (or higher), then click "Generate". The solver automatically adapts to the amount of particles from all blueprints being used. No need to control it.
It will be slow as hell though.
The video I posted above took 32 minutes, to render 24 seconds of video at 30 fps. So the solver ran at less than 1 frame per second. Also, by using Obi your game is doing a lot of absolutely unnecessary work as you don't care about internal dynamics at all.
Posts: 5
Threads: 1
Joined: Mar 2020
Reputation:
0
Hello, josemendez.
Actually, I don't have any basic theory about fluid simulation in maths.
So I want to get help for my issue from you.
Can pay you budget via paypal for your effort.
How do you think to cooperate with me?
Thanks Alexay.
|