Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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. gdespaux2010

    gdespaux2010

    Joined:
    Feb 16, 2017
    Posts:
    24
    Are trees supposed to be handled by NatureRenderer as well? It seems unclear. The asset store description mentions it but it's not really in the docs.

    If I disable trees on my Terrain, they do disappear, so I assume NR doesn't handle them. Is it planned to do so? That would be another great performance increase.

    With the latest update, I have stopped receiving the "ArgumentOutOfRange" exception, but the missing grass patches still occur. It seemed to be fine when I used the built-in package manager to update, but when the asset store released it seems to have reverted.
     
  2. Sheprekt

    Sheprekt

    Joined:
    Dec 11, 2017
    Posts:
    5
    Yep. Procedural instancing is enabled. Perhaps it's issues with my URP settings - because the default Unity terrain grass is substantially faster as well. At least according to the asset description:

    Nature Renderer replaces Unity's default Terrain Detail Rendering system and works with your existing data. Use the same grass, vegetation, and trees and keep your existing terrains. We just render it better and faster.
     
  3. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    436
    The main cause of the framerate drop here is most likely the impact of the shaders. The amount of grass in the scene is not very large, so the performance improvement of instancing vs default Unity is not very large. (Unity will take about 1 ms or so and Nature Renderer about 0.4 ms. The difference is not very noticeable in the framerate).

    However, Nature Renderer uses much more complex shading compared to Unity's default grass. Unity renders the grass with a vertex-lit shader with only a diffuse texture. While Nature Renderer uses full PBR rendering with more complex wind and translucency. I have some changes planned for a future update to make it possible to disable some of these additional shading features if you don't need them.

    Furthermore, since the perspective of you game is from the top, a very large part of your screen is covered with grass. Shading performance is directly impacted by the amount of pixels drawn to the screen, so covering a large part of the screen has quite a large impact on performance. This is even more noticeable because of the shadows, which requires every object to be drawn multiple times.

    You can use a different shader for your grass to get better performance if you don't need the shading features (or wait a bit until I have added the possibility to disable shading features).
     
    Sheprekt likes this.
  4. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    436
    At the moment, trees are not rendered using Nature Renderer and only benefit with the better shaders and wind that come with Nature Renderer. I am working on an update to add full Procedural Instancing support for trees. So it will be added soon (later this month or next month).

    I looked more into the error and found some issues with the internal index calculations. They didn't throw an exception anymore but could still end up with wrong values, causing the grass to not render. It should be fixed in the latest build which will be available in a few days. I'll send you a download link to the latest preview build so that you can check if it fixes the issue for you.
     
    Lars-Steenhoff and gdespaux2010 like this.
  5. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    882
    Is it possible to modify the shaders to support GPU instanced indirect? I am trying to use your grass and trees with Vegetation Studio Pro. GPU instanced works but not instanced indirect.
     
  6. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    436
    Yes, that is possible. You can follow the documentation from Vegetation Studio regarding custom shaders for that.
     
  7. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    436
    Nature Renderer version 1.3.2 is now available through the built-in updater and will be on the Asset Store within the next few days. Go to Help > Nature Renderer > Check for Updates to download the new version.

    This version is a small patch that fixes a few errors that were reported.

    Fixed:
    • Fixed IndexOutOfRangeException on non-square terrains. This could cause terrain details to not render. Either on the entire terrain or on some parts.
    • Fixed IndexOutOfRangeException when resizing terrain.
    • Fixed issue where terrain details would not render when changing the shader of the detail’s material.
    • Fixed placement of terrain details on the edge of the terrain.
     
    Lars-Steenhoff likes this.
  8. bartek0403

    bartek0403

    Joined:
    Mar 20, 2018
    Posts:
    5
    Is it possible to use Indirect instancing with VR Single Pass Instanced mode? Just tried new update, but unfortunately with Procedural mode vegetation often blinks or displays only on one eye.
     
  9. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    38
    I'm having some trouble with the point light, it doesn't affect the grass at all.

    This is an example in the demo scene with the errors I get, I also have similar problem if I convert the vegetation to TVE's shader. In play mode all the vegetation appear in purple right on my camera, I'm not looking to solve this TVE here but maybe the additional information can help. upload_2020-7-2_17-52-45.png

    Note that this is on standard RP, with Unity 2019.4.0f1
     
    Last edited: Jul 3, 2020 at 12:18 PM
  10. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    436
    Thank you for reporting this. I just published a new version of Nature Shaders that should fix this issue (version 0.6.1). You can go to Help > Nature Renderer > Check for Updates to download it.
     
  11. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    436
    Nature Shaders version 0.6.1 is now available through the built-in package manager. Go to Help > Nature Renderer > Check for Updates to download it. Nature Shaders is a sub-package that contains all the shaders used by Nature Renderer and Open World Nature Kit.

    This update fixes the following two errors:
    • Fixed shader error undeclared identifier “UNITY_TRANSFER_LIGHTING”
    • Point and Spot lights now work correctly when using Procedural Instancing with Nature Renderer.
    The shader error undeclared identifier “UNITY_TRANSFER_LIGHTING” has been an issue for quite some time. We have received confirmation from Unity that this is a bug. Luckily, I was able to find a workaround and it is now fixed.
     
  12. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    436
    I'll look into it to see if it can be fully supported and get back to you (it should be possible).
     
  13. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    38
unityunity