I want to use obi fluid for large scale. - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: I want to use obi fluid for large scale. (/thread-2083.html) |
I want to use obi fluid for large scale. - Alexay - 05-03-2020 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 RE: I want to use obi fluid for large scale. - josemendez - 05-03-2020 (05-03-2020, 11:00 AM)Alexay Wrote: Hello, everyone. 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: RE: I want to use obi fluid for large scale. - Alexay - 05-03-2020 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!R1zabR0CgRinJ7BYAawbR7QYxlPsfYuvIqQIF8PD9A4 Is that possible? Thanks again. Alexay. RE: I want to use obi fluid for large scale. - josemendez - 05-03-2020 (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 : 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. RE: I want to use obi fluid for large scale. - Alexay - 05-03-2020 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 RE: I want to use obi fluid for large scale. - josemendez - 05-03-2020 (05-03-2020, 11:37 AM)Alexay Wrote: Thanks for your fast response. 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/fluidsimulation/GameFluids2007.pdf RE: I want to use obi fluid for large scale. - Alexay - 05-03-2020 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? RE: I want to use obi fluid for large scale. - josemendez - 05-03-2020 (05-03-2020, 12:55 PM)Alexay Wrote: ok then how can I increase the number of particles over 60k in obi fluid 5? 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. RE: I want to use obi fluid for large scale. - Alexay - 06-03-2020 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. |