Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity's breaking point?

Discussion in 'VR' started by cgbenner, Aug 14, 2019 at 3:35 PM.

  1. cgbenner

    cgbenner

    Joined:
    Jun 26, 2019
    Posts:
    11
    Hey....

    Can anyone tell me, on a computer that meets or exceeds all of the hardware requirements, latest drivers and running the latest version of Unity.... Is there a maximum recommended scene size, or perhaps number of assets that can be smoothly processed in play mode using Oculus Rift?

    I've been challenged to find the outer limits of Unity. I put together a scene with a full chemical plant. Roughly 2 dozen imported CAD models, all with dozens of individual meshes and all shaded. Everything loaded into Unity fine and I had the scene built and shaded in less than an hour. Gameplay with the Rift is extremely choppy and there are obvious FPS issue. The scene freezes and then catches up, tiles and is just very unpleasant to run. The file size of the scene is 475 KB.

    I'm sure there are ways I can optimize these models to make them smaller, but the point of this test was to basically find the breaking point. Now I need to determine if this is software or hardware related. Since the laptop more than meets the sys reqs, I'm thinking it's in Unity, and I may have FOUND my breaking point.

    Any ideas?
     
  2. mikerz1985

    mikerz1985

    Joined:
    Oct 23, 2014
    Posts:
    43

    It's not a limitation of Unity; all heavy 3d programs need to be optimized and VR in particular needs special care. For something like this, you'll see some benefit from single pass stereo rendering. You need to be very sensitive about what's happening in your shader; since you're using high poly meshes it matters a lot for both the vertex and fragment portions. If you can bake the lighting, that would be a big benefit. You would benefit a lot from using a LOD system for these kinds of meshes. You will benefit from marking the objects that will not be moving around as static. You will see benefits from using the LWRP.
     
  3. cgbenner

    cgbenner

    Joined:
    Jun 26, 2019
    Posts:
    11
    @mikerz1985

    If I am reading you correctly, the number of assets has less to do with the breaking point than how they are processed? Does that sound about right? If so, then our next focus (for me) is to learn about proper optimization.
     
  4. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    57
    so, at 90fps you have somewhere in the region of 11ms worth of processing time per frame. how and where you spend that time will depend on what your eventual goals are.

    large CAD models can contain an extremely large number of polygons (into the 100's of millions), assuming that your rendering is taking significantly longer than the allotted 11ms, its likely that you will need to simplify the models, or simplify the shader, or both, in order to approach a desired 90fps.

    you can use the unity profiler to get an idea of how much over you are, and then work backwards from there to determine what changes you'll need to make to your scene to achieve frame rate.
    (https://docs.unity3d.com/Manual/Profiler.html)