Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

HDRP 2021.2 Grass Texture?

Discussion in '2021.2 Beta' started by berkuslu97, Apr 18, 2021.

  1. berkuslu97

    berkuslu97

    Joined:
    Jun 30, 2018
    Posts:
    22
    Hi!

    We were using URP for our game because our game is a Survival game in a forest so we have to use lots of grass. Since Grass Textures came to HDRP we want to upgrade our project to HDRP but we couldn't find how to use Grass Textures!

    upload_2021-4-19_0-25-30.png upload_2021-4-19_0-26-29.png
     
    benowner21 likes this.
  2. berkuslu97

    berkuslu97

    Joined:
    Jun 30, 2018
    Posts:
    22
    Anyone?
     
  3. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,266
    Look at the error message in your screenshot :p

    Compatible and improved detail rendering was said to come in a later HDRP version
     
  4. berkuslu97

    berkuslu97

    Joined:
    Jun 30, 2018
    Posts:
    22
    upload_2021-4-22_12-47-26.png

    On the roadmap site they say they released Grass Textures. Don't get me wrong but if there is no Grass Textures on HDRP's latest version currently i am using 2021.2.014a why it is in released tab. I just wanna use something like URP's grass texture. Because i think URP's Grass Texture performance is better than HDRP's detailed mesh grass but not sure tho.
     
    AntonioModer and Deleted User like this.
  5. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,266
    The wording isn't exactly clear on this, but I think they mean they've added support for detail meshes with custom materials. Previously, the built-in detail shader was always forced on them. So this would still exclude detail textures (the auto-generated plane meshes).

    So to use your grass billboard textures, you'd have to make a grass mesh, create materials for it, and create the prefabs. Which could just be a few crossed planes sharing the same UV space:
    upload_2021-4-22_12-26-18.png
     
    BrandyStarbrite likes this.
  6. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    It works with Nature Renderer + Nature Shaders, but there isn't a built-in shader for it. Frankly you can't really use grass without Nature Renderer anyway. The built-in system blocks the main thread to generate the grass chunks.
     
    PutridEx likes this.
  7. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    wow
     
  8. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    The fact that the built-in system is terrible is no excuse to have had no way to do grass in HDRP all this time. There should have been compatible shaders from the beginning.
     
    BrandyStarbrite and jc2 like this.
  9. berkuslu97

    berkuslu97

    Joined:
    Jun 30, 2018
    Posts:
    22
    i couldn't agree more
     
    BrandyStarbrite likes this.
  10. berkuslu97

    berkuslu97

    Joined:
    Jun 30, 2018
    Posts:
    22
    thanks for advice.

    btw we just started using your terrain painter and it is amazing. Thanks for publishing that.
     
  11. Matjio

    Matjio

    Unity Technologies

    Joined:
    Dec 1, 2014
    Posts:
    108
    Hi,

    Indeed, only terrain details support has been added for HDRP (should be available since 2021.2 Alpha 1), and not the specific "grass texture" detail as the title might suggest.

    As explained in the description, grass is expected to be handled via the instanced mesh detail and ShaderGraph, which we think is much more flexible with good performance on most platforms. We plan to provide grass instanced detailed mesh samples in an upcoming release of our terrain tools samples.

    Sorry for the confusion. I have now updated the card title and description on the roadmap.
     
  12. berkuslu97

    berkuslu97

    Joined:
    Jun 30, 2018
    Posts:
    22
    Thanks for clarification!
     
    Matjio likes this.
  13. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    440
    Could you backport grass to 2020LTS? It would extremely helpful to continue project rather than having it on 2021 alpha updates.
     
  14. berkuslu97

    berkuslu97

    Joined:
    Jun 30, 2018
    Posts:
    22
    Yeah I tried to backport 2020 LTS but because of new versions of HDRP its so much work to get back. Also we are using so many features from 2021. Just hoping that they finish 2021 Alpha quickly or release more stable versions
     
  15. thephox1982

    thephox1982

    Joined:
    Jan 21, 2022
    Posts:
    20
    2021 LTS lacks this feature as well.. Unity is really falling behind, it's sad.
    Can't even get basic grass right, come on people!
     
  16. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    It's supported grass meshes for a while now, just not grass textures which are unoptimized and look worse. If you need an example, there's a demo scene on the asset store:
    Unity Terrain - HDRP Demo Scene | 3D Environments | Unity Asset Store

    I wouldn't hold my breath on them supporting grass textures in the newer pipelines. It's just an unnecessary legacy feature.
     
  17. tgaldi

    tgaldi

    Joined:
    Oct 28, 2015
    Posts:
    102
    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
     
  18. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    Still waiting.
     
  19. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    Probably an issue in the shader you're using. The example grass shader for instance has a fade property on the material, which will also control visibility at a distance.
    I have no issue rendering grass at whatever distance.
    It's unlikely to happen. Grass textures were never a good thing to use. Check out the terrain demo to see how grass should work in HDRP:
    https://assetstore.unity.com/packages/3d/environments/unity-terrain-hdrp-demo-scene-213198
     
  20. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    Then why does the UI for it exist?