Water impact on perfs even when not visible

Hi, i’m not sure this is a correct behaviour, but unlike trees and other objects, it seems that water (“water pro”) is rendered even when not seen on screen because it is behind the terrain, and it has an great impact on the frames per seconds.
So i was wondering, is that expected behaviour due to some reason, and if so are there some parameters to prevent this or to prevent the loss of frames per seconds?
Thank you very much!

Not that I know of. Sounds like you’ve baked occlusion Culling? Did you flag the terrain as static? I think that’s required when solving for object in OC. But I could be wrong.

Thanks for your answer, I tried to bake occlusion culling some time ago, but then clicked clear, so all datas for occlusion culling should be deleted. Do you think it can still have an impact? The terrain is marked as static though.
Actually, the most visible and constant impact is in the rendering section of the profiler, it all goes lighter when i either set the water inactive or just change the water mode to simple mode, even if the water is not seen.

Well if you cleared the culling data then everything in your scene is be evaluated, occluded or not. You’ll need to bake and keep the data for culling to work.

I’m curious, is the water on just one massive plane the fills in your entire scene/level, or smaller prefab/game objects? If it one massive object, then as long as a small portion is visible to the camera the entire mesh will draw. OC works at an object level I think, evaluating visibility by the objects boundary box(assumption). But it enables/disables the entire mesh rendering when the object is occluded, not specific portions of a mesh. Or at least Unity’s out of the box solution(again, assumption). If the previous is true, try using smaller mesh prefabs for water which you could tile, but it would also allow them to be disabled when occluded.

The rendering section I’m betting would have the largest impact unless you were doing heavy simulations, etc. Animated materials require a bit more work than static ones, so that’s probably the performance boost.

Actually i’m not using Occlusion Culling yet, I just gave it a try since I was not very familiar with it, that’s why i cleared the data, i wanted to wait for the map design to be finished or almost. The water is a huge plane, taken from the Standard Assets.
I have to check again but i found it hard to use occlusion culling with terrains and get interesting perfs, that’s why i didn’t dig into it yet.

OC baking normally shouldn’t take too long. Worth running it again to see if it works once OC is solves for. Not much too it either, I’d bet you could wrap your head around it in a few minutes (excluding OC bake time).

I’m using the aqua lite water(asset store purchase) for a project right now. Applied it to custom meshes from Blender. Unless you need a large area (ocean, etc) I’d use smaller ones to let OC do its thing. Again if possible depending on the scene setup.

1 Like