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
    It is planned for a major Nature Renderer 2021 update. The trees required too many fundamental changes to make a regular backwards-compatible update.
     
    Ruchir and PutridEx like this.
  2. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Using RefreshFlags.Renderers in the Refresh() method should work. Note that if the grass has a LOD Group (or uses a shader with custom culling) then adjusting the DetailDistance has no effect, you'll have to edit the LOD Group directly.
     
  3. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    It could be caused by a lot of different things, can you let me know what shaders, materials, and settings you are using?
    The main causes are usually:
    - The translucency setting in the material.
    - Difference in reflection probes or light probes. The objects may be using different probes.
     
  4. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Strange, I just downloaded everything directly from the Asset Store into a new project and it seems to work fine. Were there any errors or warnings during import? And can you go to Window > Package Manager (Visual Design Cafe) to check if you have the latest version installed?
     
  5. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Thank you! Local wind zones are still in the research/prototype phase, so it will still take a while until it is available.
     
  6. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Mauri likes this.
  7. unity_tnFzo3PuHFxk9Q

    unity_tnFzo3PuHFxk9Q

    Joined:
    Jul 18, 2018
    Posts:
    2
    We are creating our art in separate Unity projects. The art group is using both URP and HDRP in creating their scenes. We are evaluating the demo install and it seems perfect for our needs however we still need to determine if we can set the pipeline at runtime depending on what pipeline the current scene uses. Is this possible with Nature Renderer?
     
  8. Roboserg

    Roboserg

    Joined:
    Jun 3, 2018
    Posts:
    83
    1. Does it make the rendering faster only for grass?
    2. How exactly do you optimize the faster grass rendering? By using GPU instance indirect? Because if you are not using GPU instance indirect Unity already does GPU instancing (just not indirect)
    3. What sets it apart from the "GPU Instancer" asset, that uses gpu instance indirect not only for grass like this asset does, but also for trees or any prefab at all. "GPU Instancer" also does GPU frustum culling + GPU occlusion culling. I am confused as to what Nature Renderer does "better" given that the price for "GPU Instancer" is the same, but it does so much more.
     
    Last edited: Sep 11, 2021
  9. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    387
    Any ETA on this ?
     
    Bwacky likes this.
  10. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    924
    Is it possible to use a custom grass shader with Nature Renderer? And have it work with wind and all?

    Alternatively, is it possible for nature grass shader to pick color from terrain?
     
    Last edited: Sep 18, 2021
  11. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    90
    Would also like to ask for more or less of an ETA for NR21. Not sure I should keep waiting with a few of my customers or migrate them to different solutions in the meantime. A time-frame, even if roughly estimated would be quite helpful.
     
  12. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,050
    I am looking for a grass system for my project and yours looks fab. What I need to do though is to paint grass procedurally at runtime when the level loads, so I will have defined areas where I want a specific type of grass to grow. Is there an API that allows me to say place this grass object at this place on the level, and then your asset will combine those and make up the final game objects? Is there an example script for doing runtime script based placing of grass?
     
  13. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,616
    Can anyone suggest a good set of plant models to use with these shaders. I tried converting the Vegetation examples and they didn't work, so if anyone can suggest a nice set of grass, bushes and trees so I can test that would be very helpful.
     
  14. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    1. Yes, only grass and plants at the moment. Trees are not yet supported.
    2. GPU Instanced Indirect, shader and rendering optimizations (such as reducing density in distance, limiting shadow distance for grass, frustum culling, render queue optimization, etc.), and efficient data streaming and LOD calculations.
    3. The main difference is some of the points in #2 and the seamless integration with the terrain system. Nature Renderer will automatically load and render the terrain details, give you live editing and previews in the editor, and runtime editing. We also provide a fallback renderer for devices that do not support GPU Instanced Indirect, such as older devices or Web GL. In general, we provide slightly less broad functionality but a much more streamlined experience.
     
  15. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    The goal is after Unity 2021.2 is out of beta, but before the end of the year. I don't have an exact timeline though, as a lot of the schedule depends on the number of support requests I receive. I have to split my time between developing new features and providing support for the current version, and the support can take up a lot of my time.

    If you would like to help, I am looking to hire a Support Engineer to help with the support and QA so that I can spend more time on developing new features. So if you know anyone looking for a job then please do refer them :)

    (@Bwacky )
     
    Bwacky likes this.
  16. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    A custom shader is possible if you implement some of our wind shader code. It would take quite a lot of work though.
    Editing our shaders to sample the terrain color would be a lot quicker. You can set a global shader texture with the terrain color and then sample it in the fragment shader. Feel free to submit a support request if you need some specific help with this.
     
    SunnySunshine likes this.
  17. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    You can use the regular Unity API to edit the terrain at runtime. Nature Renderer will automatically load the changes. There is a short support article about this topic with more info: https://support.visualdesigncafe.com/hc/en-us/articles/900000305523-Place-Objects
     
  18. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    https://www.visualdesigncafe.com/realistic-nature/
    Our first vegetation pack will be out next week :) They are optimized for Nature Renderer and our shaders.

    You can also use our mesh and material converter in the paid Nature Shaders asset to convert any asset. Feel free to contact me if you need any help with this (or if you need an example).
     
    PutridEx likes this.
  19. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    924
    Thanks for the reply.

    I feel like this could be a good out-of-the-box feature (sampling terrain). It's quite commonly used in stylized scenes.

    All the best.
     
    Last edited: Oct 14, 2021
  20. daedal

    daedal

    Joined:
    Dec 19, 2013
    Posts:
    31
    Hey @Visual-Design-Cafe,

    I'm hitting an issue that only shows up in VR where chunks of vegetation appear and disappear as the camera moves. Some of the vegetation is also only rendering in one eye. This sounds similar to bartek0403's issue which was supposed to be fixed last year.

    I'm using single pass instanced rendering, TVE, and the default settings on the Nature Renderer component. Any ideas what could be causing this?

    Thanks!

    Edit: I'm not seeing this in builds so this is currently just a nuisance in the editor. Also multipass has different issues in the editor like shadows flickering in and out.
     
    Last edited: Oct 29, 2021
  21. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    910
    Having some issue with the Nature Shaders on the new 2021.2 release. They seem to turn black, unless I enable translucency.

    Using HDRP on an M1 Mac, with the native ARM editor. There's also an error from one of the ShaderX DLLs (possibly not compatible with ARM?), but this doesn't appear to break anything.
     
  22. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    The issue should be fixed in the latest Nature Shaders Essentials version (version 1.0.8). You can download the update by going to Help > Nature Shaders Essentials > Check for Updates.

    Please note that Unity 2021 is not officially supported, so some features may not be fully functional. Full support is coming with Nature Renderer 2021.
     
    Wolfos likes this.
  23. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Could you send me an email with a screenshot/video of the issue? As well as your project settings? Then I'll take a look at it for you. There are no know issues with VR at the moment, but I may have missed something that is causing issues in your project.
     
  24. GrassWhooper

    GrassWhooper

    Joined:
    Mar 25, 2016
    Posts:
    82
    Exception: Failed to load compute shader for Nature Renderer
    followed by many null errors
    is what i get, whenever i open the sample scene after importing nature renderer to my project


    upload_2021-11-11_17-10-28.png

    any ideas how to fix that?

    using 2019.4.31f1
     
    Last edited: Nov 11, 2021
  25. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    910
    This actually started after updating it. Though admittedly I don't have anything called 'nature shaders essentials'. Just 'nature shaders'.
     
  26. mikeohc

    mikeohc

    Joined:
    Jul 1, 2020
    Posts:
    215
    Any idea why only the grass on terrain seem to be over exposed? I'm using Bakery so the light intensity and exposure is at different values than default HDRP. Everything else is fine in the scene...

    Screenshot (382).png
     
  27. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    189
    Any news, updates, or expectations for 2021?
     
    Wolfos and PutridEx like this.
  28. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    90
    26 days to go at worst :rolleyes::rolleyes:
     
    DEEnvironment likes this.
  29. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    387
    I think it will be Nature Renderer 2022 ;)
     
    Claytonious and nehvaleem like this.
  30. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    862
    Hi, I've run into some wierd issues: my terrain tiles are runtime generated, using terrainData. It was all running correctly in editor but after I put my scene and assets inside assetbundles, the grass won't render. Though the nature renderer debug section still shows the correct instances been rendered, it's just they don't show up in the game.
     
  31. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    865
    There can be a *lot* of reasons for this kind of thing when using asset bundles. Asset bundles can be complex to get right. If you want to get useful help about this, then please provide much more specific detail including what you have already found so far in your own debugging to narrow the problem down.
     
  32. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    865
    Yeah. Sadly, this has forced us to go back to Vegetation Studio Pro for now (we need support for trees). I'll check back in a few months for the next project, maybe, unless Vegetation Studio is finally solid.
     
  33. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    862
    thanks for the reply. It seems more like the instancing shader variant is not packed into my asset bundles. I'll try to pack all instancing related variants into the bundles.
    I have another issue: I'm also using The Vegetation Engine shaders for my grass in URP 10+, and I've tried to use the TVE shader settings to add nature renderer support to all TVE shaders and manually add nature renderer scripts into the grass shader. Non of my efforts work, nature renderer still can't render my grass with procedural instancing enabled. I also found that the nature renderer supplied shader include codes are in CG-program, but the new TVE shaders in URP are using HLSL, could this be the reason why my grass can't use the procedural instancing feature?
    Any luck on getting TVE shaders working with procedural instancing?
     
  34. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,100
    Where'd the author go? Sent an email quite some time ago and no reply so far which is unusual.
     
  35. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    387
    Could be he got vacations for some time.

    Thats the price and risk of using 3rd party solutions, so calculate that into time and money cost :)
     
    Claytonious likes this.
  36. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    910
    Gotta admit this ShaderX stuff is a work of genius. I still haven't managed to nail down the 'black grass' issue. Only that it doesn't happen if I set it to translucent. Does anyone know more?
     
  37. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    277
    HI @Visual-Design-Cafe - I 've got Nature Renderer recently in the sales and it already helped a lot with my terrain & performance. Is there any (easy) way to move the "Visual-Design-Cafe" Folder to another location than default?
     
  38. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    910
    Just a heads up - this is now fixed by updating all the plugins and shaders to the latest version.
     
    Last edited: Jan 4, 2022
  39. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    862
    We've tried the example codes in our project, but there is an error after we modified the detail layers, it says the index is out of range of array, the detail of the error is down below:
    Code (CSharp):
    1. IndexOutOfRangeException: Index was outside the bounds of the array.
    2. VisualDesignCafe.Memory.UnmanagedArray`1[T].Clear (System.Int32 x, System.Int32 y, System.Int32 width, System.Int32 height) (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer URP/Assets/Visual Design Cafe/Plugins/com.VisualDesignCafe.NatureRenderer/Runtime/VisualDesignCafe.Memory/UnmanagedArray.cs:138)
    3. VisualDesignCafe.Rendering.Nature.Detailmap.Clear (System.Int32 x, System.Int32 y, System.Int32 width, System.Int32 height) (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer URP/Assets/Visual Design Cafe/Plugins/com.VisualDesignCafe.NatureRenderer/Runtime/VisualDesignCafe.Rendering.Nature/Terrain/Detailmap.cs:39)
    4. VisualDesignCafe.Rendering.Nature.TerrainData.RefreshDetailmaps (VisualDesignCafe.Rendering.Nature.TerrainRect rect) (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer URP/Assets/Visual Design Cafe/Plugins/com.VisualDesignCafe.NatureRenderer/Runtime/VisualDesignCafe.Rendering.Nature/Terrain/TerrainData.cs:628)
    5. VisualDesignCafe.Rendering.Nature.TerrainData.Refresh (VisualDesignCafe.Rendering.Nature.TerrainData+RefreshFlags flags, VisualDesignCafe.Rendering.Nature.TerrainRect rect) (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer URP/Assets/Visual Design Cafe/Plugins/com.VisualDesignCafe.NatureRenderer/Runtime/VisualDesignCafe.Rendering.Nature/Terrain/TerrainData.cs:380)
    6. VisualDesignCafe.Rendering.Nature.NatureRenderer.Refresh (VisualDesignCafe.Rendering.Nature.NatureRenderer+RefreshFlags flags, VisualDesignCafe.Rendering.Nature.TerrainRect bounds) (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer URP/Assets/Visual Design Cafe/Plugins/com.VisualDesignCafe.NatureRenderer/Runtime/VisualDesignCafe.Rendering.Nature/NatureRenderer.cs:599)
    7. VisualDesignCafe.Rendering.Nature.NatureRenderer.Refresh (VisualDesignCafe.Rendering.Nature.NatureRenderer+RefreshFlags flags) (at C:/Visual Design Cafe/Projects/Nature Renderer/Unity/Nature Renderer URP/Assets/Visual Design Cafe/Plugins/com.VisualDesignCafe.NatureRenderer/Runtime/VisualDesignCafe.Rendering.Nature/NatureRenderer.cs:538)
    8. SuperTrampers.TerrainSystem.LevelingData.CullingGrass (VisualDesignCafe.Rendering.Nature.NatureRenderer natureRenderer, UnityEngine.TerrainData data, UnityEngine.Vector2Int res) (at Assets/_SuperTrampers/Scripts/Runtime/TerrainSystem/LevelingTerrain/LevelingTerrain.cs:55)
    9. SuperTrampers.TerrainSystem.TerrainManager.SetTerrainData (SuperTrampers.TerrainSystem.NetworkLevelingData[] levelingDatas) (at Assets/_SuperTrampers/Scripts/Runtime/TerrainSystem/LevelingTerrain/LevelingTerrain.cs:326)
    10. SuperTrampers.GameProgress.LoaclTerraform (SuperTrampers.TerrainSystem.NetworkLevelingData[] networkLevelingDatas) (at Assets/_SuperTrampers/Scripts/Runtime/Network/Mirror/GameProgress.cs:2428)
    11. SuperTrampers.GameProgress.ProcessTerraform (System.Object[] data) (at Assets/_SuperTrampers/Scripts/Runtime/Network/Mirror/GameProgress.cs:2441)
    12. SuperTrampers.GameProgress.ProcessRequests () (at Assets/_SuperTrampers/Scripts/Runtime/Network/Mirror/GameProgress.cs:2495)
    13. SuperTrampers.GameProgress.Update () (at Assets/_SuperTrampers/Scripts/Runtime/Network/Mirror/GameProgress.cs:2621)
    14.  
     
  40. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Can you double-check if you have the latest version of Nature Renderer installed (version 1.5.2)? I believe this error has been fixed. But if it still happens please submit a support request with the details and I'll look into it for you.
     
  41. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    It has indeed been fixed in the latest version.

    Thanks :) We are preparing to release it as a separate free framework so that everyone can use it. If you are interested, you can already apply here: https://v2.visualdesigncafe.com/shaderx/
     
  42. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Just moving the folder should work. We don't use any specific paths in the editor, so everything should work no matter where the folder is. If you make sure that the GUIDs of the folders don't change then future updates should be correctly installed in the new location as well.
     
  43. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    If you still haven't received an answer then could you submit a new ticket? https://support.visualdesigncafe.com/hc/en-us/requests/new
    I can't find any email with your username in our support system, but it may be that your email has a different name. The release of Unity 2021.2 caused a bit of a backlog in support requests, but the response time is back to normal now.
     
  44. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    90
    Glad to see you're back in action! :)

    Any estimates on when NR2021 would possibly release?
    Would be very helpful in being able to set our development plans for the new few months based on what to expect - especially with the tree rendering, if that is planned or will be part of NR2021. We're looking into some high-speed tree renderers and our hopes were mostly leaning towards NR, depending on how it works when it's out.
    We don't like the alternatives, but more framerate is more framerate no matter how one gets it.
     
    Claytonious likes this.
  45. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    862
    Hi, I've met another editor crashing issue:
    I'm wrting my own scripts to add or delete detail prototypes from terrain data.
    I used terrainData.detailPrototypes {set; } to apply modified prototype list to my terrain.
    Then I met a strange issue:
    If I delete a prototype that is not at the end of the array, then try to set the array to an empty array(0 prototype) to the terrain data.
    Nature renderer will crash my unity editor.
    This can even happen if I manually delete the last remaining prototype through unity terrain's inspector (after I used my code to delete a not-last protoype)

    I'm sure it's caused by Nature Renderer beacause I tried to remove the component of nature renderer from unity terrain, and all operations won't causing any issue, the issue only happen when the modified terrain tile has NR on it.

    And another interesting fact is that, after the same operations on a terrain tile without NR, the editor will also crash when I try to add a NR component on this tile.

    I've tried to delete prototypes from the last of the array, then the editor will not crash after deleting the last one. It only crashes if I deleted a not-last element from the prototypes' array, then apply an empty array to the terrain data's detail prototypes. It also will not crash if I leave the last prototype in the data.
    Note that deleting detail prototypes through unity terrain's inspector will not cause crash no matter how I delete them, only when I used terrain data's detail prototypes setter, it will guarentee a crash.

    Any ideas?
     
  46. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    The current schedule is to have the first release in February with the most essential features. Then, we will continuously release new updates to cover all the new features that were added in Unity 2021.
    Tree rendering is the highest-priority feature right now, so I expect to have it in the first release. But if we run into any issues then it might get pushed back to the second release, which should be less than a month after.
     
    Bwacky likes this.
  47. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Could you share the code that you are using to remove the detail prototypes? It sounds like it might be caused by the first remove triggering a refresh in Nature Renderer, and then the second remove is done while Nature Renderer is refreshing, causing the memory to become corrupted. Nature Renderer has internal protections against this, but you may have found an exception.
    You can submit a support ticket if you prefer not to post the code publicly: https://support.visualdesigncafe.com/hc/en-us/requests/new
     
  48. DizzyWascal

    DizzyWascal

    Joined:
    Jul 16, 2015
    Posts:
    19
    Hello, just a question on wind sway for Grass Textures.

    I bought an asset that uses default unity terrain with full Grass Textures. Problem is I don't like the grass all swaying at the same time and not affected properly by wind.

    upload_2022-1-20_14-57-33.png

    6a76f6ffc63315840b0074f8d6e2c659.gif
    (All swaying hypnotically at the same time...)

    Will this asset make grass textures sway more realistically? or is it just for detail mesh objects only?
     
  49. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    709
    Yes, Nature Renderer will enable more realistic wind (swaying) for your grass. It works for both grass textures and detail meshes. You can download the free trial to see it in action: https://v2.visualdesigncafe.com/nature-renderer/#trial
    Just adding the Nature Renderer component to your terrain is enough to see it, everything is set up automatically.
     
  50. onefoxstudio

    onefoxstudio

    Joined:
    Sep 28, 2016
    Posts:
    173
    Hi !
    I know NR 2022 is coming pretty soon, I was just hoping to have a solution for this (On Unity 2021.x)
    It's pretty annoying (and slowing); is there already a dirty fix some how ?

    Thank you !
    Capture d’écran 2022-01-22 à 21.54.38.png