Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Is it possible to fit 8.2 million of triangles in a VR scene for a standalone HMD?

Discussion in 'VR' started by aserrano7, May 30, 2023.

  1. aserrano7

    aserrano7

    Joined:
    Mar 24, 2020
    Posts:
    8
    I'm making a VR application where a 3D map is displayed. I'm using Unity 2021.3.22 and XR Interaction Toolkit. I've been able to represent buildings by using GIS data. The problem is that the number of triangles increases from 842 k to 8.2 M, so my Meta/Oculus Quest 2 isn't able to easily move the scene. I already merged the building polyhedrons in Blender by 1 meter to reduce the number of vertices. Now I'm able to handle the scene in PC-VR, but I want to target the standalone version of this device. Do you have any idea to make the scene lighter without sacrificing the buildings in the scene or merging them even more? By the way, I can't simplify building messes since they are already simple polyhedrons.
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    how many gameobjects, materials? if can combine those then that would help.
    batching is enabled? is that urp or birp?
    do you have lights, shadows, post processing or other extras?

    can use culling or LODs, or perfect culling plugin from store (if many objects)

    or could reduce view distance, if nothing else helps.

    i tested the google 3D tiles plugin in quest, runs perfectly even if viewing full city (but their tiles are well optimized..)
     
    aserrano7 likes this.
  3. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,969
    8mil triangles in a scene is fine, but 8 mil tris on screen is not going to run.
    The maximum the quest 2 can put out is around 1.5 mil on screen, using AppSW and very simple materials (simple lit or baked lit in URP) with lighting disabled, and everything baked into 1 or 2 materials to keep draw calls very low.
    Realistic numbers are probably around 300-800k tris on screen dependant on the complexity
     
    aserrano7 likes this.
  4. aserrano7

    aserrano7

    Joined:
    Mar 24, 2020
    Posts:
    8
    Solved it. I used LOD by creating three versions of the building 3D models with different number of triangles and used the LOD Group component. Occlusion culling wasn't an option since my scene is an open map and there's no room for hiddng objects in between.

    Just FYI, I'm using URP and no batching nor post processing. I don't know the exact number of GameObjects but I wouldn't say there are too many. I wasn't using too many complex materials either. Just a basic light. The problem is that each building GameObject was made by a great number of polyhedrons hence the issue with the headset.
     
  5. aserrano7

    aserrano7

    Joined:
    Mar 24, 2020
    Posts:
    8
    Good to know. I'd try your tutorial to optimize the game with Application SpaceWarp
     
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,954
    You should still be able to use it in an outdoor scene assuming the player can't view everything from every location.
     
  7. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,969
    Make sure some kind of batching is used. Srp batching is pretty good.
    Realtime lighting is very expensive, especially with multiple at the same time, especially with shadows.
    Use simple lit shader where ever possible