Obi Official Forum
Why do I get 15 draw calls from Obi if everything is disabled? - 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: Why do I get 15 draw calls from Obi if everything is disabled? (/thread-2348.html)



Why do I get 15 draw calls from Obi if everything is disabled? - emz06 - 01-07-2020

Hi,

I disabled all my gameobjects in the scene, and the screen is black.

I have two problems:

1) When my emitter & solver's gameobject is enabled, it still counts as several draw calls, even though:
       -it is behind the camera (not shown on screen)
       -the speed of emission is zero


2) Even when I disable all emitters and solvers in my scene, I still get 10 draw calls, and this is what I see in Frame Debugger:

https://imgur.com/a/nh3AuMy


How do I make sure I only get those draw calls when it's emitting AND on screen?

Thanks


RE: Why do I get 15 draw calls from Obi if everything is disabled? - josemendez - 01-07-2020

(01-07-2020, 11:23 AM)emz06 Wrote: Hi,

I disabled all my gameobjects in the scene, and the screen is black.

I have two problems:

1) When my emitter & solver's gameobject is enabled, it still counts as several draw calls, even though:
       -it is behind the camera (not shown on screen)
       -the speed of emission is zero


2) Even when I disable all emitters and solvers in my scene, I still get 10 draw calls, and this is what I see in Frame Debugger:

https://imgur.com/a/nh3AuMy


How do I make sure I only get those draw calls when it's emitting AND on screen?

Thanks

Fluid rendering uses a technique known as screen-space ellipsoid splatting. This is similar to a deferred renderer: several fluid properties are rendered to offscreen buffers (thickness, depth,  normals, color, etc) and then composited in a final pass. This happens once per frame regardless of how much fluid particles are on screen. So it pays a fixed cost of generating these buffers, just like any deferred renderer. The good news is that this cost is only dependant on screen resolution, so performance is the same regardless of how many particles are on screen.

The solver has a IsVisible property that will return true if the solver bounds intersect any camera's frustum. You can use this to enable/disable the renderer when needed.