A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'Assets and Asset Store' started by Visual-Design-Cafe, Oct 3, 2019.
this. is it being worked on? would be great to have better performing trees.
Hi Sir thank you. The solution provided has worked really well. Would you recommend your nature shader pack/nature shader essential for trees and grass on mobile ? I would like to have performance with minimal quality. Personally I think if I use your nature shader essential for all vegetation and tree it will perform better due to gpu instancing. What would you suggest? Thank you once again.
is there a video tutorial how to change the material in hdrp ?
As far as I know. First create a new project with HDRP template. Or import in a project (HDRP pre installed) in your project. Then import nature renderer and it will import the suitable package for your project (SRP) afterwards you can change the material property to your needs.
when i doing your suggestion above in HDRP version nature shader.templatex, it give me an error (things are fine in URP):
Shader error in 'HDRP/Nature Shaders/Grass': Fragment program 'frag': Unrecognized sampler 'sampler_albedo' - does not match any texture and is not a recognized inline name (should contain filter and wrap modes).
at line 2306 (on d3d11)
got a problem with procedural instancing on the newest version. When it's on and I'm getting my game or scene view cameras close to the vegetation prefabs, they disappear. With procedural instancing off, they work like a charm. It was fine in the previous versions.
Any fixes or ideas?
Hi friends! Trying to use Procedural Instancing but for some reason, my AO becomes visible through the grass. Any idea what causes it?
@Visual-Design-Cafe Hi sir will nature renderer work with Unity 2018.3? I'm tired of bugs and freezing issues in Unity 2019.4. so I'm gonna re Port my project to Unity 2018.3. Thank you
Do we need to enable something particular on the bark shader to make them receive HDRP decals?
Thanks in advance!
Hi, I am using Nature Renderer to render grass on terrain. 2021.1f9 HDRP11. I have 2 issues
1) When TAA is on, the grass, and the trees (both nature shaders) go super blurry as if motion vectors are not kicking in.
2) When Nature Collider component is used to interact with grass, if the collider is below the terrain (let's say 10m below terrain, the collider will drag grass below terrain.)
The lowest supported version is Unity 2018.4. However, Unity will stop support for 2018.4 soon, so the minimum supported version will change to 2019.4 in the next few months.
Decals are not supported by the shaders at the moment. This is something that is planned for a future update. I am still looking into this, as there is absolutely no official documentation for HDRP from Unity and no information on how these systems work.
Hey bud, any idea on my issues?
1. TAA is not supported at the moment. Calculating accurate motion vectors would require computing the wind twice (which has a huge impact on performance), and the movement data for the interaction can't be calculated between frames. I am still looking into possible workarounds for this.
2. I looked into this for you. The interaction is currently not limited by the ground level, so it gets pushed below the ground (I did not think about underground areas when making this). I have fixed this for the next update so that the vegetation can never go below the ground. If you would like to give it a try before the update is released then please send me an email at firstname.lastname@example.org and I can send you the updated version.
Sorry to bug, but any ideas why, when using procedural instancing, my grass disappears when the camera gets close?
It only broke after updating to the newest version and I can't figure out a fix.
Thanks for 2) much appreciated.
As for 1) I think first step is to provide a global toggle (maybe on the wind controller) to either enable/disable motion vector support as this renders grass and taa coexisting impossible - also taa isn't going anywhere so yep.
Then I think for second step, we might provide an option to bake motion vector (if this is possible?)
Either way, we really need motion vector support. Even if it is for nearby vegetation or something. I end up disabling/minimizing wind because of this as tree sway gets really bad.
Hi, The asset is great.
I would like to know how to import/convert the AZURE nature asset, if it's possible/compatible. What is the best way?
Thanks in advance for any advise.
Also, in case you are not aware, the new upcoming DLSS is also motion vector dependant, which means if Nature Renderer doesn't support Motion Vectors, it will leave NR not compatible with both TAA and DLSS, which will make Nature Renderer not the best looking nor functioning vegetation renderer anymore. I can't imagine the cost for generating Motion Vectors particularly higher than any other solution, so as long as it is implemented well it should be good enough.
For example, if we can choose "motion vector enabled" per shader (if that is possible) then, I could enable it for larger objects like bushes and trees that are very noticeable, and maybe some distance based approach so that upclose grass when it is moving due to wind or interaction, the smudging effect is minimized.
Another option I can think of, is to prebake motion vectors to a texture and play a fixed animation - if that is even possible.
Either way, I really hope you implement it. I am using NR because it is pretty much the only solution but if it fails to work with DLSS and TAA, I am forced to use something else...
Hi, thanks for this great asset!
I use NR in a URP project and I have a question regarding wind swaying. My trees have 2 materials, bark and leaves. To synchronize the movement of both, they have to use exactly the same wind settings, but this means that the trunk sways as much as the leaves, which looks unnatural.
My question is: Is there a setting to tell nature renderer at which height the swaying should start, so the trunk remains still?
I am currently looking into supporting motion vectors and I already have basic support working. Full support should be available in the next update. You can toggle motion vectors on/off per material.
The amount of wind movement is usually baked into the vertex data so that you can have precise control. Can you let me know how you set up the tree and what the material settings are?
You are awesome!
Sorry for getting back a bit late. The tree is made of two meshes: The trunk and the branches.
The trunk material: URP/Nature Shaders/Tree Bark
The branches material: URP/Nature Shaders/Tree Leaves
Both use the settings below and on both I choose the global scene wind, which uses the 'calm' preset. I make sure the wind settings are the same but both meshes are still out of sync.
how can I go about reducing the memory consumption of this perlin noise that is used? It is taking far to much memory in my project.
I am also not using any of the included shaders, just custom shaders which have been patched.
Hello there, I think I found another bug.
HDRP 11, 2021.1f12
I get a strange grid of grass facing sideways underneath terrain. This wasn't present a few NR builds ago so I am guessing this is a recent change, but is it possible that this is caused by a new bug in recent NR patch?
Here is an explanation of my below captured image.
1&2 img: shows a grid of sideways grass below terrain.
3&4 img: shows the top line of the grid of grass from above terrain. It looks darker as it is facing sideways at a hard angle.
Any idea about what is going on?
Just found out that it is 1.4.6 Nature Renderer that causes this issue. I went to my back up where it still had 1.4.5 and it was still fine. Then I installed 1.4.6 which made the bugs to come back, then I removed 1.4.6 and reinstalled 1.4.5 and it disappeared.
I think at this point it is very likely that there is a line or two wrong in 1.4.6.
Kindly look into it and fix it.
I am also having an issue with Nature Renderer generating a massive spike on the GC.
Currently making the asset totally unusable for me as that garbage is never unloaded & accounts for nearly half the current memory usage I have on iOS.
Any ideas for this? Its holding me up, wish I could at least try to check out the source while waiting for a reply.
I'm trying to use NR with some procedurally placed tree prefabs, but it seems that it's not working. Atleast the performance seems to be the same with and without NR.
I'm using MTree addon to generate the trees which are then saved as prefabs. That creates LODs and nothing else special. I'm using the free Nature Shaders that came with NR. Those seem to be working correctly.
And I'm placing the trees on the terrain properly - using TreeInstances to place the tree prefabs.
Does NR not work with this or am I doing something wrong?
Also, toggling the 'Draw' checkbox in NR settings should show/hide whatever details (trees, grass) are on the terrain, right? It's not doing that either, edit or play mode. That goes for the rest of the settings as well.
It can happen if the two meshes have a different pivot, or if the data for the tree has not been baked.
For the best results, it is recommended to bake the vertex data for the trees, this data is needed to determine where branches start and end:
You can do this by creating trees with Unity's Tree Creator, or by creating a Nature Asset (if you own Nature Shaders).
If you can't bake the data then you can get a close approximation by setting the Tree Height and Tree Radius to the same values for both meshes/materials. However, there is no way to accurately get the start/end of branches with this method so they may not always be connected or in sync. (This is a technical limitation, so it is not something that can be fixed)
Version 1.4.6 has an internal change and streams in the terrain data on-demand when moving around the terrain. This is done in squares. Based on the screenshot it looks like one row on the edge of a square did not get its terrain data loaded in, so the grass is spawned as if the height of the terrain is 0. Can you let me know the exact terrain size and detail resolution that you are using? It is most likely caused by a rounding error, but I'll need to know the exact values to reproduce this.
Thanks for the solid advice. I'm happy this has nothing to do with this asset!
I have a specific question, couldn't find any details about this in the documentation. If I understand it correctly, NR uses instanced rendering, so there must be a list of instances/matrices somewhere. Is it possible to manually add instances through an API?
Specifically, we'd like to place grass on rocks/cliffs, but details can only be placed on the terrain surface traditionally. We could potentially inject these vegetation items at runtime, and let NR do its thing.
The instances are loaded at runtime while moving around the terrain, and the buffers are dynamically batched to reduce the number of draw calls, so editing the buffers directly is not recommended. Instead, there is an unofficial API that you can use to process the instances after they have been spawned. That should allow you to change the position of the instances to place them on top of a rock instead of on the terrain surface. I'll send you the details in a DM in a moment.
My terrain settings as requested. Hope this helps!
FYI, on HDRP12, 2021.2b4, nature renderer works just fine but throws 100 errors "Unexpected Node Type..."
Maybe you can make this your first step towards HDRP12 support. Functionality wise, it works just fine.
Updated Unity from 2021.1 to 2021.2b5, and I am getting the message.
Looks like there are some breaking changes with Unity URP?
Shader error in 'Universal Render Pipeline/Nature Shaders/Tree Bark': 'UniversalFragmentBlinnPhong': no matching 6 parameter function at line 1943 (on metal)
Compiling Fragment program with _ADDITIONAL_LIGHTS _COLOR_TINT _WIND _LIGHTING_QUALITY_LOW _SURFACE_MAP_OFF _NORMALMAP
Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_DESKTOP UNITY_LIGHTMAP_DLDR_ENCODING
Disabled keywords: LOD_FADE_CROSSFADE LIGHTMAP_ON DIRLIGHTMAP_COMBINED _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_OFF _ADDITIONAL_LIGHT_SHADOWS _SHADOWS_SOFT _MIXED_LIGHTING_SUBTRACTIVE INSTANCING_ON PROCEDURAL_INSTANCING_ON FOG_LINEAR FOG_EXP FOG_EXP2 _COLOR_HSL _BAKED_MESH_DATA _WIND_OFF _LIGHTING_QUALITY_HIGH _SURFACE_MAP_PACKED _SURFACE_MAP_METALLIC_GLOSS _ALPHATEST _SPECULARHIGHLIGHTS_OFF _EMISSION UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30 UNITY_UNIFIED_SHADER_PRECISION_MODEL
Hello. I want to globally enable or disable wind and interaction, so that I disable it in runtime on devices running at lower Quality Settings, but did not find an API in the nature renderer component, to avoid switching on a per material basis.
Any help would be appreciated.
You can find the API for the quality settings here: https://support.visualdesigncafe.com/hc/en-us/articles/900003679346-Quality-Settings
For the wind, you can set the wind strength in the Global Wind component to 0 to disable it:
var wind = VisualDesignCafe.Nature.GlobalWind.Instance;
wind.Settings.WindStrength = 0f;
wind.Settings.Turbulence = 0f;
Thank you for reporting this. Beta versions of Unity are not supported, so I won't have an official fix for this until Unity 2021.2 is out of beta. I recommend sticking with Unity 2021.1 for now, or you can set the "Lighting Quality" of the material to "High" to avoid this error. (it only happens with "Low" lighting quality)
If the grass wind is handled by a custom shader, which also has support for NR procedural instancing (as part of grass's custom shader), will motion vectors work fine when using nature renderer & procedural instancing for rendering?
One more question reg Interaction and performance:
We want our game Character to walk through a grass field interact with it as he moves. Is the performance affected by the fact that the grass field is scattered throughout the terrain, or just affected by the area around the Nature Collider? For example, if the Accuracy is 5f, does it only affect the grass that if f pixels around my character? Or is there a considerable overhead for the rest of the unaffected grass? I also see an undocumented Quality Setting called
VisualDesignCafe.Nature.QualitySettings.Interaction.TrailPopupSpeed. What does it do?
One last question, @Visual-Design-Cafe . Have you considered adding interaction to Trees as you do with plants and Grass? In our game we want giant monsters to come attack and be able (only them) to sway/bend trees. We had a setup for this using The Vegetation Engine, but would rather have a single vegetation system in place, but the Tree Bark and Tree Leaves do not support interaction.
Thanks in advace!!
Will trees be supported anytime soon? They've been coming -soon- for a long time
I'm trying to edit the render distance at runtime, but since the API is almost not documented at all, I'm not sure what the proper way to do it is, so I tried that :
renderer.DetailDistance = 120;
renderer.ReduceDensityDistance = new Vector2(85, 120);
It doesn't seem to work, so my solution was to add:
It does what I expect, but I just wanted to make sure that this was the right way of doing it.
Thank you, stellar asset apart from that
Hi, I'm getting strange lighting on instanced geometry : the grass clump on the left is instanced, whereas the one on the right is the original prefab. As you can see, the lighting is vastly different, is there any reason why this could happen ? It's really breaking my project right now, because in dark areas the grass appears to glow.
Thank you !
Hey I just upgraded from 2019LTS to 2020.3LTS and I'm having an issue with Nature Renderer. I did not port anything over from my previous project so it's all a fresh download/install through the package manager.
The problem is mostly with trees from the package but also a bit with some of the grass mesh details. When I place a tree on the terrain using the terrain tools themselves (so instanced I believe) the trees shot up just white with the leaves having no alpha clipping.
When I place a tree prefab in the scene manually I get mostly the same thing. I've changed the materials on the trees to "Optimized Leaves" and "Optimized Bark" and they look better but the issue is still there mostly.
I've attached a screen shot of the trees. The selected one in the inspector is the manually placed and the complete white one is instanced on the terrain.
Any insight on how to fix this would be great. Thank You.
Mind-blowingly easy to use and so pretty and performant
I remember reading that local wind zones affecting vegetation would be supported at a later date. Are there any news on that? Our game would benefit greatly from this. I guess I can kind of fake it by spawning a collider and using the interaction-system, for something like a strong wind blowing outwards from the avatar, but that would probably only work for strong wind effects.
Motion Vectors are calculated in the shader, so the custom shader would have to implement its own motion vector calculations. The motion vector pass is not always rendered by Unity though, and I am not sure if it is a bug in Unity or not, so it may not always work in every render pipeline.
No, the performance is not affected. The interaction calculations are only done for the area around the camera. The area that is affected is calculated as Resolution/Accuracy. Resolution is the total resolution of the internal buffer (1024 by default), Accuracy is the number of pixels that are used per unit (5 by default).
TrailPopupSpeed is the speed at which the grass pops up after a trail if a nature collider has the "trail" enabled.