Search Unity

Is terrain grass working on HDRP yet?

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

  1. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    My apologies, it is working with URP 7.2.0 and Unity 2020.1.0a23 as well as Unity 2019.3.2f1

    I originally reported the issue with grass not working for URP in those engine versions. Worth trying and letting me know if HDRP also works if you aren't using those versions already!
     
    awesomedata and Rowlan like this.
  2. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,267
    Thank you very much. I gotta try these then, should be fun to toy around :D
     
    ROBYER1 likes this.
  3. pbritton

    pbritton

    Joined:
    Nov 14, 2016
    Posts:
    159
    It doesn't work with HDRP on 7.2.1 version 2019.3.2f1.
     
  4. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Thanks for confirming, use the Unity Bug reporter to report it because they won't see the issue on the forums here unless we are lucky! Weird it works on URP though.
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Really though the only reason this isn't all nice to use is because nobody at Unity has time to make it all nice to use... pretty tough. I hear though @Aras is now master of all thing things that affect our daily lives so we should be grateful if his A-team will plug these gaps :D

    Though I don't know if that entails making a grass shader work for people ...
     
    ROBYER1 likes this.
  6. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    That would be nice. Doing nice things to nice people (who are not getting any younger :D)
     
    hippocoder likes this.
  7. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,267
    HDRP grass billboard still doesn't work. Tried 2020.1.0a24 with the 8.x.x/release branch.
     
    valentingurkov and konsic like this.
  8. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    I wonder if it wouldn't just be a better idea to focus on making GPU Instancing for anything -- i.e. even for non-terrain (i.e. mesh-based) stuff?


    In general, I just really wish Unity would start going in a more generalized direction with its "helper" tools.

    Talking about grass and shaders -- Biomes, for example, are just a small set of features that are very easily broken down into more general micro-situations (usually reliant on shaders). If you need a snow area, you need a special shader that handles automatic painting of vertex data. If you need a grass "biome" -- you need a grass shader that handles nice wind movement. What about if you need grass in your snow "biome" -- or vice-versa? You need some method of shader-stacking, which is a more generalized feature. Then, when you need the nice shaders for fancy mesh sculpting -- nope. Can't do that. It's "Terrain-only" -- We'd have to rewrite the whole engine/tool for that. And just like that, our tool-mandated methods and workarounds have now (for the long-term!) pigeon-holed us artists/designers again into an ancient heightmap-based terrain system, with all the future tools for the next 10 years being built for (and around) an already outdated system -- by design!


    @Aras -- What think you?

    Has this been the general consensus at Unity, or has this issue been discussed seriously at all?
     
    Last edited: Mar 5, 2020
    Lars-Steenhoff and ROBYER1 like this.
  9. tgienger

    tgienger

    Joined:
    Jul 18, 2013
    Posts:
    45
    "insert Jeopardy! music"

    Any word anywhere on what the future of grass and detail objects will be? It's such a wierd place to be starting a project in Unity right now...
     
    awesomedata likes this.
  10. Thromshall

    Thromshall

    Joined:
    Oct 9, 2012
    Posts:
    12
    I agree. I have a newer project and it feels weird that 75% of things seem to be working fine, but I can't place grass on my terrain which seems kinda like a big deal...
     
    ROBYER1 likes this.
  11. Zeurin

    Zeurin

    Joined:
    Sep 27, 2018
    Posts:
    5
    How is posible that we have not grass and detail painting in a released HDRP.... this is 2020.... Unity never showed that level of opacity in comunication with a feature in my 8 year experience.
    UNITY Bump Up your Alpha Channel please!! We just want information.
     
    danielbrm, mQe and camta005 like this.
  12. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    440
    You can create shader for grass and then use https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstanced.html

    I'm currently working on this solution. I'll post it when it's working.
     
    ezerai and Karasu416 like this.
  13. Karasu416

    Karasu416

    Joined:
    Nov 17, 2013
    Posts:
    6
    Using 2019.3.7f1. Still no fix on this over a year later, wildly unbelievable. I get unity wants to focus on DOTS and the next releases, but this is such a basic tool of the engine. Hard to believe it's been this way for so long.
    Please keep us posted if you get that fix working Valarus! Hope it works out
     
    mQe and Freznosis like this.
  14. mQe

    mQe

    Joined:
    Jul 22, 2012
    Posts:
    57
    This is pretty unacceptable imo, terrain is almost unusable for anything I'll ever work with, I've tried several workarounds and they're all performance heavy. For the love of god, fix this ASAP.
     
    danielbrm and soleron like this.
  15. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    Coding a solution with DrawMeshInstanced or DrawMeshInstancedIndirect is the correct way to do this. Unfortunately, it is non-trivial because you need to roll your own spacial partitioning and culling system. There are systems in the Asset Store that do this. As you all know, when Unity fails to offer a compelling solution to a common problem, someone will make something on the Asset Store, for it is The Unity Way™
     
    mQe and camta005 like this.
  16. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    580

    "unfortunately"? the stork won't bring it? :D

    Why is this not a priority?
    Not to ask why was this not taken into consideration from the very beginning?
     
  17. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    580
    Trees (at least sometimes, this too has a bug that comes up every now and then) work fine. Details don't.

    upload_2020-5-9_15-21-49.png
     
  18. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    ETA = before you get hired by Epic I hope.

    I was pumped about HDRP and then ohh, terrain ain't working too good.

    So uh anyone has an alternative in mind? Each time I spend hours in medium my breath gets shorter.
     
    ezerai and Cookieg82 like this.
  19. deadlycrow

    deadlycrow

    Joined:
    Feb 10, 2014
    Posts:
    166
    I'm doing a decently "good looking" videogame in Unity, so far i wasn't using terrains since the game was only in interiors, till a few days ago we decided to make a level in a forest... WHAT A MISTAKE... so seriously at this point unity still doesn't has support on those terrain features?? a joke. why a joke? because funny enough they promoted the HDRP system with an outside forest environment... So we should understand that as "look people, we made this cool looking trailer in unity with the new render pipeline, but none of the features showcased in this video are native, all is custom stuff, and btw, all the tools we are giving you are useless to make this exact same scene." thats the only thing i see watching those fancy trailers. A real shame. This is absolutely "engine-changing" material.
     
  20. Cookieg82

    Cookieg82

    Joined:
    Mar 28, 2017
    Posts:
    73
    Can I just ask a silly question? How does one go about adding grass to a HDRP scene? Thanks. Or do I have to create my entire project again inside a URP setting, taking me back to square one?

    Like, surely this must be possible?

    I have seen the SG Hack above, but couldn't see how it worked with the terrain painter? Nothing happened? Sorry to come across so dumb.

    Thanks.
     
  21. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    I think your options are manually placing grass meshes, paint them with Polybrush, or use something from the Asset Store.
     
    Cookieg82 likes this.
  22. Cookieg82

    Cookieg82

    Joined:
    Mar 28, 2017
    Posts:
    73
    Thanks, i have made a small group of prefabs which consist of tiny plants/grass like meshs. Then just dotted them about randomly. It will suffice.
     
  23. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    I found that the Particle system is more performant for grass than adding thousands of game objects
     
    Andresmonte and Rowlan like this.
  24. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,267
    That sounds interesting. Got some screens / videos?
     
  25. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    440
     
  26. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
  27. Cookieg82

    Cookieg82

    Joined:
    Mar 28, 2017
    Posts:
    73
    Is this a private venture? ;) How did you do this?
     
  28. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    440
    This is example from VFX graph samples. You need terrain with point chache data. It's the only way to draw grass in HDRP. It's more performant than stacking grass prefabs.
     
    Cookieg82 and laurentlavigne like this.
  29. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    The Only issue with that one is you need another apps to bake the point cache. Hmm. . . is there a way to bake the point cache inside unity from array of gameobject??
     
  30. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    440
    How do you define array of gameobjectcs?
    I don't think it can be done.
     
  31. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    GameObject[] GO;
     
  32. DinostabOMG

    DinostabOMG

    Joined:
    Jan 4, 2014
    Posts:
    26
    Thanks for this, Flamacore. How do you apply it to a terrain object? In 2019.3.15, I can't find the material slot for it.. is this because the editor blocks it? This is what I see... upload_2020-6-25_23-6-41.png

    I tried making a material for it that I applied to the entire terrain, but that didn't seem to work. I think I must be misunderstanding the workflow.
     
    AntonioModer likes this.
  33. AdamSt

    AdamSt

    Joined:
    Jun 2, 2013
    Posts:
    18
    Currently my scene does look like this:

    upload_2020-8-5_18-7-31.png
    After converting from URP to HDRP.
    And I'm finding out that there is no chance to create natively something so simple like... grass?

    Astonishing...
     
    camta005 likes this.
  34. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    I think your mistake was using HDRP Unity.
     
    AcidArrow, florianalexandru05 and mQe like this.
  35. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,806
    Great, so I spend a lot of time finding out how to replace the terrain grass shader in Unity and overwrite it and now I found myself with a HDRP map that's devoid of grass! I might try to see if it's possible to get grass in HDRP... I know people will use Vegetation studio but I want to sell a stand alone nature top to bottom and I'm missing the tools to do it. I suck at shaders and programing but no choice then to do it myself!
     
  36. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    florianalexandru05 likes this.
  37. RickardV

    RickardV

    Joined:
    Sep 20, 2020
    Posts:
    3
    Wish I read this thread before spending hours converting my project to HDRP only to find out it's literal garbage. My entire project is now corrupt and crashes the editor with a popup for bug report, which also crashes. Hey I want to report a bug: The bug reporter is bugged.

    Anyway, for a noob like me the unity experience has been really discouraging.
     
  38. mQe

    mQe

    Joined:
    Jul 22, 2012
    Posts:
    57
    This was the final nail in the coffin for me, such a basic feature not prioritised for so long. After 8 years working with Unity personally and proffesionally, I'm finally switching to Unreal 4. I'm 2 months into my transition and I don't think Unity can ever win me back, granted it helps that I'm an old Unreal 3 user as well.

    I get that it's hard to compete against such a big company that has all that Fortnite money, but they should've adapted and changed strategy, like focusing on one or two things to do perfectly instead of doing everything mediocre and abandon features half way through. Sadly I see very little reason to pick Unity in 2020, there are just better free engines out there.
     
  39. Ng0ns

    Ng0ns

    Joined:
    Jun 21, 2016
    Posts:
    197
    I just don't quite get how they can have something like terrain-grass be "eerrr.. eventually?", its somewhat akin to delivering a car without wheels.

    That said ..
    • Create a new HDRP project.
    • Add a bare terrain.
    = ~30 fps on a gtx970.

    Do the same in something like Unreal (sorry, I hate to compare).
    = 171 fps...

    I know its not a valid comparison since settings and features differ, but man ... 30 fps. Sure, turning off all the fancy fog and post effects help, but you're still a farcry from ...
     
    mQe and jRocket like this.
  40. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    To be fair, Unity is kind of rebuilding its engine from the ground up -- which is (in the future) a good thing.
    However, I'm more in favor of a BASE terrain system -- i.e. mesh-based terrain, with all "grass" as nothing more than entities.

    I'm not sure whether grass is going to be included in the new "environment system" they mentioned a couple of years ago (sort of like Vegetation Studio's "biomes" -- which would make sense, since grouping data -- such as grass -- for systems like these should kind of be a big deal).

    Anyway, that's my hope. ---


    Anyone @Unity care to respond?


    Seems like this thread shouldn't be left to rot. :(
     
    dog_funtom likes this.
  41. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,806
    Also, if you use the trees as grass then yes, that's a terrible idea two! That's why there are all those grass solution packs on the store, tho even asset makers are having problems with HDRP.
     
  42. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,073
    I was starting to wonder is unity deliberately omit some crucial system so people are forced to buy them on asset store and the money roll in.
     
    andreyefimov2010 and Kirsche like this.
  43. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Unity is totally "vegging-out" while Vegetation Studio's wins rollll innn.... :cool:


    I mean...

    Why else would Unity not respond to this thread? -- Surely there is NO OTHER EXPLANATION.

    ;P
     
  44. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    The third-party solutions in the asset store are not very good and the authors could stop working on them at any time. We need a proper mesh-based instanced foliage rendering system, built into the engine that works with all rendering paths.
     
    Havyx likes this.
  45. jeremyco

    jeremyco

    Unity Technologies

    Joined:
    Oct 17, 2018
    Posts:
    38
    Hey all,

    Apologies for the silence, this thread was just brought to my attention.

    The new Environment system is feature rich and won't disappoint, however that doesn't mean we've forgotten the Terrain system.

    Similar to all of Unity R&D we (the "current Terrain" team specifically) are heavily focused on closing the gaps between URP/HDRP and built-in pipelines and fixing correctness, performance, and usability bugs.

    I actually believe there are some great solutions in the asset store, I don't think Unity should use that as a crutch, but I do want to point out that a ton of hard work goes into building and supporting the top tier of those systems (MicroSplat and The Vegetation Engine come to mind).

    And yes, VFX Graph + Terrain can build next-gen quality foliage today. I've personally used this combo to read from the terrain splat maps + heightmap rather than using a point cache and it was glorious (I will look into releasing this as an example in the future, but we need to stay focused for the current release).

    I'm sorry I have no immediate solutions for you all, but I can say the situation will greatly improve in Unity 2021.2 and the (further future) Environment system will go much further.
     
  46. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    Yay.... Only 1 year to wait!
     
  47. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    320
    I'm sorry but I can't tell from this post, is there actually a grass / detail system currently in development for HDRP?
     
  48. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    1 year for it to be in experimental status, 2+ years until its ready for production. 4 years until its deprecated and replaced with something else.
     
    andreyefimov2010, mQe and Metron like this.
  49. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Are we talking about full-fledged floating-origin Open-World situations? -- including LODs, culling, Impostors / Impostor grouping, detail instancing, mesh-based terrains, automatic UV unwrapping / Voxel-based projection of high detail to low-poly, programmable procedural geometry and procedural instancing tools, floating-origin editor streaming, substance texturing -- and the whole nine-yards?

    Or are we simply talking about another "Terrain" workflow that limits us to specific mediums and toolchains? :(
     
    mQe likes this.
  50. mQe

    mQe

    Joined:
    Jul 22, 2012
    Posts:
    57
    So depressingly accurate :D

    @awesomedata I think you know the answer to that :p
     
    awesomedata likes this.