Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Fluid not rendering in Android
#1
Hello,

I ran the FluidMill sample on my Android and understandably the performance was not great. I duplicated the scene and change the camera's Fluid Renderer to a Simple Fluid Renderer with the SimpleFluid material and changed the Obi Particle Renderer's shader to Obi/Fluid/Simple2DFluid.

This renders fine in the editor when I hit Play, but running directly on Android, the fluid is invisible (still affects the mill).

Can you point me towards how to fix this?

Thanks,
George
Reply
#2
(24-10-2018, 04:08 PM)george_playbite Wrote: Hello,

I ran the FluidMill sample on my Android and understandably the performance was not great. I duplicated the scene and change the camera's Fluid Renderer to a Simple Fluid Renderer with the SimpleFluid material and changed the Obi Particle Renderer's shader to Obi/Fluid/Simple2DFluid.

This renders fine in the editor when I hit Play, but running directly on Android, the fluid is invisible (still affects the mill).

Can you point me towards how to fix this?

Thanks,
George

Hi George,

Use "SimpleParticleShader.shader" in the ObiParticleRenderer instead. Also, note the SimpleFluidRenderer only works for 2D fluid as it does not perform depth testing. If you need a full 3D renderer for mobile, you can either add depth testing to the simple pipeline, or downscale the fluid buffers in the regular pipeline.

cheers,
Reply
#3
(24-10-2018, 05:24 PM)josemendez Wrote: Use "SimpleParticleShader.shader" in the ObiParticleRenderer instead. 

Hi jose, thanks for the response!

Changing the shader in the ObiParticleRenderer did not change anything, I imagine because I'm not really rendering the particles (Render property is false). 

Quote:Also, note the SimpleFluidRenderer only works for 2D fluid as it does not perform depth testing. If you need a full 3D renderer for mobile, you can either add depth testing to the simple pipeline, or downscale the fluid buffers in the regular pipeline.

Ok, I'm a bit confused because using the SimpleFluidRenderer in the editor makes the fluid still render in 3D space, though of course much more simple-looking than the regular fluid renderer. Am I misunderstanding? I changed the Solver's mode to 2D but it's still not rendering anything on the Android device (works in the editor). 

I'm not really sure how to add depth testing to the simple pipeline nor how to downscale the buffers in the regular pipeline. Is there any guide for doing these things?

Really appreciate it!
George
Reply
#4
(24-10-2018, 05:24 PM)josemendez Wrote: Hi George,

Use "SimpleParticleShader.shader" in the ObiParticleRenderer instead. Also, note the SimpleFluidRenderer only works for 2D fluid as it does not perform depth testing. If you need a full 3D renderer for mobile, you can either add depth testing to the simple pipeline, or downscale the fluid buffers in the regular pipeline.

cheers,

SimpleParticleShader.shader still doen't work for Android. 

How can I fix it?
Reply
#5
(01-06-2020, 06:06 PM)hromoyDron Wrote: SimpleParticleShader.shader still doen't work for Android. 

How can I fix it?

Hi,

It works fine for us, it's a pretty basic shader (a clip instruction plus some basic ambient+diffuse shading) so it really should work. Does it render anything at all? What error(s) are you getting in the log?
Reply
#6
(01-06-2020, 06:12 PM)josemendez Wrote: Hi,

It works fine for us, it's a pretty basic shader (a clip instruction plus some basic ambient+diffuse shading) so it really should work. Does it render anything at all? What error(s) are you getting in the log?


Sorry! It's really work fine for mobile.
But not work in BlueStacks.

So all is ok! Thank you!
Reply