Search Unity

Grid Overlay Projected Onto Terrain

Discussion in 'General Graphics' started by JosBGN, Jun 5, 2022.

  1. JosBGN

    JosBGN

    Joined:
    Dec 3, 2020
    Posts:
    4
    Hiya,

    In a project of mine I’ve got a grid based movement system using Wang Tiles to indicator range borders - I recently came across a game (Druidstone: Secret of the Menhir Forest) that does this effect really well, and also manages to project the range borders onto the ground so it looks like the grid contours the ground.

    Screenshot 2022-06-05 at 16.33.33.png
    Screenshot 2022-06-05 at 16.34.02.png

    Currently thinking I could tessellate or subdivide the quad used to render the wang tile texture, bake a height map from the terrain and then use that to displace the wang tiles in the vertex shader or something like that?

    But just wanted to see if anyone had thoughts on how this might be achieved?

    Cheers!
     
  2. JosBGN

    JosBGN

    Joined:
    Dec 3, 2020
    Posts:
    4
    I've also just realised that literally the post directly below this is asking pretty much the exact same question :oops: (what are the chances!) so feel free to ignore...
     
  3. dandrestor

    dandrestor

    Joined:
    Dec 12, 2015
    Posts:
    1
    Sorry for resurrecting an old thread, do you happen to have a link to that other thread you found, or could you describe how you solved your problem? This thread pops up on Google when searching for "unity terrain overlay".
     
  4. KungFuMonkey

    KungFuMonkey

    Joined:
    Jun 16, 2020
    Posts:
    1