Search Unity

HDRP Terrain Tesselation

Discussion in 'World Building' started by ZanderRBG, Mar 18, 2019.

  1. ZanderRBG

    ZanderRBG

    Joined:
    Aug 8, 2013
    Posts:
    8
    Has anyone found any workarounds or custom shaders to allow for tessellation? I found a custom shader for grass and details (Thanks to the creator of that gem), but tessellation is still heavily needed in my scene to prevent the ground from looking extremely flat (even with normals and heightmaps, if you can believe it).
     
  2. hunz

    hunz

    Joined:
    Oct 16, 2012
    Posts:
    17
    I've got the same question as Zander so a little bump here :D.

    Also Zander would you mind sharing a link to the Grass / Details shader?

    Thank you!
     
  3. Boopbideebop

    Boopbideebop

    Joined:
    Oct 31, 2017
    Posts:
    5
    I also have this question!
     
  4. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    297
    I actually think HDRP terrain shaders should use tessellation by default....

    I mean...it is HDRP afterall.
     
    Phoenix116 and TerraUnity like this.
  5. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    840
    That causes only problems. You don't want to have your characters foot inside a tesselated stone by default ;)
     
  6. TerraUnity

    TerraUnity

    Joined:
    Aug 3, 2012
    Posts:
    721
  7. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    297
    it is 2019...and non tesellated terrain, no matter what you do with it, looks really old... :)
     
    Phoenix116 likes this.
  8. Boopbideebop

    Boopbideebop

    Joined:
    Oct 31, 2017
    Posts:
    5
    I found a solution to the problem... sort of :/ I can get tessellation to work on a terrain with a modified version of HDRP that I got from "the book of the dead environment". It's really hard to explain so instead I will tell you how I found it.

    This might take a bit but it looks GORGEOUS and has so much potential.

    Step 1) Use unity 2018.4 and make a normal 3D project (non-HDRP)

    Step 2) Download the book of the dead asset (this will take a while but it's worth it)

    Step 3) In DepthOfFieldAutoFocus.cs change lines 53 & 57 to [UnityEngine.Rendering.PostProcessing.Min(0.1f)]

    Step 4) Restart Unity

    Step 5) Click "Load Book of the dead"

    Step 6) Locate the terrain inside the scene

    Step 7) Go to the terrain settings

    Step 8) Find "Custom Material" and notice that they are using not a HDTerrain material but a HighDefinitionRenderPipeline/layeredlit material

    Step 9) Make your own HighDefinitionRenderPipeline/layeredLitTessellation material with the same settings as the HighDefinitionRenderPipeline/layeredlit material (remember to check the bottom checkbox under Advanced Options)

    Step 10) Done, you now have 4 textures that can have individual tessellation levels (if you want to run the game with tessellation, make sure to decrease the start/end fade distance of the tessellation since its extremely computer intensive)

    This is as far as I've gotten but I'm seriously disappointed that unity is keeping this WORKING technology from us. They know how the system works and now we also know they know how to make it work. So why cant they officially implement it? It would be such a huge upgrade to what we currently have. And while you're at it (which your most definitely not) please let us use more than 4 textures when using the layered lit material. At this point I hope some random godsent solo unity enthusiasts finds this interesting and implements his own version.

    RANT OVER
     
  9. Boopbideebop

    Boopbideebop

    Joined:
    Oct 31, 2017
    Posts:
    5
    Finally found a tutorial that explains this "hack" and how to implement it yourself in HDRP.

     
    Phoenix116 likes this.