Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    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:
    599
    Yes, you can set the "Vertex Normal Strength" to 0. Doing so will force all normals to point up, resulting in flat shading. You may want to disable Specular Highlights as well if the grass is too shiny, but that depends on the style that you are going for.
    Edit: Normals should be set to "Same" as well.
     
  2. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    151
    Thanks for response, will try that for sure.

    Also another question, any rough eta for the trees rendering solution ? Sadly the converted trees do not work with GPUI so i am probably bound to Nature Renderer if i want to use ur shaders.
     
  3. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,808
    Thanks for the great tools @Visual-Design-Cafe But I have a couple of questions.
    1 - Is there any way to paint grass on a specific terrain layer? If not is this a planned feature?
    2 - There's quite a few things that aren't documented. Such as the Shaders - it says the grass is supposed to angle with the camera, doesn't appear to do anything :(. I am having a few other issues too, I did email you quite a few times yesterday LOL. But figured I'd reach out to here as I knew you were active here haha.
     
  4. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    1. This is available as a prototype, but it is not yet production-ready. It will be available in a future update.
    2. I'll get back to you by email in a few minutes. I am in a different time zone, so it was already night when I received the emails.
     
  5. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,470
    I have Vegetation Engine, and I wondering what the difference is between that and Nature Shaders - they seem very similar, although I think vegetation engine doesn't use dll.
     
  6. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    They both have mostly similar features, the main difference is how the features are implemented and the workflow. Here are the main differences:
    • Interaction
      Interaction in Nature Shaders uses Unity's regular colliders (sphere, box, mesh, etc.). This does not require any setup and allows you to use any shape. The interaction works out-of-the-box, including swaying of vegetation and trails.

      TVE uses custom images/elements for the interaction, which requires (a lot) more setup but it is also a bit more flexible if you need specific effects.

    • Converting/Importing
      Converting/Importing models and materials for Nature Shaders is as simple as right-clicking on a prefab and selecting Create > Nature Asset. We use a unique algorithm that analyzes the meshes and materials and automatically converts them. This works for most models, including SpeedTree, Megascans, and other Asset Store assets. There is no need to select specific import profiles or settings for different assets.

      TVE can convert prefabs/models as well, but requires specific conversion profiles for each asset. TVE currently comes with a lot of conversion profiles for most of the popular assets. It still requires manually selecting profiles though, and it is limited to the ones that are included.

    • Render Pipelines
      Nature Shaders works out-of-the-box with all render pipelines. There is no need to select specific shaders, or import/install render-pipeline-specific packages. You can also directly copy assets (prefabs/materials/shaders) between projects that have different render pipelines.

      With TVE you have to install a specific package for the current render pipeline. It also works, but it is a bit less flexible.

    • Shaders
      Nature Shaders is written in HLSL. This means that they are fully editable and carefully optimized.

      TVE uses Amplify Shader Editor. They are also editable (if you have Amplify), but they are not very well optimized since the code that is generated by Amplify Shader Editor can be a bit bloated. Support for new Unity versions and render pipelines also depends on whether or not Amplify updates their editor.

    • Other Features
      All the other features are roughly the same, just a different workflow. (different settings, property names, etc.)
    If you are not sure if Nature Shaders is a good option for you (or if you want to test the differences) then feel free to send an email to support@visualdesigncafe.com and I can send you a free evaluation version.
     
  7. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    964
    Hi, previously I asked about adding Instanced Indirect support to your shaders for use with Vegetation Studio Pro. You advised to follow the VSP guide, which I believe I did (it's been awhile so I'm not sure, but I got the trees to show up with instanced indirect enabled so I'm guessing I followed the guide).

    However, recently I upgraded my project and all the packages I have from you, and stupidly did not make a backup of the modified shaders or prefabs that were using them. So, everything is now using your ShaderX shaders.

    Is it still possible to modify these shaders to add support for Instanced Indirect? Or is that even necessary (I read you added support for Instanced Indirect in a previous update)? If it's not necessary to edit the shaders, how can I get Instanced Indirect working with your shaders and VSP?

    Thanks!
     
  8. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    964
    @Visual-Design-Cafe I just reread your previous post which said the shaders are editable. Please, can you provide some direction on how to get the shaders to work with VS Pro's Instanced Indirect feature? Do I need to edit one of the Lit shader files?
     
  9. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    964
    I have another issue. How do I import an asset not related to your tool without your tool automatically trying to convert it to whatever format your tool uses? I have Nature Shader installed and I like your shaders. But if I want to import separate shaders/materials from another developer in order to test out some things, I should be able to do that without issue.

    The idea that your tool just automatically intercepts the import process, and that I cannot even import the assets as is (because when I try, a separate import window shows up for Nature Shaders, and if I close that window the original assets aren't imported), is crazy to me.

    Overall, I find your products a little invasive. First it was the custom Package Manager that I have to close every time I open the Unity Editor, now I cannot even import a package from another developer. I get it, the intent is to make things easier for the developer. However, this process should not be automatic. Let us, the developer, choose to convert Materials or a folder of Materials at our command.
     
  10. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    @gilley033 I have replied to you by email. It sounds like there is a bug in the import process, only nature assets should be converted and all other assets should be ignored. If you can provide some more details then I'll be able to fix it.
     
  11. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    964
    Thank you; I apologize for coming across as a jaded customer, overall I love your products. I will respond back via email.
     
  12. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    152
    @Visual-Design-Cafe are you still provide support via zendesk? i didn't get any response in 48hours
     
  13. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    Support emails are a bit delayed due to the large amount of support requests lately. I should be able to respond by the end of the week.
     
  14. EyasSH

    EyasSH

    Joined:
    Aug 15, 2020
    Posts:
    15
    @Virtual-Design-Cafe I'm seeing white pixels flickering on trees in URP when HDR is turned on. Is this a known issue? 2020.3.
     
  15. alphabean11

    alphabean11

    Joined:
    Apr 18, 2019
    Posts:
    18
    @Virtual-Design-Cafe I want to make stylized grass with flat shading, and I’ve looked through the forum and have seen that you need to change the vertex normal and make the normals “same” but I am still getting some dark and some light.

    EDIT: I figured this out. I needed to change the shading in blender on the grass plane to flat.
     
    Last edited: Apr 2, 2021
  16. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,146
    Hi,
    I'm interested in Nature Shaders, but a little confused about Nature Renderer vs Nature Shaders. I believe that NS does not require NR, right? So what is the difference between them?

    thanks!
    Dave
     
  17. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    I have seen it happen before in URP, and it seems to be caused by the specular reflections + bloom. I am not sure yet if it is an issue with the shaders or with URP itself.
     
  18. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    Nature Shaders is a collection of shaders to add interaction, wind, and other shading options to your materials. It does not require Nature Renderer, and it works with any object.

    Nature Renderer is a rendering engine that can render large amounts of detail objects on terrains. It can be used with any shaders.

    The similarities are that Nature Renderer also includes a (more simple) version of Nature Shaders, called Nature Shaders Essentials, to provide some free out-of-the-box shaders to use together with Nature Renderer.
    You can compare the shader features here:
    https://www.visualdesigncafe.com/nature-shaders/comparison/
     
  19. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    152
    how to blend terrain color into grass with nature renderer & nature shader (like stylized-grass-shader did) ?
     
  20. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,146
    Thanks for the explanation above, that's very helpful. So I'm trying the Nature Renderer trial, but I'm confused by the performance: In the SampleScene, I enlarged the terrain to 1000x1000 meters and mass-planted 5000 trees (the same Tree Broadleaf XL1 that was already assigned to the sample terrain). On my PC with GTX 1060 GPU, I'm seeing 19ms on the CPU and 14ms on the GPU. I switched to some old tree creator trees, and get 5ms on CPU and 4ms on GPU. (Those trees are lower quality of course.) So I must be doing something wrong? But I'm just running the SampleScene in the trial package, the only change I made was increasing the terrain size and number of trees to something more typical.

    thx
    Dave
     
  21. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    This is not supported by default. You can use that Color Map Renderer from the Stylized Grass Shader and then use the rendered color map as texture for a Color Overlay. That should give roughly the same result. If you want perfectly accurate blending then you can make some small modifications to the shaders to achieve this. Let me know if you need any help with this.
     
  22. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    Trees are not supported yet by Nature Renderer, so they are still rendered by Unity and do not receive any performance boost. Only terrain details (grass and plants) are supported at the moment. I am working on support for trees for a future update.
     
  23. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,146
    Oh....so that tree uses a Nature Shaders shader, so I figured it was...you know, a Nature Shaders shader. :/ And the Nature Shaders demo has a tree in it, which has NS shaders as well. Hence my confusion. So I should use NR only for grass etc, and stick with Unity tree shaders for trees, despite how the trial is set up with NS shaders for trees?

    And that still seems like a huge performance hit for using NR/NS shaders....
     
    Last edited: Apr 7, 2021
  24. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    152
    is there a way to modify the shader ? seems you didn't ship the shader source file
     
  25. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    The shaders fully support trees and you can use the shaders for all vegetation.
    • Nature Renderer will render your grass and plants, no matter what shader you use. Although, Nature Shaders is recommended for best integration.
    • Nature Renderer will not render your trees. Instead, Unity will render them, no matter what shader you use. Again, Nature Shaders is recommended for trees as well. You just won't get the additional performance boost from Nature Renderer yet.
     
  26. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    The source code for the shaders is in the file "Assets/Visual Design Cafe/Nature Shaders/Templates/Nature Shader.templatex". You can find the blending with the overlay around line 703:
    nature-shaders-overlay-source-code.jpg

    The color is currently multiplied with the overlay. If you want to blend the colors into the terrain instead, then you probably want to assign the color directly:
    Code (CSharp):
    1. output.Albedo.rgb = overlay.rgb;
    Or change the color to the terrain color only towards the ground:
    Code (CSharp):
    1. output.Albedo.rgb = lerp(overlay.rgb, output.Albedo.rgb,input.texCoord0.y);
    (This example assumes that the UV layout is a simple square, which is the case for 2D detail objects)
     
    filod likes this.
  27. hepphep

    hepphep

    Joined:
    Feb 1, 2013
    Posts:
    21
    For some reason I get strange differences for foliage rendering between editor and build (windows). Even stranger things is that the issue may vary during the builds, so that in other builds it appears in different kind of coloring issue than on other. Here are couple of examples of situation, upper screenshot is always in editor and lower in build.

    It would seem like lighting gets sometimes messed up in the build for the shaders.

    I am currently using Nature Renderer with Nature Shaders pack.

    Unity version is 2020.1.17 + HDRP
     

    Attached Files:

  28. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,146
    Okay...but I'm still confused. As I described above, I saw a huge performance hit -- on both CPU and GPU -- with NR/NS shaders, compared to Unity Tree Creator trees. Is that expected? Or am I doing something wrong?
     
  29. alphabean11

    alphabean11

    Joined:
    Apr 18, 2019
    Posts:
    18
    After pushing changes through Unity collaborate, the grass doesn’t show up, only I am using it to make changes. Is there something I need to do to get it to show up on the other computers?
     
  30. Barritico

    Barritico

    Joined:
    Jun 9, 2017
    Posts:
    307
    :(
     
  31. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    152
    Bug like: Overlay texture are sampling twice in mirrored direction:
     

    Attached Files:

  32. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    157
    Hi,

    I have 2 questions :
    1/ I just need Nature Renderer NOT nature shaders, i'm still forced to import nature sahders and ShaderX folder to our project ?
    2/ Everytime i update Nature Renderer (via your Unity Script) Unity re-import all my project again. is this the expected behaviour ? (this happens on Unity 2020.1, 2020.2 and 2020.3 LTS)

    Thanks
     
  33. Loewi_f

    Loewi_f

    Joined:
    Nov 13, 2019
    Posts:
    30
    Same issue about Detail Distance. I know that LOD Group setting will override detail distance setting of NatureRenderer component,but there is no LOG Group for my grass detail prefab but only a mesh renderer.Changing detail distance still doesn't work,either in Editor mode or in Runtime mode.I check the documention but find no resolution.What should I do for this?
    Unity: 2020.3.2f, HDRP 10.4.0,
    Nature Rednerer 1.4.4
     
  34. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    It depends a lot on the trees and shaders that you are comparing. In general, Nature Shaders has more features and better lighting, which in turn is also a bit slower to render. If you compare the shaders directly without changing any settings then it is possible that Nature Shaders has lower performance. There are quality settings in the shaders that you can use to improve performance.
    This performance impact is all on the GPU, but Unity tends to show this as CPU time as well. This is because the CPU is waiting on the GPU to finish rendering before it continues with the next frame. This waiting time is displayed as CPU time, even if the CPU is not doing anything except waiting.
     
  35. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    1. Nature Renderer uses Nature Shaders by default for 2D Grass Textures, so it has some direct references to Nature Shaders and ShaderX in the code, which is why they are imported. You don't have to use Nature Shaders and you can delete all the shader assets from your project, but the plugins need to be kept in the project so that all the code compiles correctly.
    2. That should not happen. Do all your assets get re-imported or only materials? There is a small upgrade script in Nature Renderer that updates materials that use Nature Shaders, in case something changed in the new update. However, this should only affect materials that use Nature Shaders, it should not affect any other assets.
     
    amynox likes this.
  36. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    Can you let me know which shaders you are using for the detail objects? Some shaders have their own culling code that limit the render distance.
    Another thing to check is the import settings of the textures. Can you select the textures and enable "Mip Maps Preserve Coverage" in the import settings? It is possible that your textures are being faded out due to mipmapping.
     
  37. Loewi_f

    Loewi_f

    Joined:
    Nov 13, 2019
    Posts:
    30
    I use default grass shader " HDRP/Nature Shaders/Grass ". This is the first time that I know about fade out distance of shader property setting. It seems that Nature Renderer doesn't override distance even this is toggled on,but only Start Distance of shader property works.
    upload_2021-4-15_20-24-22.png
     
  38. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    It looks like you are using an old version of Nature Shaders. Can you go to "Window > Package Manager (Visual Design Cafe)" in the top menu in Unity and download the latest updates? That will most likely fix the issue.
     
  39. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    157
    Hi @Visual-Design-Cafe ,

    After upgrading to Unity 2020.3.4f1 LTS (URP 10) and last version of NR on store i'm starting getting huge spike every time a new terrain chunk is loaded (i'm streaming my terrains based on player position).

    NR is allocating 7Mb of memory in ONE single frame and this happens everytime a new terrain chunk is loaded ! :




    My terrains is 50x50 with minimum resolution size:





    Here is how my NR setup look like :




    Any idea of what can cause this ? Bug ?
    Thanks
     
    Last edited: Apr 15, 2021
  40. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    157
    Any help on this please ?
     
  41. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    It is expected to have a bit of a spike when loading a new terrain because the terrain data (heightmap, detail maps, etc.) need to be loaded into memory. The total memory depends on the size and resolution of the terrain. I am working on improved streaming behavior for the next update to reduce the spikes, but it will always have a bit of a memory impact.

    Is there any specific reason for having terrains of 50x50 in size? It is quite a bit smaller than most terrains, and the detail/heightmap resolutions are quite high compared to the terrain size. This is one of the reasons why the spike is so large. I recommend to reduce the Detail Resolution and Heightmap resolution if you can.

    If you need more details then I can help you after the weekend.
     
  42. LeeKaigan

    LeeKaigan

    Joined:
    Jan 24, 2019
    Posts:
    4
    Unity 2020.3.1f1 HDRP

    Painting details show error "The current render pipeline does not support Detail shaders" on the trial version. The details still work but is there a way to remove the error?
     
  43. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    Unity automatically shows this error and it is (unfortunately) not possible to remove. It is harmless though and the error can be ignored.
    There is more information in this article: https://support.visualdesigncafe.com/hc/en-us/articles/900005853626
     
  44. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    250
    Hi,

    In order to use the benefits of what comes with URP 11, it looks like I would have to upgrade my project to unity 2021. If I'm not mistaken, nature renderer won't work with 2021 yet?

    Thank you!
     
  45. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    Unity 2021 should work fine, there are no major compatibility issues but I have not yet tested every specific feature.
     
  46. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    17
    Is there any progress or a potential release window when NR will support tree rendering?
     
  47. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    148
    Hi nature renderer isn't working on Android ( power vr gpu open gl es 3.2 ) URP template unity 2019.4. Where it is working on other device I tested for example Android 512 gpu with same scene and settings. I'm thinking of switching back to standard pipeline maybe it will solve the issue for powervr devices. Thank you

    [Edited] Hi I made new project with standard pipeline unity 2019.4 build platform Android 10 Mediatek Helio p90 powerVR rogue GM9446 gpu and using vulkan api with deferred rendering. This time I was able to get trees to show on my standard unity terrain but not able to show the grass details on terrain in build(actual device) where everything seems to work fine in editor open gl es 3.0 emulation. Any suggestions? Also everything works smoothly using Qualcomm devices but with Mediatek(powerVR gpu ) it not working. Thank you
     
    Last edited: Apr 26, 2021
  48. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    78
    --nvm.
     
    Last edited: Apr 29, 2021
  49. Visual-Design-Cafe

    Visual-Design-Cafe

    Joined:
    May 23, 2015
    Posts:
    599
    There is most likely an issue with Unity's graphics API for instancing on that specific hardware. Can you try disabling Procedural Instancing in the Nature Renderer component to see if that works? I have also received another report that Unity's Graphics API is not working on some hardware (for GPU instancing in specific).
     
    mukki014 likes this.
  50. mukki014

    mukki014

    Joined:
    Jul 30, 2017
    Posts:
    148
    Thank you sir. I will give it another try. And let you know the results. Because I'm also surprised that I've two devices one is less powerful (adreno) than other (powerVr) but still less powerful one is working perfect and other don't. Thank you sir once again. I will let you know.
     
unityunity