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

Other Any chance to have AO in VR?

Discussion in 'VR' started by PolyMad, Oct 5, 2021.

  1. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    I mean, of course you can have it, but is it possible to have it without destroying the performance?
    I would like to add it as a very subtle effect, low resolution would be ok, but it should be blazing fast and keep the rendering in a single pass.
    Is this even possible?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,968
    Best thing to do is to bake it! Then it doesn't cost much performance.
    Otherwise if the other graphics aren't too demanding you can use real time AO, just try and find out the performance you get.
     
    PolyMad likes this.
  3. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Yes... forgot to mention: I don't want to bake lights.
    The problem is they require a huge amount of rendering time, and then... a huge amount of memory.
    I'm publishing for Quest and I don't want the player to wait for minutes and minutes to load each map, and I also want the app to be small.
    So yes: I'm looking for a real time solution.
    I would like to know if anyone has experience with this.
     
    Last edited: Oct 5, 2021
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,968
    Are the maps premade or made in realtime? For the quest 1 realtime AO will be expensive
     
  5. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    What do you mean with "premade or realtime"?
    I won't bake any lightmaps. I have already made some tests, and tried builds with 10 times the polys I need, so for my needs I'm ok.
    The final feature that is in "maybe" status is AO, because I know this will be one of the most expensive things in my render pipeline.
     
  6. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Just copying the depth buffer from tile memory to main memory, which is the first step no matter how simple your SSAO algorithm is going to be, is quite expensive already for tile-based mobile GPUs.

    Mobile VR's high resolution and double viewport makes any sort of full-screen postprocessing super expensive for that reason, so you should look into alternatives like lightmaps, vertex baking, and other ways to fake the effect directly in your assets.
     
    hippocoder, PolyMad and DevDunk like this.
  7. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Ye I guess it's too early to ask for real time AO filters... I went for a trivial solution to add AO to my maps without the use of Unity's lighting baker.
     
  8. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,968
    Maybe the The Bakery if you're fully against Unity's light baker?
    Still don't see why baking the AO is a bad idea
     
  9. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Unity solution is problematic. It has always been, and it still is. Big mesh with no UV, you tick to generate UV, it gets stuck, because the mesh is complex.
    And time. A lot of time. I have no time to waste. Things must work.
    Bakery: I have it but I don't know if it blends well with real time lighting. I also need real time lighting and shadows. Does Unity real time lighting then blend with Bakery's generated environment?
     
  10. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,968
    I don't know, currently use it in a VR title without realtime lighting.
    If you have it just try it
     
  11. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    No, thanks but no, I can't live without real-time shadows :D