Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
xanderdavis's avatar
xanderdavis
Honored Guest
13 years ago

Unity/Rift: Water Solution for 60fps

So as I'm developing with the Rift and Unity, a major pillar of this effort is maintaining a solid 60fps for the smooth window-like view through the Rift to the world inside the Unity engine. Whenever framerate starts to drop, the VR suffers and when it gets below 30 fps, low framerate starts to even make me get motion sickness.

After lightmapping, now it seems the biggest culprit to low framerate is Unity's Water (Pro), likely since it is reflecting virtually everything, being used like an ocean. I noticed in the Tuscany Demo, they used a simple static texture for water, which at first I found sad, but now understand why.

Has anyone had any luck with alternative solutions for Unity + Rift framerate-efficient water? We're talking ocean-scale water within just a 1K to 2K map. I'm about to reluctantly experiment with static non-reflective textures, just as in the Tuscany demo.

-X

PS: I also raised the question at the Unity forums if anyone is interested: http://forum.unity3d.com/threads/180964-Best-Solutions-for-Ocean-Scale-60fps-Water?p=1237228#post1237228

PSS: In an experiment I switched off the single water GameObject and bam: even viewing the entire 1K - 2K scene from a cliff, the framerate shot up to 40-60fps, mostly 60fps! So lightmapping is recommended and large-scale default Unity water solutions are to be avoided!!! It got so bad, sometimes even if I looked down at the ground of my terrain object, where all I could see is the terrain and up-close grass texture I was standing over, the framerate took a nosedive to 4fps! FOUR. And you couldn't even see the water! It went back to 60fps after removing the water object entirely in the subsequent test build. So yeah, default Unity Pro water = bad.

4 Replies

  • Even though you can't see the water Unity by default does still draw it, or to put it another way Unity will only not draw something when it is outside of the cameras viewing frustum or when you use the occlusion system to bake in the visibility of objects to your scene.

    So check out the occlusion system it's good for static scenes.
  • shuston's avatar
    shuston
    Honored Guest
    Have you made any progress with this? I'm working on creating a beach scene and currently, I'm using Unity's Pro Water4. It definitely is killing FPS, but I haven't started measuring it yet. I'm curious to see how well it does on my home PC with a GTX 780, but haven't tried that yet.

    I'm going for realism, so I really like the look of the Water4 prefab, but like others are saying, I may have to kill some of the reflections.

    Any help is appreciated. I'll post another update when I try this on my gaming rig at home. At work I am using a Mac Book Pro circa 2010.

    Thanks,

    -Shane