Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mesh and Fluid Problem
#11
(13-12-2019, 08:27 AM)josemendez Wrote: Repulsion (pressure force) is not configurable, it is calculated to try and maintain a constant density. That's precisely what makes fluid "fluid". Artificially increasing pressure forces would make the fluid "explode", decreasing them would make it collapse.

You can increase the amount of substeps in the FixedUpdater, or the amount of density iterations in the ObiSolver to make the fluid less compressible. (increase simulation quality)

Here's a list of all configurable fluid parameters:
http://obi.virtualmethodstudio.com/tutor...rials.html

Good afternoon, we have on MacOS, the particles are not displayed in the perspective camera, but they work on the PC, why?
Reply
#12
(13-12-2019, 08:30 AM)sc00b Wrote: Good afternoon, we have on MacOS, the particles are not displayed in the perspective camera, but they work on the PC, why?

We develop on MacOS as our primary platform (then port to others), and particles are displayed just fine in both perspective and orthographic. Can you specify your camera parameters (near/far plane, fov)? Also, are you using just the ParticleRenderer, or a FluidRenderer? Using scene view or game view?
Reply
#13
(13-12-2019, 08:44 AM)josemendez Wrote: We develop on MacOS as our primary platform (then port to others), and particles are displayed just fine in both perspective and orthographic. Can you specify your camera parameters (near/far plane, fov)? Also, are you using just the ParticleRenderer, or a FluidRenderer? Using scene view or game view?

SimpleFluid - I change the camera on your scene from orthographic to perspective, and it does not work.
Reply
#14
(13-12-2019, 08:49 AM)sc00b Wrote: SimpleFluid - I change the camera on your scene from orthographic to perspective, and it does not work.

Sorry, but can't reproduce. Using MacOS 10.14.6, and Unity 2019.2.9f1. Also, no other user has ever reported anything similar, perspective/orthographic should not make a difference at all since the rendering pipeline is exactly the same for both:


What rendering API are you using? OpenGL? Metal?
Reply
#15
(13-12-2019, 08:53 AM)josemendez Wrote: Sorry, but can't reproduce. Using MacOS 10.14.6, and Unity 2019.2.9f1. Also, no other user has ever reported anything similar, perspective/orthographic should not make a difference at all since the rendering pipeline is exactly the same for both:


What rendering API are you using? OpenGL? Metal?

We use the latest version of unity and we have a problem with this. OpenGLES3 api. Now I’ll go over to version 9 and see if everything works correctly.
Reply
#16
(13-12-2019, 09:10 AM)sc00b Wrote: We use the latest version of unity and we have a problem with this. OpenGLES3 api. Now I’ll go over to version 9 and see if everything works correctly.

We are using OpenGLCore. Tested with Metal too and both behave correctly.

Edit: Tested with OpenGLES3 with Unity 2019.2.15, still cannot reproduce. I assume you're targeting Android right? Will investigate this further. Are you able to reproduce this in editor, or only when deployed in a device?
Reply
#17
(13-12-2019, 09:26 AM)josemendez Wrote: We are using OpenGLCore. Tested with Metal too and both behave correctly.

I switched to version 9, there, similarly, your scene does not work.

(13-12-2019, 09:26 AM)josemendez Wrote: We are using OpenGLCore. Tested with Metal too and both behave correctly.

Edit: Tested with OpenGLES3 with Unity 2019.2.15, still cannot reproduce. I assume you're targeting Android right? Will investigate this further. Are you able to reproduce this in editor, or only when deployed in a device?

We put the obi fluid render, the camera works as it should, set the obi simple fluid, it does not work.
Reply
#18
(13-12-2019, 09:41 AM)sc00b Wrote: I switched to version 9, there, similarly, your scene does not work.

Well, I still can't get it to not work. Both in 2019.2.15 and 2019.2.9, using OpenGLES3, things seem to work fine... Huh


There must be some other difference in our setups, but this really doesn't make much sense to me as it seems to work in all platforms we've tried, with all graphics APIs. Can you post a screenshot of your project settings?

Also, does any error pop up in the console?
Reply
#19
(13-12-2019, 09:47 AM)josemendez Wrote: Well, I still can't get it to not work. Both in 2019.2.15 and 2019.2.9, using OpenGLES3, things seem to work fine... Huh


There must be some other difference in our setups, but this really doesn't make much sense to me as it seems to work in all platforms we've tried, with all graphics APIs. Can you post a screenshot of your project settings?

Also, does any error pop up in the console?
You go to iOS and check if everything works on Android and PC versions. We have a problem with the IOS platform.

(13-12-2019, 09:47 AM)josemendez Wrote: Well, I still can't get it to not work. Both in 2019.2.15 and 2019.2.9, using OpenGLES3, things seem to work fine... Huh


There must be some other difference in our setups, but this really doesn't make much sense to me as it seems to work in all platforms we've tried, with all graphics APIs. Can you post a screenshot of your project settings?

Also, does any error pop up in the console?
Your simple fluid does not work on iOS. On PC and Android works
Reply
#20
Hi,

I found the culprit, seems like a bug in Unity. Turns out the camera depth texture accessible to the shaders isn't cleared to the correct value in OpenGLES unless the camera is explicitly told to render a depth texture. I will raise a bug report.

Found out that I had a regular (deactivated) FluidRenderer attached to the camera. The presence of this renderer set the camera depthTextureMode, so the SimpleFluidRenderer worked well.

Removing the FluidRenderer allowed me to reproduce the issue.

Simply adding this line to the SimpleFluidRenderer's Setup() method fixes it:
Code:
GetComponent<Camera>().depthTextureMode |= DepthTextureMode.Depth;

Attaching the updated SimpleFluidRenderer for convenience.


Attached Files
.cs   ObiSimpleFluidRenderer.cs (Size: 2.78 KB / Downloads: 4)
Reply