Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Really low frame rate with Oculus Rift

Discussion in 'AR/VR (XR) Discussion' started by nostalgicbear, Feb 2, 2015.

  1. nostalgicbear

    nostalgicbear

    Joined:
    Mar 21, 2013
    Posts:
    97
    Hi guys,

    Im experiencing extremely low frame rates when I use the oculus rift in my scene. My scene currently has a large terrain, and a load of trees. Ive noticed that when I use a standard First Person Controller, Im getting appro 30fps, however when I replace this with the OVR Controller it drops to 1fps. It is completely unplayable.

    When I inspect the profiler, it shows that the CPU usage is completely taken up with vSync calls, however after looking at a number of posts on how to reduce this, nothing has worked. Ive read posts that said to set the QualitySettings.vSyncCount = 0, set the targetFrameRate = -1, and to also disable vSync in the quality settings, however none of these suggestions seem to work.

    Is there something I am forgetting to do thats causing this terrible frame rate issue?
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,241
    Does the Tuscany demo play at a reasonable framerate in a fresh project? What about simpler scenes in your own project?
     
  3. nostalgicbear

    nostalgicbear

    Joined:
    Mar 21, 2013
    Posts:
    97
    Simpler scenes run faster, but still not as smooth as I would like. The tuscany demo runs perfectly, I just checked there.
    I removed everything from the scene and just had a blank terrain, and it seemed to work okay. Not fantastic, but certainly usable. I added a proper terrain with approx 2'000 trees and now the profiler is being bombarded with Physics.simulate calls as can be seen below.



    The frame rate is current at 3-4fps.

    I tried to add occlusion culling but Im not sure if this is actually being applied to objects such as trees that are generated as part of the terrain as opposed to individual gameobjects.

    I tried to find out what causes Physics.simulate calls to spike, and I read that it is to do with having multiple collider and rigid body components present in your scene. Both of these are attached to the trees but I didnt think that frame rate would be affected so badly
     
  4. El Maxo

    El Maxo

    Joined:
    May 23, 2013
    Posts:
    177
    screen shots might help
     
  5. nostalgicbear

    nostalgicbear

    Joined:
    Mar 21, 2013
    Posts:
    97
    I got it sorted. The Physics.Simulate calls were being caused by all the colliders on the trees.