Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Best terrain & vegetation asset/shader

Discussion in 'General Graphics' started by VavylonaEntertainment, Feb 28, 2018.

  1. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    To those who have used these types of assets,what is the best way to make my terrain look as realistic as possible? Including trees and grass although those are going to need different shaders.
     
  2. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    894
    I am currently writing a decent foliage shader for the trees and grass, when finished (couple weeks) ill post a link here to the github :) you and everyone is free to use it when posted

    will post pics soon.
     
  3. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    Waiting for pics man, most 'realistic' foliage shaders in asset store are just scams, only one or two actually look real.
     
  4. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    894
    Thats not true, if used properly many of the store shaders are more than realistic, with some offering some very advanced SSS solutions . If you believe that the asset store ones are "scams", mine will be in no way superior. Make no mistake, a lot of the asset store shaders have taken years to make and are extremely advanced.



    Are you sure you are setting up your lighting and graphical settings properly for your projects? You would be surprised how different the results the same shader will produce with different lighting setups etc

    It also matters about the quality of the shader inputs. If you are using low res or garbage textures, it will produce similar results. The same can be said for all the shader inputs, often very specific settings are required and those can only be ascertained from the asset documentation/author/support.

    Head over to mega scans and get some decent PBR textures that were made for a foliage shader of advanced quality (you need extra mappings like thickness etc, and those maps need to be high quality or the effect will be of lower quality), and then slot those into the shaders, set up your lighting properly and you will have very realistic looking foliage for almost no effort. Anything more will require you to learn to write shaders because unfortunately, a generic solution will never be as good as a custom one tailored specifically for your game/project/use case.
     
  5. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    I used most of the packages unmodified and still could see how flat the textures looked. It was just not the "realistic" they sell. Then again maybe i have to setup it manually.

    Post-stack ambient did some difference creating something around the leaves but still.

    What do you have to tell me about lighting? Im gonna try megascans and see if there is deference.
     
  6. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    894

    Have you not tried this:

    https://assetstore.unity.com/packages/vfx/shaders/subsurface-scattering-shader-3254

    Thats just one example of a SSS shader. its cheap, and if you put decent textures in you can get a variety of quality results, ranging from terrible to downright realistic.

    You need to add the correct inputs, if your textures looked "flat" you obviously have not provided the correct maps such as thickness etc.

    For a decent foliage shader you will need following effects and possible maps for those effects at minimum:

    Sub surface scattering : thickness map - almost most important
    Wind vertex displacement : displacement map
    PBR basics - metallic, roughness, albedo, normal
    Global illumination - if possible using global illumination will work well
    Realtime shadows

    The quality and resolution of the inputs will determine what quality and therefore realism you get in the final result.

    Megascans will set you up with some decent quality maps, but getting a good SSS effect is a must for the foliage to feel like foliage

    EDIT: for lighting look at lighting box on the asset store to set up almost perfect lights automagically
     
  7. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    Thanks alot man, i thought SS shader was for objects like candles maybe lambs etc. I had no clue it can be used for vegetation.

    About lighting box i see many negative reviews but unity's lighting system is S*** and nevertheless seems something new and says it contains some foliage shaders itself so im gonna try that too. I see many scenes though with ground full of grass but supposedly no low fps, is there some special technique?

    I think megascans is more than decent, the highest quality atm actually. About all these you wrote (displacement, thickness etc) i havent met any of these names in shader slots, is there any source i can get more info?
     
    Last edited: Mar 8, 2018
    GameDevCouple_I likes this.
  8. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    894
    No problem!

    Unfortunately there are not any resources I know of that explain all the maps.

    However you can learn about some of the maps from the substance documentation:

    https://support.allegorithmic.com/documentation/display/SPDOC/Baker+List

    As for displacement map, its used to move vertex about (like wind movement or water movement etc)

    If you get a good SSS effect (which requires a thickness map to determine where to scatter light at what amounts) combined with standard shader (albedo, normal, roughness and metallic) and megascans foliage textures, you will have an amazing foliage look ;)


    EDIT: https://assetstore.unity.com/packag...ghting-box-2-next-gen-lighting-solution-93057
     
  9. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    Hey man, i got 2 more questions for you.

    I contacted the SSS author and told me that it is not designed for vegetation. What do you have in mind?

    And what is tesselation shaders?
     
  10. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,704
    The most important part of the the foliage and trees is the Texture quality. Some textures looks very realistic and some others looks very bad
    Here you can see unity's lighting demo grass texture :
    photo_2018-03-11_11-31-19.jpg

    Foliage only needs Ambient occlusion effect from post effects to looks beautiful (fake shadows)




    Another beautiful texture :

    Bad reviews are for Import errors
     
  11. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,704





    AO Effect:


    This is Unity:




    More Images:




     
    Last edited: Mar 11, 2018
  12. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    Thank you man, those three of your samples is the closest to the quality im looking for:





    Is it only about the textures/lights/ambient or something more? Also how did they do the foggy effect on the first image?
     
  13. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,704
    Download Lighting Box 2 and watch the video play list (specially 2.7 video playlist) :
    Play List VIdeos LB2.7
    Tree Creator Tutorials
     
  14. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    Can we get close to the Book of the Dead graphics? In that video i saw the grass moving realistically (only the top part) instead for moving the whole texture. Maybe they were 3d?
     
  15. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    894
    you would want SSS then for that, try any SSS itll be better than no SSS
     
  16. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,704
    All grass solutions are 3d
    You must create custom shaders for better grass rendering and wind support
    There are a lot of the wind shader algorithms in the net
    photo_2018-03-12_02-37-30.jpg
     
  17. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,704
    You can find grass model from Nature sample scene:
    Lighting Box Grass Shader + Wind:
    ScreenShotScreenShot10.jpg

    ScreenShotScreenShot10.jpg ScreenShotScreenShot11.jpg ScreenShotScreenShot13.jpg ScreenShotScreenShot14.jpg ScreenShotScreenShot15.jpg
     
  18. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,704
  19. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    How is SSS used on foliage? On the bark or the leaves/grass?

    By 3d i mean mesh not textures. How can i make meshes move with the wind?
     
  20. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,704
    You can use Wind effect in shader code (vertex shader)
    3D grass is an plane with grass texture
     
  21. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    894
    just bake thickness map for the model and slot it into the thickness slot on the SSS shader, same way SSS is used on anything
     
  22. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    In the Book of the Dead you can see the grass moving in real 3d not plane. It looks like its a mesh and only thje top part is moved by the wind.

    Imma try and post an image
     
    GameDevCouple_I likes this.
  23. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    894
    Yes thats a vertex shader. I feel you are either overthinking this or not understanding the advice we are giving.

    Try a vertex displacement effect coupled with some standard PBR coupled with SSS and decent lighting as a starting point, and only AFTER that come back and say what about XYZ. Right now your assuming issues might come up or it wont look like X but you dont even know what results your going to get.

    EDIT: plane or mesh it doesnt matter its still a displacement effect

    Great, look forward to it :) will offer advice on where to go next once you have!
     
  24. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
  25. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,704
    It's not only 1 plane with 2 triangles. An 3D grass is a collection of the mi-poly planes

    To have very realistic wind mode you can use speed tree
     
  26. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    Where do i get their wind system? Is it included in some pack of theirs?
     
  27. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,704
    Tools->Wind Wizard

    Also you can change the wind from SpeedTree shader inside unity
     
  28. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    Hey guys, i found exactly what i was looking for to show you. Its what i have in mind (graphics quality):

    https://drive.google.com/file/d/1lLN4lPfYFkp0cX4krOcw0RHD5f237lJy/view

    It uses layered materials (photogrammetry + classic texturing) through the HDRP in Unity 2018.1 to bring this quality playable to the mainstream computer. In their project they use a new shader (LayeredLit) that does the layering combined with all other elements (post-process, lighting etc).

    I just don't know yet what other maps the materials have (normal, height, ao, displacement?) etc. I'm gonna examine a bit now.
     
  29. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    133
    It seems that LayerLit is used for props like rocks and just Lit for foliage. I have no further idea what happens in there, i havent used such a complex shader again.


     
  30. holyfot

    holyfot

    Joined:
    Dec 16, 2016
    Posts:
    5