Search Unity

VR + Trees

Discussion in 'VR' started by FlightOfOne, Apr 26, 2019.

  1. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    Hey all,

    I am having a difficult time with Trees. I have tried speed tree, Nature Manufacture trees with vr. With Nature manufacture or speed trees, I get a huge performance drop when I even put 1 tree (Not kidding, 1). I am getting horrible performance.

    Maybe it is the shader?

    Has any one been able to got a good amount of trees with good performance? If so will you PLEASE share your secret recipe? A good tree shader? Any tips/tricks?

    Thank you.
     
    bsyzek likes this.
  2. jorgeolothar

    jorgeolothar

    Joined:
    Mar 27, 2016
    Posts:
    26
    I have used Coniferous Forest for VR and the performance is really good, even in my old GTX 970. I pretty much used the demo scene directly for a couple of projects. Just make sure to run occlusion culling.Don't have them contribute GI.

    LushLOD Trees were fairly good but they are outdated now with current Unity versions and the LODs might not work anymore ... They also depended on a single camera, which is difficult in VR if you are supporting multiple SDKs (SteamVR, Oculus, etc) each with their own camera.
     
  3. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    I will have to check this out.

    I am only using SteamVR, don't use multiple SDKs. Also, using VSPro it create it's own lods which works fine in VR.

    @jorgeolothar About how many trees did you have in your view port?

    Thank you! I will give those a try.
     
    Last edited: Oct 2, 2019
  4. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    I used Speedtree on oculus quest. I did use mobile speedtrees and they work fine, also with multiple.
    I'm not sure what platform you are targeting? Has a lot to say...

    I also tried naturemanufacture (the demo scene) on bootcamp on a macbook pro 2019, on windows mixed reality. Slightly low framerate but was doable.
     
  5. MonikaPeters

    MonikaPeters

    Joined:
    Oct 10, 2019
    Posts:
    13
    It may be the shader, check it first.
     
  6. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    PC (windows), video card I am testing on is a 1080. I started using a lot of billboard trees for anything beyond 30m. It looks ugly but oh well I guess.
     
    Jelmer123 likes this.
  7. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    What would I check for exactly?
     
  8. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    I did notice that some speedtrees have multiple very hires textures, perhaps one optimization could be to set quality size to half in the project's quality settings. Also how much AA are you using? Still I did render the naturemanufacturer scene on a macbook pro... with realtime shadows. Also with reduced LOD but there were at least 1-3 trees at LOD0 and maybe 10 at LOD1 or so. This is what I was doing :D https://twitter.com/JelmerVerhoog/status/1170262916131708928?s=20
     
  9. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    I don't remember off hand but I believe AA is off. That's a good amount of trees you have! By the way I am also using Nature Manufacture trees. Lately I am learning that polycount isn't the biggest concern any more (I mean you want to keep it reasonable) but the texture size/material count is what kills the performance. It is very possible it's the texture, I will have to investigate this. Thanks!

    Looks nice, that's a pretty immersive scene you got there!

    It is really depressing to see you get 144fps on non vr and then see it <30fps on vr. I wish there was a way (maybe I just not aware) to automatically reduce quality/resolution on distant objects, without having to use LODs. Because in VR, detail beyond about 50m is inherently poor anyways.
     
    Last edited: Oct 13, 2019
  10. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    for heavy scenes you kinda need LODs I think. But textures are always somewhat optimised for distance, that's what the mip maps are for (handled automatically by Unity).

    But yeah, anyhow I still find it a little weird that you get such performance drops. Could you post a short clip / jpg of your scene? lighting settings all simple i suppose?