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 larsbertram1, Sep 11, 2017.
Is there a tutorial how to add my new grass with specular map?
all there is you will find in the docs.
oh thank you. I am a newbie
I have my own grass manager script that control grass bending on collision. but some of your script overide it. Any idea how to solve it?
I use the asset of my friend but If I can fix this problem I will buy my own license ^^
nope. i do not know how you handle it at all
Will have support for URP 11?
there is already a package for urp 11!
if you do not have it after updating, clean your download cache of the assest store and re download it.
I only see URP 7.2 package, even on asset store's page's package content.
So I can use Lux Essential's grass shader instead of ATG's urp shader?
damn, wrong thread, sorry
na, the lux urp grass shader does not support procedural instacing.
it is coming!
shaders for urp 10 and urp 11 now are available.
I tried it.
fine. your screen shot looks good as well. maybe the grass is a bit dense? and the intersection with the rock breaks immersion
Just for test.
I am not decide where to paint grass yet.
I tried out the ATG asset and it works pretty well for me, although it's not exactly plug and play. You actually have to RTFM but I'm happy to have a nice wind solution for details
I have several shaders from you that support wind - the ATG shaders, some shaders from LUX URP as well as some trees in packs from another vendor that use CTI shaders. Are you planning to consolidate this or should I just attach the different wind scripts? (At the moment I'm not using wind with my CTI shaders because I think they're not updated too URP 11? I seem to be getting an error with bark so I'm using your Tree Creator bark shader instead / trying around different stuff for the meantime).
Until now I've been using manually placed details with simplelit shaders, but I must say terrain grass performs a whole lot better. One thing that annoys me a lot in general with Unity terrain is that you can't change settings for details without losing all of your work - I really wish they would implement resampling for the details layers like they have for textures.
Another thing that irritated me with Unity terrain was that it blended in vertex colors, making it unusable for some of the detail models I had. Your shaders use vertex colors for wind so I had to do something about it anyway and I wrote a small quick-and-dirty editor script that will make reasonable wind alpha for grass meshes:
public class GrassVertexColors : MonoBehaviour
/// Lerps alpha from 0 for y at or below 0 to 1 at max y
[MenuItem("Pipeline/Grass Mesh Colors")]
static void FixVertexColors()
GameObject curr = Selection.activeTransform.gameObject;
if (curr == null || !curr.name.Contains("grassvertex"))//security feature
error = "No appropriate object selected.";
MeshFilter mf = curr.GetComponent<MeshFilter>();
var msh = mf.sharedMesh;
if (mf == null || mf.sharedMesh == null)
error = "No mesh on the object.";
float maxY = 0;
for (int i = 0; i < msh.vertexCount; i++)
maxY = Mathf.Max(maxY, msh.vertices[i].y);
var colors = msh.colors;
for (int i = 0; i < msh.vertexCount; i++)
float y = Mathf.Max(msh.vertices[i].y, 0);
float a = Mathf.Lerp(0, 1, y / maxY);
colors[i] = new Color(1, 1, 1, a);
msh.colors = colors;
Workflow for healthy/dry colors is a bit tricky to get right. The material healthy/dry colors are set to the colors from the terrain, but when working with several terrains that share the same detail, or different detail meshes sharing the same material you have to make sure to set them all to the same values, or it becomes unpredictable which value is actually used? I kinda wish the script had an option to not copy that data, so you could edit these values in the material and not have them be overwritten? When do these values get copied - only when you press update prototypes or also sometimes on other occasions?
Could you give some recommendations on workflow with multiple terrains in the scene? Perhaps Manually enable/disable the managers for the terrains you aren't currently working with in edit mode, and then enabling/disabling via script at runtime as terrains enter the view in play mode?
there should only be 2 scripts when using urp:
- wind for grass and foliage which gets sampled from a render texture.
- wind for trees which gets fed in as several floatx values.
both scripts are driven by a unity wind zone.
right now i have no plans to make trees listen to the render texture as well.
there is an update for urp 11 - but it is difficult and time consuming to distribute it...
you can check "freeze size and color" in th egrass manager. then it will not update the used atg material anymore. and you can use the same material on all of your terrains.
i have no special recommendation. just use the way that best fits your needs.
So I picked this up in the current bundle and I'm really interested in trying it out, but when I load up the demo scene in a blank URP project it's not rendering any grass, but is rendering some random pink geometry in the sky here and there. I've been through the documentation and tried all the obvious troubleshooting things listed there, but come up empty.
In the end cells to init always reads as 0.
The only error message I got in the console was:
Shader error in 'AdvancedTerrainGrass/VegetationStudio/Grass Base Shader': Unexpected token ';'. Expected one of: ',' ')' at Assets/AdvancedTerrainGrass/Shaders/ATG Shaders/ATG Standard RP Shaders/Includes/VS_GrassInstancedIndirect_Vertex.cginc(80)
On the assumption it was a simple typo I attempted to fix it and it made no difference; it wouldn't surprise me if there's something else wrong here since I am not particularly familiar with it and just hazarded a guess that would eliminate the console error. Original line:
wind.r = wind.r * (wind.g * 2.0f - 0.24376f; // Not a "real" normal as we want to keep the base direction.
wind.r = wind.r * (wind.g * 2.0f - 0.24376f); // Not a "real" normal as we want to keep the base direction.
you have to install the urp package. then open the urp demo called "02 Full Demo URP"!
as shown on your screen shot you are in the demo scene for the built in render pipeline... the materials used by the grass and foliage here use standard deferred/forward shaders and thus do not work with urp.
Pfft, I completely overlooked it, like a dummy; I saw "URP 11" and "URP 7.2" and didn't fully read the rest of the filenames to put together that I needed both. Thank you for taking the time to reply!
you are welcome!
I had the same problem, this works for me
I am getting an index out of range exception in GrassManager.cs GetfilteredHeight() and I notice a comment immediately before these are called on line 1931:
// NOTE: When looking up the height map we need guards!!!!!!
So, apparently these guards are indeed needed. I've put a try / catch within the method and return 0 when there is an exception. Any chance this could be fixed?
thanks for reporting!
atg has been out in the wilde for quite some time and i haven't got any response like this for the last 24 months or so.
so maybe you are using quite strange terrain settings? or use baked terrain data which is out of sync?
if not it would be great if you could send me your terrain to check it out.
How can I do to make density more sparse like built-in detail rendering? I want fade out density more smooth.
Here is comparison.
Left one is built-in with density set 0.1.
Right one is ATG with density set 1.
When I set density fewer it just render nothing. So I can't tweak density gradually as built-in.
oh, you should be able to lower the density in atg as well.
and of course you can use a low density when painting the grass!?
When I lower density or use a low density when painting the grass. It won't render grass.
By the way, I found grass rendered at where is terrain hole. How can I culling these grass?
Sorry if this isn't the place to ask, but any advice on making grass be effected by colliders going through it, like the video with the spheres on your asset store page? I cannot figure it out and it doesn't seem to be happening in the 02 Full Demo
Getting this error after the lastest version
Shader error in 'Hidden/ATG-Internal-DepthNormalsTexture': undeclared identifier '_ScaleMode' at Shaders/Includes/GrassInstancedIndirect_Vertex.cginc(100) (on d3d11)
Compiling Vertex program
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
Disabled keywords: _METALLICGLOSSMAP _NORMAL UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30