Obi Official Forum
Help SimpleFluid doesn't render on iOS (OpenGL 3.0) - 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: Help SimpleFluid doesn't render on iOS (OpenGL 3.0) (/thread-2710.html)



SimpleFluid doesn't render on iOS (OpenGL 3.0) - Hanyi - 19-01-2021

Hello,

I’m unable to get obi simple fluid scene to work on iOS with OpenGL 3.0, the scene runs but the fluid can’t be seen. The same scene runs fine on iOS with metal and android with OpenGL 3.0. Any idea how to get it to work?

Versions used:
Unity version: 2019.4.12f1
MacOS Catalina
Xcode 12
Iphone 7
IOS 14

Error Message:
2021-01-20 03:37:49.510663+0800 TestObi[849:218514] Built from '2019.4/staging' branch, Version '2019.4.12f1 (225e826a680e)', Build type 'Release', Scripting Backend 'il2cpp'
-> applicationDidFinishLaunching()
-> applicationDidBecomeActive()
GfxDevice: creating device client; threaded=1
Renderer: Apple A10 GPU
Vendor:  Apple Inc.
Version:  OpenGL ES 3.0 Metal - 68.8
GLES:    3
GL_OES_standard_derivatives GL_KHR_texture_compression_astc_ldr GL_EXT_color_buffer_half_float GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_pvrtc_sRGB GL_EXT_read_format_bgra GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_texture_lod GL_EXT_shadow_samplers GL_EXT_texture_filter_anisotropic GL_APPLE_clip_distance GL_APPLE_color_buffer_packed_float GL_APPLE_copy_texture_levels GL_APPLE_rgb_422 GL_APPLE_texture_format_BGRA8888 GL_IMG_read_format GL_IMG_texture_compression_pvrtc
OPENGL LOG: Creating OpenGL ES 3.0 graphics device ; Context level  <OpenGL ES 3.0> ; Context handle -2082795264
OPENGL LOG: OpenGLES3 is deprecated on this platform
Initialize engine version: 2019.4.12f1 (225e826a680e)
2021-01-20 03:37:49.951373+0800 TestObi[849:218514] Unbalanced calls to begin/end appearance transitions for <UnityViewControllerStoryboard: 0x1035319f0>.
UnloadTime: 4.009625 ms
Setting up 1 worker threads for Enlighten.
  Thread -> id: 16e1c3000 -> priority: 1
Obi Fluid Renderer not supported in this platform.
Obi.ObiFluidRenderer:Setup()
Obi.ObiBaseFluidRenderer:OnPreRender()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)


RE: SimpleFluid doesn't render on iOS (OpenGL 3.0) - josemendez - 19-01-2021

(19-01-2021, 10:01 PM)Hanyi Wrote: Hello,

I’m unable to get obi simple fluid scene to work on iOS with OpenGL 3.0, the scene runs but the fluid can’t be seen. The same scene runs fine on iOS with metal and android with OpenGL 3.0. Any idea how to get it to work?

Versions used:
Unity version: 2019.4.12f1
MacOS Catalina
Xcode 12
Iphone 7
IOS 14

Error Message:
2021-01-20 03:37:49.510663+0800 TestObi[849:218514] Built from '2019.4/staging' branch, Version '2019.4.12f1 (225e826a680e)', Build type 'Release', Scripting Backend 'il2cpp'
-> applicationDidFinishLaunching()
-> applicationDidBecomeActive()
GfxDevice: creating device client; threaded=1
Renderer: Apple A10 GPU
Vendor:  Apple Inc.
Version:  OpenGL ES 3.0 Metal - 68.8
GLES:    3
GL_OES_standard_derivatives GL_KHR_texture_compression_astc_ldr GL_EXT_color_buffer_half_float GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_pvrtc_sRGB GL_EXT_read_format_bgra GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_texture_lod GL_EXT_shadow_samplers GL_EXT_texture_filter_anisotropic GL_APPLE_clip_distance GL_APPLE_color_buffer_packed_float GL_APPLE_copy_texture_levels GL_APPLE_rgb_422 GL_APPLE_texture_format_BGRA8888 GL_IMG_read_format GL_IMG_texture_compression_pvrtc
OPENGL LOG: Creating OpenGL ES 3.0 graphics device ; Context level  <OpenGL ES 3.0> ; Context handle -2082795264
OPENGL LOG: OpenGLES3 is deprecated on this platform
Initialize engine version: 2019.4.12f1 (225e826a680e)
2021-01-20 03:37:49.951373+0800 TestObi[849:218514] Unbalanced calls to begin/end appearance transitions for <UnityViewControllerStoryboard: 0x1035319f0>.
UnloadTime: 4.009625 ms
Setting up 1 worker threads for Enlighten.
  Thread -> id: 16e1c3000 -> priority: 1
Obi Fluid Renderer not supported in this platform.
Obi.ObiFluidRenderer:Setup()
Obi.ObiBaseFluidRenderer:OnPreRender()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

As the message says, OpenGL is deprecated on iOS. This means there’s no plan to support it further and will eventually be dropped in favor of Metal. This alone is a good reason to avoid it.

The issue is that Obi requires floating point and depth exture support, and will output the “fluid renderer not supported in this platform” if these aren’t supported. And in OpenGLES3 they aren’t, unless there’s specific extensions present. Most Android mobile devices have these, but not iOS. To use the built-in fluid renderer, you need support for these texture formats, which ES3 unfortunately does not have.

My advice is to switch to Metal (unless you have a really good reason not to) as OpenGL for Apple is as good as dead.


RE: SimpleFluid doesn't render on iOS (OpenGL 3.0) - Hanyi - 20-01-2021

(19-01-2021, 11:37 PM)josemendez Wrote: As the message says, OpenGL is deprecated on iOS. This means there’s no plan to support it further and will eventually be dropped in favor of Metal. This alone is a good reason to avoid it.

The issue is that Obi requires floating point and depth exture support, and will output the “fluid renderer not supported in this platform” if these aren’t supported. And in OpenGLES3 they aren’t, unless there’s specific extensions present. Most Android mobile devices have these, but not iOS. To use the built-in fluid renderer, you need support for these texture formats, which ES3 unfortunately does not have.

My advice is to switch to Metal (unless you have a really good reason not to) as OpenGL for Apple is as good as dead.

Thank you for the reply. Yeah, I'm constrain to use opengl because the current google cardboard xr plugin only supports until OpenGL 3.0 and not metal. Seems like I'll have to find another cardboard vr option.