Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

BEST WAY OF MAKING GRASS! looks a lot like speed tree grass, runs as fast and looks just as good!

Discussion in 'General Graphics' started by JamesL98, Jul 10, 2015.

  1. HermieW

    HermieW

    Joined:
    Oct 16, 2016
    Posts:
    10
    @Cactus_on_Fire OMG, would you share your sample scene to learn from it? It's really awesome.
     
    petey likes this.
  2. JamesL98

    JamesL98

    Joined:
    Oct 9, 2014
    Posts:
    40
    This thread is pretty old and as such i don't have the original grass i was working on (it was a first prototype), since then ive worked on using unitys standard grass placement on terrains for open world maps and tweaking settings so its not so obvious that it is a bunch of planes. I have also learnt how to make some decent grass meshes and if i have the time i will make a sample scene and upload it here for you with a few different ways of making spectacular grass. Here is what ive done using unity's grass placement method:
    bandicam 2016-11-20 10-33-33-271.jpg bandicam 2016-10-11 02-30-45-171.jpg
     
    Acissathar likes this.
  3. PatHasNoPot

    PatHasNoPot

    Joined:
    Oct 10, 2016
    Posts:
    7
    What settings did you use for the grass?
     
  4. JamesL98

    JamesL98

    Joined:
    Oct 9, 2014
    Posts:
    40
    My grass texture is a 2468x1467 texture (wider than taller)
    bandicam 2016-12-06 11-05-34-755.jpg
     
  5. PatHasNoPot

    PatHasNoPot

    Joined:
    Oct 10, 2016
    Posts:
    7
    Thank you for the reply. And any grass asset you'd recommend using? I've been struggling with grass lately and it's all I'd need to finish a first version of my scene. Also I have some grass that's pre-colored, is there a way to keep that color schema without Unity's grass editor editing that up?

    Thank you in advance!
     
  6. JamesL98

    JamesL98

    Joined:
    Oct 9, 2014
    Posts:
    40
    After searching and searching i never really found any good grass asset or even textures and ended up taking my own photo and doing some Photoshop magic. As for the colour im not too sure how to keep the original colour but there are three colour options in Unity in regards to grass, two in the "Edit grass texture" tab as shown up above in my screenshot and in the terrain settings. Fiddling with these long enough should get your result!
     
  7. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,330
    You can make the healthy/dry colour white, then adjust the terrain tint to white.

    There's an issue with unity terrain where it shades the grass to simulate cloud shadows, and you can't disable that.

    Vote here to fix it - https://feedback.unity3d.com/suggestions/terrain-system-touch-up
     
    Last edited: Dec 8, 2016
  8. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,503

    Interesting, but it's hard for me to see much of grass. Do you have closeup pictures of the grass, in sunlight, without image effects or in shadow?
     
  9. TheNoobieWaffle

    TheNoobieWaffle

    Joined:
    Jul 12, 2014
    Posts:
    25
  10. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    480
    Thanks man :)

    After some time I figured out how to get rid of the skybox rendering between the opacity clippings so there are even less artifacts now. Here's another scene screenshot. These are straight from the editor view with no post-processing or any anti-aliasing applied, including the default forward camera anti-aliasing. I also decorated it with some amazing megascans stones to pretty it up =)

     
    Mauri, brokenm, TheoHeu and 5 others like this.
  11. PenguinEmporium

    PenguinEmporium

    Joined:
    May 30, 2013
    Posts:
    134
    Ooooooh, so pretty.
     
    TheoHeu likes this.
  12. jason-fisher

    jason-fisher

    Joined:
    Mar 19, 2014
    Posts:
    133
    @Cactus_on_Fire - that's amazing. Is this the same shader as you shared above?
     
  13. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    480
    Thanks :)

    Yep
     
  14. jason-fisher

    jason-fisher

    Joined:
    Mar 19, 2014
    Posts:
    133
  15. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    480
    They're using a screen door transparency which uses opaque rendering. I'm not sure if it can work with a transparent edged shader.
     
  16. matteumayo

    matteumayo

    Joined:
    Jul 25, 2016
    Posts:
    170
    @Cactus_on_Fire

    Amazing results!

    Can I ask how your grass is setup? Is your grass setup using the standard Unity terrain Detail texture method?

    Sorry if this is a naive question - I've been trying to solve grass aliasing (kills VR) for the past 3 days and I'm desperate for a solution. I made my own shader but I couldn't get shadows working properly with Alpha Blending (A2C.)

    I tried using your shader but I couldn't get it to work as a Detail Mesh grass or forcing it on a Detail Texture grass. If you do use Unity's terrain grass, how do you apply your shader?
     
  17. SimoneDunzendorfer

    SimoneDunzendorfer

    Joined:
    Jun 23, 2015
    Posts:
    35
    @Cactus_on_Fire This is sooo amazing. Would you share you sample scene. I love it so much!!
     
    TheoHeu and acaroppos like this.
  18. acaroppos

    acaroppos

    Joined:
    Jul 16, 2015
    Posts:
    31
    I would like to learn from it as well.
    Can you offer it on the Asset Store if you don't want to share it in private?
     
  19. TheoHeu

    TheoHeu

    Joined:
    Oct 15, 2016
    Posts:
    8
    +1 For release! Love your work!
     
    Last edited: Jan 30, 2017
  20. Hormic

    Hormic

    Joined:
    Aug 12, 2014
    Posts:
    248
    i'm also curious about it. You never could have enough good gras. :)
     
  21. TheoHeu

    TheoHeu

    Joined:
    Oct 15, 2016
    Posts:
    8
    Cactus_On_Fire 's approaches may be better than any of the available assets. Even if he sold them, and if they weren't good good enough, I would rate him 5 stars. I think nobody spent more hours with figuring all the cave-at's out and achieving the very best. Thank you, Cactus!
     
  22. jason-fisher

    jason-fisher

    Joined:
    Mar 19, 2014
    Posts:
    133
    I still have his example screenshots set as my desktop background so I don't forget about this.
     
  23. HermieW

    HermieW

    Joined:
    Oct 16, 2016
    Posts:
    10
    Cactus, could you share you setup?
    This would be a tremendous chance for others to learn from it.
    @jason-fisher Same here. :)
     
  24. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    480
    Sorry for the late reply guys, I was busy as hell lately :)

    I found the time to compile the assets and upload the project. So here's the scene from the screenshots with some neat foliage textures :)

    http://www.mediafire.com/file/tkbj6ag8bmhp5q4/Grass_Smooth+Cut.rar

     
  25. HermieW

    HermieW

    Joined:
    Oct 16, 2016
    Posts:
    10
    Wow, thank you so much!! The textures are just amazing!!
    Your project is so good, you're really talented!
    Thank you!
     
  26. acaroppos

    acaroppos

    Joined:
    Jul 16, 2015
    Posts:
    31
    Mille grazie!!

    Do you plan to sell your work on the AssetStore? I would immediately buy it.
    I would love to see more from you.
     
  27. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    368
    @Cactus_on_Fire Looked great on gamma + forward. Only issue was a bit of popping (which can be edited of course)

    Really nice work!
     
    mrmdesign likes this.
  28. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    480
    Thanks man, enjoy it :)

    I don't have much assets to sell on asset store, I was just experimenting on a soft edge shader really.

    Yeah thats the drawback from it. It's probably impossible to achieve both hard and soft edges in one pass but with little sacrifice it creates a nice effect.
     
    Flurgle likes this.
  29. Nandith

    Nandith

    Joined:
    Mar 13, 2017
    Posts:
    1
    How would you add wind effects to this?
    I tried but it resulted in the grass "shaking" in a weird way.
     
  30. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,079
    Make the color of the grass same as the texture for the ground.
     
  31. EL_NINO_

    EL_NINO_

    Joined:
    Apr 13, 2017
    Posts:
    2
    Anyone possibly have the original "Grass" asset from the deprecated original TerrainAssets package that could possibly share it? As it's been said the current terrain assets only include the 2 grass textures. No more grass material. Nothing viable from any of the free assets I've found either. Not to discount any of the other grass solutions in this thread mind you, they look beautiful. And I just downloaded the Grass_Smooth+Cut project with intentions on checking it out, and thank you very much for sharing that Sir Cactus. But the OP had a very simple, lightweight, and good looking thing going as well and I would love to try that as well. Many thanks in advance to anyone willing to post a link.
     
  32. JamesL98

    JamesL98

    Joined:
    Oct 9, 2014
    Posts:
    40
    have a look at @Cactus_on_Fire 's example scene he shared above, far better than using this method and has a few textures in there.
     
  33. Polkatuba

    Polkatuba

    Joined:
    Oct 31, 2014
    Posts:
    76
    Cactus_on_Fire, thanks for the great looking foliage. It's one of the best I have seen for Unity this far. Unfortunately the shader does not work correctly with deferred rendering. Could it be anyhow possible to be fixed? It's a bummer, because otherwise this is really great stuff.
     
  34. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    480
    I'm not sure but there might be. I fiddled around until the edges of the foliage turned transparent on forward rendering, but with deferred it just shows the background. You might wanna change the render type and see what it does.
     
  35. Polkatuba

    Polkatuba

    Joined:
    Oct 31, 2014
    Posts:
    76
    It's a bit strange but today all seems to be working ok with deferred. Not sure what has changed.

    EDIT: It seems the issue is related to camera angle. Sometimes strange grey outlines are popping up to the edges of foliage when using deferred.
     
    Last edited: May 5, 2017
  36. JadsonAlmeida

    JadsonAlmeida

    Joined:
    Jan 30, 2014
    Posts:
    7
    You make my life better. <3 hahaha
     
    JamesL98 likes this.
  37. MarkusKer

    MarkusKer

    Joined:
    Jun 7, 2017
    Posts:
    4
    First of all really cool stiff, but my problem is, that if i plant them as trees they cast shadows even if disable cast shadows in the shader? In standalone it works.
     
  38. emreyeni999

    emreyeni999

    Joined:
    Jan 24, 2017
    Posts:
    4
     
  39. JamesL98

    JamesL98

    Joined:
    Oct 9, 2014
    Posts:
    40
    Sorry this is months in reply i haven't looked at this thread for ages, but if you haven't fixed the issue or someone else is having the issue, off the top of my head i believe there is the settings for shadows in the tree editor, you could turn those off or the object itself should have a renderer (again off the top of my head im on the go atm) and you can disable the shadows from there, something like None, double sided, single sided, shadows only. Hope that helps i can have another look when i get home, haven't used this method of grass in a while.
     
  40. BrokenVector

    BrokenVector

    Joined:
    Feb 2, 2017
    Posts:
    32
    Bump on this. Can't seem to figure out a way to add wind bending.
     
  41. JamesL98

    JamesL98

    Joined:
    Oct 9, 2014
    Posts:
    40
    Unity's built in the wind bending into the tree, have a play with the settings in the tree editor and make sure you have a 3D object > Wind Zone in your scene aswell
     
  42. treyce

    treyce

    Joined:
    Dec 21, 2017
    Posts:
    11
    Cactus_on_Fire that's totally awesome! Can't wait to try practicing on making grass. Just need to finish the installation of new tires and forged wheels on buddy's truck before I get the cheque and finally complete my computer build.
     
  43. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    480
    Go for it :)
     
  44. arzezniczak

    arzezniczak

    Joined:
    Feb 19, 2018
    Posts:
    14
    I've just tried to make grass following first post, but I'm stuck at #5 point - I simply can't rotate leaf crossection, when I have selected leaf and rotation mode I don't see that "rotation spheres" (I don't know correct name of them) which you can drag by mouse to rotate objects.
    Anyone got that issue too? Is this a bug or am I doing something wrong?
     
  45. BrokenVector

    BrokenVector

    Joined:
    Feb 2, 2017
    Posts:
    32
    I had that issue too. I think what I did was made a prefab and rotated it and eventually had the cross section vertical. But as soon as I reopened the project it went back to the sideways cross section, so it didn't really work. I eventually gave up and bought an asset.
     
    arzezniczak likes this.
  46. asinghal084

    asinghal084

    Joined:
    Dec 4, 2017
    Posts:
    1
    I had that problem too. I ended up just rotating it manually through the Transform component. If you set the X-axis rotation to 270, it should be upright!
     
    arzezniczak likes this.
  47. ThomasNK

    ThomasNK

    Joined:
    Feb 24, 2017
    Posts:
    1
    I had the same issue, so i upgraded to Unity 2018 and now it works.
    It seems like it only doesnt work in Unity 2017.
     
    sharkapps, arzezniczak and Alverik like this.
  48. arzezniczak

    arzezniczak

    Joined:
    Feb 19, 2018
    Posts:
    14
    Ohhh, nice! In my case I must wait until 2018 goes out of beta, but still - great to hear it's fixed now.
     
  49. ttmmiizz100

    ttmmiizz100

    Joined:
    Mar 16, 2018
    Posts:
    10
    My grass appears sideways for some reason when I do this! Please help!
     
  50. MW_Industries

    MW_Industries

    Joined:
    Jan 20, 2018
    Posts:
    38
    I'm having the same issue. If anyone has a fix for this please place this soon. I really liked this technique. The first time I did it, it worked fine with no problems however, after I tried implementing this technique with other textures, it didn't work.
     
    prof_jerz likes this.