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.
Discussion in 'Assets and Asset Store' started by StaggartCreations, Jan 5, 2020.
Documentation | Asset Store | Roadmap
This thread is intended as a platform for questions or asset support. Posted ahead so I can include the link in the documentation.
Actual package will go live in a few days
Looks amazing! Will check it out in a few days when its live
Package is now live! https://www.assetstore.unity3d.com/#!/content/143830
If anyone is familiar with the package, please consider leaving a review. This'll go a long way and will be highly appreciated
I've publicized my Trello board: https://trello.com/b/LhyoTXga/stylized-grass-shader
Layer system for benders (controls which benders draw on top)
Shader Graph nodes (allows usage of many of the features in a custom shader)
Color map sampling
Color map rendering from mesh terrains (probably already works, but wasn't tested)
Mask wind tint in shadows (it represents a sun light sheen, so this is better suited)
Custom color map texture (eg, terrain lightmap or exported from external terrain tools)
Scale grass based on terrain textures (creating the necessary data is rather complex, at least in a fast way)
LOD crossfading (code is already there, but crossfading seems bugged in the URP at the moment)
will be support mobile in furture?
It's currently not advertised as supported since it hasn't been tested on Android/iOS, but it could work. But mobile support is outside of the scope for the time being.
when i import the asset, using the Universal Render Pipeline, should i enabled SRP Batching ?
Not necessarily, the shader supports SRP Batching in case you choose to use it for your project entirely. It's mostly beneficial if you use many different materials but with the same shader.
Been waiting for this for some time, very excited to try it!
It looks absolutely fantastic.
Is Vegetation Studio needed to get good performance or will it work well without it?
Vegetation Studio isn't necessarily required, but a GPU Instancing system will yield the best performance at large scales. This could be Vegetation Studio, Nature Renderer, GPU Instancer, or any custom systems. The documentation has a section which outlines several methods for placing/rendering grass: http://staggart.xyz/unity/stylized-grass-shader/sgs-docs/?section=placing-grass
we are using this asset in our current project and we are very happy with it. However, there is some feedback that might increase usability and compatibility with Nature Renderer in some scenarios.
Mostly, when using the shader as a grass replacement shader in Nature Renderer, the textures the grass was painted with in the Unity Terrain is not used (the texture in the replacement material is used). This makes unworkable the workflow of painting grass using the Unity Terrain system and overriding it with Nature Renderer. Right now NR's override is slower than using grass detail meshes, so it's not a big deal until NR improves non-mesh grass performance (we are using grass detail meshes) but having the shader work as a grass override shader would be beneficial long term, we think.
Thanks for the tip! I checked out NR's "Billboard Grass Material" and it appears that the billboard mesh that's generated isn't going to work with the shader. Namely because there are no vertex colors, and the normals aren't pointing up. These are vital for the shading and animations to look correct.
I don't know if Nature Renderer is creating these meshes, or the Unity terrain is. In case of the latter that's unfortunately a show stopper, as nothing could be changed about that. But I'll reach out to the author to touch base
Submitted version 1.0.1
- Grass Renderer component now has a WindZone field. When enabled, ambient and gust strength are influenced by its "Main" value
- Wind tint is now masked by shadows
- Translucency effect now fades out when Directional Light approaches to the horizon
- Shader UI will show warnings about reflection settings when incompatible scene lighting settings are used
- Tiling/Offset values for normal map had no effect
- Color map rendering from mesh terrains can now automatically calculate the correct render area size
Next update will focus on adding Shader Graph nodes, and the sorting layer option for grass benders. I'll be traveling next week, so I'll only be able to get back to any messages once I'm back.
Hey @StaggartCreations, sorry for the delay but I finally put up a review (5 stars of course). I'm been extremely happy with the asset and am excited for any additional features (layered benders being the most).
I was really happy to see separate flatten/push options, and the distance fading is GREATLY appreciated! Thanks again for such a well-thought out package!
Nature Renderer is creating the meshes for those! Your grass looks great and I'd be more than happy to make an integration for Nature Renderer so that the meshes are created correctly for your grass shader. Could you send me a PM or email (firstname.lastname@example.org) with details on what data your shader requires?
Hi, I'm actually using my own custom meshes with the shader, and the only adjustment was to make sure all normals faced straight up.
Thank you for your candid review, it is very much appreciated!
That's a relief! Happy to hear you're willing to add an integration, I'll be in touch and send you the package with the necessary details.
Since URP 7.2.0 was released some of the behavior around shadow cascades was changed. Currently, the grass will show a dark line at the cascade edges. I'll need to investigate how to correct this.
I'm a little strapped for time due to GDC coming up, but I'm aiming to update the package by the end of the month.
Is that cascade thing a reported bug? I'm getting that as well with 7.2.0.
Not that I'm aware of, it should only affect custom shaders. Turns out coordinates for the shadows now have to be calculated per-pixel when shadow cascades are used. Previously this could be done on a per-vertex basis.
PS: Fix is now live on the asset store
Just upgraded to the latest version on the asset store and got this error in the Console:
Assets\Stylized Grass Shader\Scripts\DrawGrassBenders.cs(20,21): error CS0246: The type or namespace name 'ProfilingSampler' could not be found (are you missing a using directive or an assembly reference?)
Upgrading to 2019.3.1f1 now to see if that makes any difference.
The ProfilingSampler class is something that was introduced in the URP 7.2.0, which is now the minimum required version.
You can update the UniversalRP package through the Package Manager window which will clear the error. If you do not see version 7.2.0, you can click the arrow left of the package which will show all available versions.
Ah I see, thanks!
I can't make 7.2.0 show up in the package manager, but I'll do some research to find out why that is the case.
It may be hidden for some reason, it should appear in Unity 2019.3.0f6
In any event, you can edit your projects manifest.json file and replace
Thanks for the help, I realized my manifest was using a custom staging server with Unity for some reason. Removed that line in the manifest and it recognized 7.2.0.
I seem to have made a mistake in last update, the Stylized Grass Renderer component will show an error about the URP not being installed, even when that's the case. If this blocking anyone's progress, you can change line 60 in the StylizedGrassRendererInspector.cs file from #if URP to #if !URP. Version 1.0.3 has already been submitted with this fix and will hopefully be approved soon.
With this version, translucency rendering has also been improved.
The sun light color is now applied through overlay blending, rather than directly. A white directional light on green grass results in a yellow-ish tint, as expected.
Plugin works great now, but just wanted to let you know that the AlienGrass and GrassTall prefabs are missing their materials.
Apparently updates aren't reviewed by the asset store team until next week, if anyone wishes to use the updated version, DM me with your invoice number and send a download link.
Changelog for v1.0.3
- Dialog will now pop up when a URP version older than 7.2.0 is installed, with the option to update it
- Translucency color is now mixed with grass color through overlay blending, instead of directly using the sun color.
A white directional light on green grass results in a yellow-ish tint, as expected.
- Renderer component incorrectly displaying an error regarding URP installation
- Added missing materials for Alien and Tall grass prefabs
- Grass bending render area being flipped (Occurs since URP 7.2.0)
- Error on MacOS when using OpenGL regarding unsupported render texture format
v1.0.4 will add a sorting layer option for grass benders along with support for grass benders using a particle system in world-space simulation.
Hey @StaggartCreations, I'm having some issues.
As the asset is imported, I get this message.
However, I already have URP installed.
I run Unity 2019.3.05f
I think I missing most of the asset capabilities due to this problem.
I already tried to click OK in the pop up message but the new installation produces errors.
The dialog pops up if a version older than URP 7.2.0 is installed, this is the minimum supported version and is available starting from Unity 2019.3.0f6. In a future update (pending review) the dialog also mentions this version, for clarity. Updating to 2019.3.0f6 and URP 7.2.0 will unlock all functionality
Now it works perfectly! Thanks. Loved the asset. Gave you 5/5.
Just one more thing. Is there any way to erase the bottom hard edges of the grass? Either by fading the base or by melting it with the color of the ground.
Just like this.
Besides, is there any way to terrain paint grass (with unity tool) tangential to inclined surfaces?
Awesome, appreciate the review!
Alpha fading is technically not possible, as grass would not longer receive/cast shadows and would suffer from sorting issues and overdraw.
Though the grass can blend with the underlying surface through the color map feature, you can find the details here. Currently there is no control over the blending distance. But I'll add a "height" parameter so only the base of the grass can blend with the terrain color.
The Unity terrain vegetation system doesn't support aligning grass to the terrain, which is a sore miss.
Hello there, quick questions,
- Between Nature Renderer and Vegetation Studio, which one has the best performance? I did some messy tests and vegetation studio has more fps but, as they work slightly differently I'm not sure if I’m right with my test.
- Also I have some issue to make the grass bend using Vegetation Studio or Nature Renderer. I put the grass renderer script and made a basic sphere mesh bending following your documentation. Is this feature only available through game object? I know you’re currently working on Nature Renderer compatibility update, will it include bending?
- Last but not least, where can I find the cute and humble rocks you have in your screenshots ?
Thanks for answer, have a good day!
I never ran the numbers, but both systems are built on the same principles: cell-based instanced rendering. They're built by different people, so one is arguably faster than the other in the same scenario. VS does have a leg up with its instanced indirect rendering, which allows more than 1023 items to be rendered in one batch.
The bending is performed no matter what method you use for rendering the grass, so will work with both systems. Though this only occurs in the render area, as represented by the white box, any grass benders outside of it will not take effect. You can use the "Follow target" field on the Stylized Grass Renderer component to have the area follow your player or game camera so that bending always applies to the area you're looking at.
As for the rocks, they're something I made several years ago, I have little attachment to them, so you can grab them here if you like: https://1drv.ms/u/s!AlkpXXlKu-02jrE2zzXDOf8bA7fEuQ?e=dXAw8h
I appreciate how fast you answered!
Got it for VS, for now I will use it but sure both tools are excellent.
For the bending, I should have forgotten a step because I got the sphere inside the white box. I'm going to double check and read the documentation again thanks.
(link not working btw)
If you can't get it to work, feel free to shoot me a message.
Updated the link, apparently public access had expired
I started using the stylized grass shader in my project. I'm happy with it so far, but I have one problem.
When I render Color Map from my terrain to get nice grass blending and my terrain is moved somewhere to the side (not in (0,0,0) ), the color map is beaing applied incorrectly. If I understand correctly, the color map is being projected in the center of the world and then it's tiled.
Is there any way to make it work with terrain object moved?
Quick example below:
The coordinates are being calculated and saved whenever the color map is rendered. If you have the terrain afterwards, it has to be re-rendered to take the new position into account. Moving it around at runtime is not supported.
Though if you mean it render incorrectly is the terrain is not centered then that's something I'll have to correct!
Hello. I purchased this asset and works great. However, unity decided to change cascades, as mentioned earlier, and my project's shadows are broken. I'm waiting for a patch because I have no idea how to patch Unity myself. Do you happen to have the earlier version for 7.1.8? I have 2000+ hours on this project and would really appreciate it if you could help me out as this is the only asset that requires the URP 7.2.0 to work, and I've been trying to find a way to solve the cascades but I just can't.
Thanks for the answer. Yep, I had this problem even if I moved my terrain before rendering Color Map :/ Rendered map looks correct, but then it's being projected on the grass in the center of the scene, not in the center of the terrain.
Shadow cascades shouldn't break when updating to URP 7.2.0 since all the URP shaders are updated to support this. Custom shaders (outside of Shader Graph) need to be modified to support this, the required changes are outlined here.
If you want to stay on 7.1.8 that's perfectly fine as well! You'll actually need version 1.0.0 of the grass shader for this, if you could DM me your invoice number, I'll forward a download link.
I see, this should be a relatively easy fix. The package is being updated soon, so I'll be sure to include this contingency. Thanks for pointing it out, would probably have gone unnoticed otherwise!
Submitted v1.0.4. Change log:
URP version requirement: 7.2.0+
- Sorting layer to Grass Bender component. Higher layers are drawn over lower layers. Can be used to control which benders should overwrite other benders.
- Particle trail prefab, as an alternative to using a grass bender with a trail renderer.
- Color map height parameter, allows the color map to only take effect at the root of a grass mesh
- Grass benders using a particle system in World simulation space are now supported
- Grass benders outside of the render area are no longer processed
- URP installation dialog not having any effect due to changes in the Package Manager
- Color map not rendering correctly if terrains were moved away from the world origin
- (Preemptive fix) Grass bending render area being flipped in URP 8.0.1+ (Apparently was a mistake in 7.2.0)
Thank you so much! I'll send you the invoice by DM rn! My issue with shadows is actually something they're trying to fix right now. It's a glitch on their own Unity shaders. They just released a PR for it:
Hey there great Grass so far,
I have two problems:
1. when I want to use the ColormapRenderer as described here1 there is no colormap available and also the new button is not here. How do I create one?
2. when I have shadows on the shader activated it looks like theres flickering shadows appearing and disappearing all over the field. Its very annoying. It is destroying the calm visal appearing. is there something I can do about it? I think it has something to do about the grassobjects putting shadows on their neighbours.
Already replied to your email I'll submit an update tomorrow that fixes your first point.
2: Is this using Nature Renderer by any chance? There's an issue when Distance Fading is enabled when using NR. I've discussed this with the author, but it apparently comes down to a bug in the URP. I recall seeing a related fix for this on GitHub, but I couldn't find it just now. For now, the only workaround is to disable the Distance Fading feature.
Submitted version 1.0.5. Changelog:
Minimum required URP version: 7.2.0. URP 7.3.1 compatibility verified.
Note: Color maps have to be re-rendered in order to update their information to a new format!
- Color map textures are now compressed, resulting in substantial memory saving.
- Errors thrown on the ColorMapRenderer component when no ColorMap asset was assigned
- Bending render area being flipped in URP 7.3.1 (Make up your mind, Unity!)
Is there any way to get this working with URP 7.1.8 ?? There is a shadow bug in 7.2.0 so this grass asset looks great, but everything else in my project is broken. So I can't use this asset until every other asset is updated.
In the future can assets like this stick to "verified" packages only? Unity is breaking too much so being on the cutting edge isn't a viable solution for devs.
Sadly there's no point is this asset looking amazing, if it can't be used in 95% of projects.
I understand your stance completely. SRP versions and asset store package has been a recurring pain point for some time now, and unfortunately there's no "right" way of approaching this. Everyone does what they think is best, and this causes fragmentation. So I'll always be marking the minimum supported version on the store page and changelog.
URP 7.2.0 was an important version, since it introduced support for custom post processing, though broke the use of shadow cascades. This was fixed, and therefore made 7.2.0 the minimum required version. Honestly don't know what I'll do when Deferred rendering comes in 2020.2. Either can't support it at all, or forced to make the minimum required version 2020.2 ¯\_(ツ)_/¯
To use 7.1.8 you'll need an older version of the package. If you DM me your invoice number, I'll send you a download link. Fortunately, by now I've figured out how to do version-specific shader code, so in the future this asset will support a wider range of versions, until no longer possible.
Thank you @StaggartCreations !! I just re-read my previous post and I hope it didn't sound like I was coming down on this asset or you. I actually love the grass shader (that's why I was mostly upset with the whole URP situation). I will send you my invoice because I'll be happy with the older package until the pipeline stuff settles down a bit.