Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Running 3D Fluid on iOS
#2
(06-09-2018, 03:17 PM)skicattx Wrote: Hi,
We want to run a small and reasonably simple water and blood simulation on higher-end iOS devices. So far we have not been able to get the sim running on these devices. I'll post more details of the issues, but before spending more time on this, I have a few questions that I don't see fully answered here. "just use the simple simulation shader" is not an option, as we need the full 3D sim. Advertising seems to imply it should work, so:

1. Should it be possible (performance aside) to run the 3D Obi fluid sim on iOS devices?

2. Is the latest binary compatible with Unity 2017.4.x and 2018.1/2/3.x?
     a. If not, when can we expect compatibility?
     b. Do we need a new iOS binary lib?

1.- Performing a full 3D fluid simulation in mobile is going to use most of the resources in the device (supposing it is even capable of running it, which is a long shot), so unless your game revolves around it I'd advise against doing that. However nothing stops you from running a 3D simulation in a mobile device, you just need to adapt rendering to take depth testing into account. The physics simulation itself is platform agnostic and doesn't care if it is running in 2D or 3D. The only difference lies in rendering.

Obi's fluid renderer pipeline is made to be extensible. Akin to Unity's SRP, it allows you to write your own renderer/shader combinations and comes with two working implementations, each one at one end of the quality/performance spectrum: FluidRenderer (high quality, performance heavy) and SimpleFluidRenderer (low quality, lightweight). See:

http://obi.virtualmethodstudio.com/tutor...ering.html

The SimpleFluidRenderer is designed with mobile devices in mind, since most aren't capable of running a full 3D simulation. Pretty much all fluid gameplay dynamics we've seen in mobile devices are 2D. For this reason the SFP only supports 2D rendering.

You could either:
- Grab the FluidRenderer, see how it performs in your target device, and tweak it until performance is acceptable (downscale fluid buffers, drop lightning calculations from the shaders, etc).
- Build depth-testing on top of the SimpleFluidRenderer.

2.- Yep, it is compatible with all Unity versions up to 2018.2. Haven't tested 2018.3 yet, but should work fine there too.
Reply


Messages In This Thread
Running 3D Fluid on iOS - by skicattx - 06-09-2018, 03:17 PM
RE: Running 3D Fluid on iOS - by josemendez - 06-09-2018, 04:40 PM
RE: Running 3D Fluid on iOS - by skicattx - 06-09-2018, 08:53 PM
RE: Running 3D Fluid on iOS - by skicattx - 11-09-2018, 09:20 PM
RE: Running 3D Fluid on iOS - by josemendez - 12-09-2018, 08:19 AM
RE: Running 3D Fluid on iOS - by skicattx - 12-09-2018, 01:36 PM