Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Feature Request Shader Graph for custom Terrain Shader ?

Discussion in 'Shader Graph' started by Luuke, Mar 10, 2020.

  1. Luuke

    Luuke

    Joined:
    Jan 18, 2017
    Posts:
    11
    Hey everyone,

    I hope that I picked the right thread here and that my question is not redundant.
    My question is weather it is possible to build custom Terrain shaders that work with unitys Terrain system using the Shader Graph Tool. I searched around the internet for a while now and couldnt really find positive answers for this.
    I would like to implement some height based blending and triplanar mapping for my terrain AND use unitys terrain system.
    If it is not possible with Shader Graph, why is it not ? What are the things to concider with terrain shaders ?

    Thanks in andvance

    Lucas
     
  2. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    319
    i think you can use shader graph to generate terrain-compatiable shaders, espcially by using custom function nodes in shader graph.. you need to check up/ Explore functions used in unity's shaders libraries so you can call them in your shader function and read that data so you can blend/apply your textures in your shader graph shader..

    for example this is a terrain shader in URP: https://github.com/Unity-Technologi...l/Shaders/Terrain/TerrainLitBasemapGen.shader

    you need to see how unity terrain shaders work, apparently they are using splatmaps, so you need to know which functions are being called obtain splatmaps then replicate that effect in shader graph then add your own stuff as well..
     
    Luuke likes this.
  3. ArthyShow

    ArthyShow

    Joined:
    Aug 6, 2016
    Posts:
    13
    Do we have an ETA (or a task on a road-map) for this feature?? Shader-Graph are here since end-2017 and Terrain even more...
     
  4. Fressbrett

    Fressbrett

    Joined:
    Apr 11, 2018
    Posts:
    34
    I would too like this. Waaay too complicated creating terrain shaders with ShaderGraph. I just want a triplanar terrain shader, and can't get it to work :/
     
  5. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    551
    Fressbrett likes this.
  6. Fressbrett

    Fressbrett

    Joined:
    Apr 11, 2018
    Posts:
    34
    boy, the URP is a mess :( thanks for your input though
     
  7. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    551
    Well, in Unity, many things are not achievable out of the box (terrain, water, foliage, etc.) or are very limited, not performent or not good looking. You need either to buy a lot of good asset from the store or have a very good graphic programmer on your side. That's my experience so far. Unless you are an allround talent. Nevertheless custom solutions are in most cases needed and this is not easy. :)
     
    Last edited: Jul 22, 2020
    ArthyShow likes this.
  8. Fressbrett

    Fressbrett

    Joined:
    Apr 11, 2018
    Posts:
    34
    True. I just wish the URP were documented a bit more thoroughly, digging into the repo often feels like shooting into the dark. For anyone interested, the URP Terrain shaders are here
     
    kcorrallo1 likes this.
  9. Juvennn

    Juvennn

    Joined:
    Apr 21, 2020
    Posts:
    1
    Hi i wrote a terrain shader with shader graph.


    https://github.com/Gnarly-Games/CustomTerrainShader
     
    meg97 likes this.
  10. JJRivers

    JJRivers

    Joined:
    Oct 16, 2018
    Posts:
    17
unityunity