Obi Official Forum
Bug / Crash Fluid effects Color always Black in iOS - 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: Bug / Crash Fluid effects Color always Black in iOS (/thread-3609.html)



Fluid effects Color always Black in iOS - Elmundo - 07-10-2022

Greetings.

Please find our video snip below. What you're seeing is a fluid and we tested this in Unity Editor and Android devices and the fluids effects were colorful ( pink , green , yellow ) however in IOS devices these colors don't appear and it's all pure black.


Unity Editor Test Video Link:
[color=rgba(var(--sk_highlight,18,100,163),1)]https://drive.google.com/file/d/10mWPo8pkaxz4B4CoxJpS8oY6huo9aDaE/view?usp=sharing[/color]



iOS Test Device  Test Video Link:
[color=rgba(var(--sk_highlight,18,100,163),1)]https://drive.google.com/file/d/1ALWdr3-YK0EaxZH4EdV3vWU1jDciJUoj/view?usp=sharing[/color]

Specs:

Obi Rope 6.4
* Unity 2021.3.5f1
* URP 12.1.7

[Image: QXZFf4.jpg]


RE: Fluid effects Color always Black in iOS - josemendez - 07-10-2022

Hi there,

What are your URP pipeline settings? Are both "opaque texture" and "depth texture" options enabled?


RE: Fluid effects Color always Black in iOS - Elmundo - 07-10-2022

(07-10-2022, 12:37 PM)josemendez Wrote: Hi there,

What are your URP pipeline settings? Are both "opaque texture" and "depth texture" options enabled?

https://i.ibb.co/Lt2sWnV/urp-settings.png

Yes, there are both enabled. It is really interesting this issue only occurs on iOS devices. Could it be somehow related to Metal API?


RE: Fluid effects Color always Black in iOS - josemendez - 10-10-2022

(07-10-2022, 01:20 PM)Elmundo Wrote: https://i.ibb.co/Lt2sWnV/urp-settings.png

Yes, there are both enabled. It is really interesting this issue only occurs on iOS devices. Could it be somehow related to Metal API?

Hi,

Particle colors are written into a color/thickness buffer, which is just a RenderTexture using ARGBHalf format. As long as floating point buffers are supported by the graphics API (and as far as I know, they are in Metal) it should work.

I've just tried deploying to an iPhone X and it works fine for me. Could you check if there are any errors/warnings being written to the console when running the app while attached to XCode? If there's been any issue setting up the renderer, Obi will write "Obi Fluid Renderer not supported in this platform." to the console.

kind regards,


RE: Fluid effects Color always Black in iOS - Elmundo - 14-10-2022

(10-10-2022, 07:51 AM)josemendez Wrote: Hi,

Particle colors are written into a color/thickness buffer, which is just a RenderTexture using ARGBHalf format. As long as floating point buffers are supported by the graphics API (and as far as I know, they are in Metal) it should work.

I've just tried deploying to an iPhone X and it works fine for me. Could you check if there are any errors/warnings being written to the console when running the app while attached to XCode? If there's been any issue setting up the renderer, Obi will write  "Obi Fluid Renderer not supported in this platform." to the console.

kind regards,

Checked the Xcode console but there is no such message 'Obi Fluid Renderer not supported' like this.

I have solved the color issue -sort of- just by disabling the "Lighting" flag from UnityFluidRendererFeature file. But by doing this, fluid visuals looks unlit, very simple and crude.

Shared the SS below. If this could give you any clue about how to fix this, please share. I will look into your shader code myself to find a better solution wihtout disabling the Lighting option.



[Image: SS.png]


[Image: Ekran-g-r-nt-s-2022-10-14-133207.png]

Well, fixed it by chaging your shader code. Thanks anyway.