Search Unity

Question Texture from shader Graph to terrain as a heightmap?

Discussion in 'Shader Graph' started by exe2k, Jun 28, 2022.

  1. exe2k

    exe2k

    Joined:
    Oct 26, 2015
    Posts:
    63
    I want to get a result of blending and use it as a heightmap for a Terrain. How to make it possible?


     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    I used terrain 0 times in my life, but assuming you can set any splatmap you want, you could just put quad on scene with material using your noise texture, then take a shot with ortographic camera (of this quad only as unlit) and save it as texture.
     
  3. exe2k

    exe2k

    Joined:
    Oct 26, 2015
    Posts:
    63
    I tried this Camera-to-Texture hack but I got this texture affected by the directional light and it become non-black and white but sort of yellow). Ok if I forget about the terrain itself, how can I generate it then from a shader?
     
  4. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    Then as I said: use unlit shader (and disable post processing volume for this camera).
    I don't know terrain API, so can't help you with that, you need to check docs or tutorials on youtube - there should be plenty.