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. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Is terrain grass working on HDRP yet?

Discussion in 'World Building' started by MadeFromPolygons, Feb 13, 2019.

  1. guptearchit

    guptearchit

    Joined:
    Dec 7, 2020
    Posts:
    4
    Is there still a unity fix to this issue???? cuz it isnt working even in 2020.1.1
     
  2. jeremyco

    jeremyco

    Unity Technologies

    Joined:
    Oct 17, 2018
    Posts:
    38
    @camta005 There will be a production ready solution for painting details on current terrain with custom ShaderGraph shaders in 2021.2 with HDRP and URP support

    The built-in "Grass" mode will not be supported, but recreating that effect in ShaderGraph is straight forward.
     
  3. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,671
    is that a specific terrain tools or a general (gpu) instance painter?
     
  4. drhippodev

    drhippodev

    Joined:
    Feb 22, 2021
    Posts:
    1
  5. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,878

    That's stupid, completely and utterly stupid. Nobody is asking for this stuff right now. I mean hey cool make the new superior grass system and when it's done it's done, but how about make the original one work now without making desperate people have to go spend $79 dollars on the asset store for a feature that should for all intents and purposes be supported or have to wait 3 years like I have or have to wait another year for 2021.2 to come out. URP does it, so should HDRP, there's no excuse for this.
     
    jc2, Vharz and drhippodev like this.
  6. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,878
    I'm sorry for the rant, but it is truly, very truly frustrating to be waiting years, have heard multiple Unity devs say 'oh we're working on a new terrain system with layers, grass will be paintable on said layers, etc' just to hear it's been canceled/put on hold for other important things.

    I have almost no faith in what the teams say any longer, because when it comes to grass it always seems to get pushed to the back burner. Every single time. Yes all these new features coming are great! But come on, we need to at least be able to make a beautiful environment to give these new features any real value.

    Yes the moon is pretty, but eventually staring at rocks and dirt all day is going to bore everybody.
     
    Last edited: Feb 25, 2021
  7. Kelkith

    Kelkith

    Joined:
    Mar 19, 2014
    Posts:
    14
    After spending the better part of 4 days researching solutions for this completely ridiculous problem, as of HDRP version 10.3.1 the options that a developer currently has are:

    - Purchase the Vegetation Studio or Vegetation Engine asset(s). Minimum for these is $60 USD, and you're at the mercy of another developer.
    - Create a grass prefab and use the hacky workaround of placing them as Trees. Not a great solution, unsure about how good performance can be with this.
    - Write a custom terrain shader solution for a feature that somehow has been glossed over for nearly 3 years.
    - Scream

    I've decided to go with the grass-as-trees approach for now, and I'll see about doing some performance benchmarks.
     
    jc2 and PutridEx like this.
  8. alphabean11

    alphabean11

    Joined:
    Apr 18, 2019
    Posts:
    18
    @jeremyco do you have any info on how you connected your alpha map to the position in VFX Graph? I’m currently trying to build what you said you were able to accomplish with VFX Graph and splat maps, but I can’t figure out how to make that connection to have the grass show up on just my splat map. Any suggestions to get me going in the right direction?
     
    dog_funtom likes this.
  9. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,636
    I know another one: switch game engines.

    Seriously, though... The HDRP itself should've never been called "production-ready" in
    2019.3+
    , considering it lacks such a fundamental thing. Just to put it into perspective: "To be production-ready, a render pipeline needs to provide tools for artists to express their creativity" was said in a blog post last year.
     
    jc2 likes this.
  10. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,103
    It does enable you to do so... you just have to show restraint...
     
  11. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    633
    It's production ready- as long as your production doesn't have foliage, water, impostors, custom post fx, tessellation, real-time GI, or any kind of open worlds.
     
    ColdJackle, jc2 and PutridEx like this.
  12. pbritton

    pbritton

    Joined:
    Nov 14, 2016
    Posts:
    117
    That sounds awesome. It is 100% compatible with games that are still in concept stage.:p
     
    ColdJackle likes this.
  13. Kelkith

    Kelkith

    Joined:
    Mar 19, 2014
    Posts:
    14
    So after some extensive testing of all the non-paid options, I've found some more frustrating discoveries as well as a temporary solution.
    • Polybrush doesn't work on Unity Terrain, so placing them in a reasonable manner is out of the question.
    • Using trees-as-grass seems to be the only reasonable solution for the current HDRP mess, however there seems to be no way of altering placed trees rotation, so your grass will always grow perfectly vertical.
    • Trees-as-grass skyrockets draw calls, however it doesn't seem to introduce any actual lag.
    Unity very much needs to get the terrain system sorted because it is a completely broken mess as it is currently, and having to use an already hacky workaround to get something as simple as grass working is just silly and makes me worry that if the last hacky workaround (replacing build in billboard shaders for grass) got patched out, it feels like I can't really trust further updates to not break more stuff.

    The only other viable solution I can foresee possibly working is using the VFX graph to place grass on terrain. I'm not certain how possible it is to control where grass would be painted with a solution like that however.

    TLDR; Want grass in HDRP? Use trees-as-grass and deal with its rubbish look or pay 60+ dollars to get a solution.
     
  14. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    912
    I believe it's now in alpha, 2021.2. I think you have to download it from github to test, not sure though. I couldn't find the github pull for it. so maybe it's not in yet.
     
  15. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,671
  16. TornadoGamesFR

    TornadoGamesFR

    Joined:
    Jan 2, 2021
    Posts:
    1
    Grass still not working on Unity 2020.1.3f1 HDRP 8.2.0, you have seen a forest without grass before and I really need some grass for my project
     
  17. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,445
    First line on that link says: "This feature has landed and is available since 2021.2 Alpha 1."

    The Unity and HDRP version you're using have both stopped being updated with new features a while ago.
     
  18. Fernando-Ferreira

    Fernando-Ferreira

    Joined:
    Nov 9, 2015
    Posts:
    10
    The new Terrain SRP Details release in 2021.2 Alpha 1. does not include support for the specific grass texture details.

     
  19. DragonTein

    DragonTein

    Joined:
    Jul 1, 2018
    Posts:
    12
    what does that even means?
     
  20. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,636
    jRocket likes this.
  21. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    633
    I haven't tried it yet, but I read this to mean that the grass billboards are not supported. In the Terrain component under the details tab, you can add a "Detail Mesh" or a "Grass Texture". The detail mesh is just painting a mesh(which could be grass-like) and should now be supported in HDRP. The "grass texture" defines a simple diffuse texture and some settings like noise and color variation, and the (built-in) rendering system will generate billboards and a material for you. The problem is that HDRP does not support the shader that the grass billboard material uses.

    I don't really understand why this is so hard for Unity. I know billboard grass textures are kind of old-school, and you probably want to use detail meshes(if not a different system entirely)- but on the other than it's been how many years now, and HDRP still doesn't have feature-parity with the built-in renderer.
     
  22. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,445
    My guess is that this is due to the built-in billboard implementation being very hardcoded in the depths of Unity's C++ catacombs. Almost everything about it is a hard black box: the billboard geometry generation, the name of the shader it looks up, the pass the shader must contain, when the draw commands are issued, the generation of the texture atlas which contains all your billboard textures.

    Now, Unity could simply read the information from the inspector and sidestep all that stuff, but this seems a classic case of the perfect being the enemy of the good: the billboards are quite dated, so surely people have great ambitions for making something far better... which never comes out.
     
  23. feldie

    feldie

    Joined:
    Jun 8, 2019
    Posts:
    4
    I read that @valarus mentioned the GPU instancing already; here is my sample implementation that works rather well using this approach, with the terrain detail meshes and HDRP:

    https://gitlab.com/felix.dietrich/unity-terrain-hdrp-grass

    I tried rather hard to not add additional functionality in my script,so that you can just add the script to existing terrain systems with detail information and do not have to rely on me expanding functionality later. Billboards do not work, just detail meshes (mostly because this is just a hobby project and I do not have time, not because it is hard to add them).

    I did not try too hard to create pretty models. It should work with any shader that supports GPU instancing. Tested with Unity LTS 2020.3, HDRP 10.5.1.

    EDIT: Billboarding and detail meshes should both work now.

    wheatbackground.png
     
    Last edited: Aug 3, 2021
  24. feldie

    feldie

    Joined:
    Jun 8, 2019
    Posts:
    4
    x1alphaz1 and Rowlan like this.
  25. DrMeatball

    DrMeatball

    Joined:
    Nov 21, 2021
    Posts:
    40
    Maybe I'm misreading, but I thought this was resolved?

    I'm in 2021.3.7f1 / HDRP and still getting white grass. What am I doing wrong?

    grass.png
     
  26. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,584
    Unity terrain does not support Grass Texture as mesh anymore in HDRP. You need to add detail mesh only and it only works starting from a specific version up of Unity: https://docs.unity3d.com/Manual/terrain-Grass.html

    Believe me, this was a feature I was waiting for for a very long time. I think this works starting from 2021.3 if I recall but not the grass textures, you will need to use mesh details. It's pretty optimized and is much better than using grass as trees lol, but if you still insist on using grass planes maybe try the hack fixes from this thread or just import some planes yourself and use them as detail mesh!
     
    Last edited: Aug 4, 2022
    wyattt_ and DrMeatball like this.
  27. DrMeatball

    DrMeatball

    Joined:
    Nov 21, 2021
    Posts:
    40
  28. AdamSt

    AdamSt

    Joined:
    Jun 2, 2013
    Posts:
    18
    Anything changed? Or we still are missing just grass in HDRP?
     
  29. tgaldi

    tgaldi

    Joined:
    Oct 28, 2015
    Posts:
    90
    Detail distance for grass meshes only seems to work up to 34 meters - is this a known limitation? If so, grass textures would be useful for adding grass further out.

    2021.3.8f1
     
unityunity