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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Nature Renderer: Better terrain detail rendering ✅ PBR ✅ Custom Shaders ✅ Shadows ✅ Wind ✅ SRP

Discussion in 'Assets and Asset Store' started by Visual-Design-Cafe, Oct 3, 2019.

  1. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    If you can give me the details that I requested then I should be able to look into it for you and fix it if it is an issue of Nature Renderer.
    • What is the size of the terrain? And how many terrains do you have?
    • If you disable the Nature Renderer component on the terrain, do you still have the same issue?
    • Can you open the profiler in Unity and share the stats from the frame when you remove a tree. That should show what part of the code is taking up so much time.
    • Just to clarify, is the grass on your terrain currently added on the terrain as detail objects or as trees?
     
  2. Fabbs

    Fabbs

    Joined:
    Dec 2, 2013
    Posts:
    42
    Any word on if NR/NS works in 22.2? thx
     
  3. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
  4. Fabbs

    Fabbs

    Joined:
    Dec 2, 2013
    Posts:
    42
  5. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    90
    Any estimate on when we can expect object instancing or oclussion culling?
     
  6. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    387
    PutridEx likes this.
  7. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,571
  8. Djuan98

    Djuan98

    Joined:
    Sep 3, 2021
    Posts:
    12
    Ok I split the terrain up into 16 at first then did 32, I added nature render to each new terrain but after going through the profiler it is still instancing all the trees regardless of whether its 1 big terrain or 16 small terrains or 32 smaller terrains, Nature Renderer is not treating each terrain as seperate, it just renders everything together.
     
  9. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    We don't have a specific release date for this yet. Nature Renderer is now an official Unity Verified Solution, which means that Unity's QA team fully verifies that Nature Renderer works correctly in all Unity version. This is great, but it also means that we are a bit restricted with how many new features we can release due to the long QA process.
     
    PutridEx likes this.
  10. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
  11. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    The rendering is indeed batched together, but the loading is done separately. It should be a lot faster to remove trees and refresh Nature Renderer now that the terrain is split up.

    By default Nature Renderer does not limit the maximum distance at which terrains/vegetation is loaded because Nature Renderer does not know which terrains you will need for your game. If you have terrains that are far away from the player that you know you won't need to render then you can manually disable those terrains: https://v3.visualdesigncafe.com/nature-renderer/docs/2021/streaming#disabling-a-terrain
     
  12. Eloujah

    Eloujah

    Joined:
    Apr 28, 2014
    Posts:
    23
    Hi!

    I'm having an issue where Nature Renderer (2021.1.5, with Nature Shaders 2021.1.2) is using a high percentage of the frame timing.
    Here is the profiler:
    upload_2022-9-5_20-26-16.png

    The terrain (512x512) contains 8 different grass prefabs (Nature Asset) and looks like this:
    upload_2022-9-5_20-27-23.png

    I don't think this is too much grass...
    What can be the issue and how can I solve it?

    Thank you!
     
  13. Eloujah

    Eloujah

    Joined:
    Apr 28, 2014
    Posts:
    23
    Here is on the same terrain, with the same vegetation (8 details and 15 trees).
    upload_2022-9-6_14-47-39.png

    On the left is with Nature Renderer (2021.1.5) enabled, and on the right, disabled. The frame rate is lower with Nature Renderer.

    Thank you!
     
  14. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    That's indeed quite high. There can be a bit of overhead when running Nature Renderer, but this seems to be too much. Can you check the following?
    1. Is the performance issue still there with "Deep Profiling" disabled? Sometimes the profiler itself can cause performance issues due to profiling a large number of method calls.
    2. Can you try reducing the streaming budget in the Global Settings? If the performance issue happens in spikes then this may be the cause.
    3. Can you check if the garbage collector is causing performance issues? If it is then you will see the garbage collector in the profiler results.
    4. If possible, could you share a test project so that I can check the profiler details here? (You can submit a bug report if you want to send it privately)
     
  15. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    127
    theres some problem downloading nature renderer 2021 from the website. i would like to try the trial
     
  16. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    What kind of problem are you having? If you can let us know then we can help you out
     
  17. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    127
    Download just doest start
     
  18. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    127
    Tryed with chrome and edge no luck
     
  19. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    kilju likes this.
  20. Tim-Wiese

    Tim-Wiese

    Joined:
    Jul 7, 2012
    Posts:
    73
    I noticed crossfading doesn't work but certain grass/plants without LOD objects will scale in based on distance. Is there a way with LOD to have the last object use a non-Nature Renderer shader that offers fade out? Or do you recommend any other solutions to avoid pop in/out of assets? As it seems like all objects at some point could use Nature Shaders for detail objects (ie: rocks, etc) however I'd want them to crossfade as I find that to be the most pleasant visually vs. pop in/out.
    Thanks again for the great asset!

    EDIT: initial issue with interaction looks to be an possible issue with how we're loading scenes into our game.
     
    Last edited: Sep 22, 2022
  21. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    90
    Any way to tackle shadows of objects behind the player being unloaded and disappearing when dealing with tall objects?
    Trees tend to just pop out of existence once we pass a tall tree, so it's quite jarring when a shadow literally fades out of existence midway, then pops back on once the player turns around again.
     
  22. Watanka

    Watanka

    Joined:
    Sep 22, 2020
    Posts:
    21
    Hi !

    I have a flickering problem with the vegetation, following an update of Unity and Nature Renderer.
    With Unity 2020.3.22, HDRP 10.7.0 and Nature Renderer 2020, it was working very well.
    I've updated the project to Unity 2021.3.9f1, HDRP 12.1.7 and Nature Renderer 2021.1.5 and the issue started.

    It's a VR game and I'm using singlepass rendering. If I use multipass, it's working but with a big performance loss so it's not really an option.
    I also use The Vegetation Engine. At first I though it was the origin of the issue. But the vegetation added outside the terrain system (same TVE prefabs) are not affected. Here is a video of it in action where I enable/disable Nature Renderer.

    Let me know if you want any additionnal information or make me test things.
    Thank you !

     
  23. Tim-Wiese

    Tim-Wiese

    Joined:
    Jul 7, 2012
    Posts:
    73
    Does Crossfade work in Nature Shaders 2021?
    Tested in a new project 2021.3.9f1 with both Nature Shaders 2020 and Nature Shaders 2021. Crossfade is not working in Nature Shaders 2021 it does in Nature Shaders 2020. Tested with Nature Shaders demo scene & also tested with converted Nature Manufacture Mountain Trees Pack(create Nature Asset).
    LOD/Crossfade support is stated as working on the Nature Shaders 2021 Asset Store Product Page.
    If this is supposed to work can we get an ETA on a fix for this? Also, will crossfade ever work in Nature Renderer 2021 or 2022?
    Thanks!
     
  24. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Crossfade needs to be explicitly enabled in the shader import settings in the latest version of Nature Shaders 2021. You can select a shader in "Assets/Visual Design Cafe/Nature Shaders/Shaders" and select "Include" for Lod Crossfade in the settings:
    nature-shaders-lod-crossfade-stripping.jpg

    By default, all rendering features that are not strictly necessary are disabled to improve build times. The build times for URP and HDRP were getting ridiculously long due to the number of features that Unity added to the shaders/render pipeline. Unity was not stripping unused features by default, so we implemented these manual import settings.

    Note that crossfade is not currently supported by Nature Renderer. It adds a lot of performance and memory overhead to the rendering, especially with GPU Instancing, so we did not add support for it. We may add distance-based crossfade support in a future update (non-animated).
     
  25. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Thank you for reporting this. Could you submit a bug report with the details? https://support.visualdesigncafe.com/hc/en-us/requests/new

    We should be able to fix it for you, but we can't reproduce the issue here at the moment. Could you include the exact VR project settings that you are using? It will be easier for us to reproduce if we have the exact same settings. It is most likely an issue with how Nature Renderer is loading the active VR settings.
     
  26. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Can you submit a bug report with a screenshot/video of the issue and details of how the tree is set up? The shadows should be taken into account when culling trees so I am surprised to see this happening. It may be a bug that we can fix.
    You can submit a bug report here: https://support.visualdesigncafe.com/hc/en-us/requests/new
     
  27. Crowsinger

    Crowsinger

    Joined:
    Apr 23, 2022
    Posts:
    19
    Hello. Nature Renderer 2021 is working very well in a couple of scenes, but in this scene it is behaving strangely. Instead of rendering ferns on the landscape, it's painting these odd lines across the scene. Does anyone know what this is? Thanks

    upload_2022-11-1_9-50-52.png
     
  28. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    90
    Have a question as well, any way to run NR in 2022.2 yet? :)
    I know it's mostly running on LTS releases, but got someone needing it on URP 13 for 2022.
     
  29. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    169
    Is there a way to align trees to the normal of the terrain?
     
  30. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    You could try it, but the official release won't be available until Unity 2022 LTS is out. Most of the core features tend to work fine, but some URP-specific features and/or shaders may not work.
     
  31. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    No, not at the moment. As a workaround, you could add trees as detail objects if you need to align them to the terrain.
     
  32. AlperenMimaroglu

    AlperenMimaroglu

    Joined:
    Sep 5, 2022
    Posts:
    1
    Are there any plans to support Cross Fade?
     
  33. Zaddo

    Zaddo

    Joined:
    May 19, 2012
    Posts:
    68
    I want to use, Nature Renderer, GPU Instancer and Vegetation Engine. In the documentation it states that I need the full Nature Shaders Package if I want to use GPU Instancer.

    Do I still need the Nature Shaders Package if I am using the Vegetation Engine Shaders?
     
  34. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    485
    No, As you'll be using NRs rendering and TVE shaders.
     
    Zaddo likes this.
  35. MOLB

    MOLB

    Joined:
    Dec 19, 2012
    Posts:
    38
    How well does NR 2021 work with baked lighting? With NR 2020 I just got uniformely lit vegetation over the whole terrain, while even the built-in grass system would take its lighting from the baked terrain lightmap.

    Is this something that is supported, and if so, how can I make NR 2021 work well with baked lighting where no realtime lights are present?

    Thank you in advance.
     
  36. unity_dev3194

    unity_dev3194

    Joined:
    Apr 17, 2017
    Posts:
    74
    @Visual-Design-Cafe Recently upgraded to latest available 2021 LTS (2021.3.15f1), and details being rendered through Nature Renderer 2021 are now black in build. Cannot replicate the issue in the editor. Using URP and compiling for Windows using IL2CPP. Any thoughts on how to resolve this? Wasn't occurring in previous versions of 2021 LTS.

    The grass shader is included in "Always Included Shaders" list, and "Instancing Variants" is set to "Keep All."
     
  37. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    We'd like to implement it, but there are no specific plans yet. It is quite a technical challenge to combine it with GPU instancing while keeping good performance.
     
  38. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    What @HIBIKI_entertainment said is correct: You'll be using the Vegetation Engine shaders, so there is no need to get Nature Shaders.
     
  39. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Baked lighting is not supported at the moment. Unity does not support baked lighting + GPU Indirect Instancing, so there is not really a good solution at the moment except for creating a custom setup. You could bake the lighting to a texture using a custom tool and then sample it in the shaders. We are looking into providing a custom solution for this, but there are no specific plans yet.
     
  40. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    We'll have to look into this, I am not aware of any issue like this. Could you submit a bug report with screenshots and reproduction steps? (https://support.visualdesigncafe.com/hc/en-us/requests/new)
     
  41. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    222
    Is there a discord for this asset? Also any eta when the 2022 version will be available?
     
  42. Eloujah

    Eloujah

    Joined:
    Apr 28, 2014
    Posts:
    23
    Hi,

    1. Deep Profiling does not change anything in the result. The culling is still taking a high percentage per frame.
    2. Reducing the Global Settings (even to 0) does not change anything.
    3. It is not the garbage collector.
    4. It is my main project. I'll try to make a test project once I have some time.
    I tried the same thing with HDRP (12.1.7, Unity 2021.3.4f) this time (Nature Renderer 2021.1.6 enabled, then disabled). Here is the profiler:
    upload_2022-12-17_9-47-57.png

    Thank you
     
  43. kopanz

    kopanz

    Joined:
    Dec 6, 2016
    Posts:
    77
    Nature Renderer 2020・Perpetual License as being a "Verified Solution" on the Asset Store has worse performance than not using it at all. Just try removing the Nature Renderer scripts from the demo scene. You'll see the FPS increase after removing the Nature Renderer. Same result in Unity 2020.1 or 2021.3
     
  44. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    We don't have an official Discord yet. For the 2022 version, it will be released after Unity 2022.3 LTS is available. More info: https://v3.visualdesigncafe.com/nature-renderer/upgrade/2022
     
  45. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Can you let me know the size of your terrain, Detail Resolution, and Detail Resolution Per Patch? You can find these in the terrain settings: https://docs.unity3d.com/Manual/terrain-OtherSettings.html

    I can't seem to reproduce these culling performance issues yet. It may be that one of the settings above is very high.
     
  46. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Could you share a screenshot and the framerate comparison with us?

    The 2020 demo can have slightly worse performance when comparing directly (toggling Nature Renderer on and off), because a lot of additional rendering features are enabled when Nature Renderer is enabled. Such as shadows, translucency effects, better wind, and higher quality lighting. So when just toggling Nature Renderer on/off you are mostly comparing the performance impact of having those additional features enabled.

    The terrain in the demo is also extremely small, so the benefit of rendering large amounts of vegetation is not very apparent. For these reasons we made a better demo in the 2021 version that more accurately represents a real use-case of Nature Renderer. I recommend to give that one a try.
     
  47. kopanz

    kopanz

    Joined:
    Dec 6, 2016
    Posts:
    77
    I replaced the Nature Renderer 2020 with Advanced Terrain Grass in my game. Before the switch I was having trouble to maintain 60 FPS and having frame drops in 4K resolution. ATG gives the same look with just a bit different tint. Performance is a lot better. Unfortunately it matches with the results in demo scene. After you fixed the memory leak in December 2021 Nature Renderer never worked for me.
     
  48. szynal

    szynal

    Joined:
    Apr 16, 2014
    Posts:
    8
    In my case Cull, to be more specific TerrainGrassStreamer.GetBuffersForCellsInRange() and children methods usage of double.IsNAN took about 20-25% time. Ofc it's from deep profiler, so overhead is quite large.
     

    Attached Files:

  49. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Could you share some screenshots and more details about how you set up Nature Renderer in your project? You can submit a bug report on our website if you prefer not to post screenshots/details publicly: https://support.visualdesigncafe.com/hc/en-us/requests/new

    It is difficult to provide any guidance regarding performance without knowing what your scene, vegetation, and settings look like. To help you best we'd need:
    - A screenshot of the terrain and terrain settings
    - A screenshot of the Nature Renderer component with its settings
    - A list of the detail objects that are added to the terrain and what materials and shaders they use.
     
  50. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Thank you for reporting this. The performance is most likely overhead due to the deep profiling, but I have fixed it anyway for the next update. The isNaN check has been replaced with more performant code.