Search Unity

Warped tile maps

Discussion in 'World Building' started by unity_B9Hl2lkooCHApw, Aug 10, 2020.

  1. unity_B9Hl2lkooCHApw

    unity_B9Hl2lkooCHApw

    Joined:
    Apr 19, 2019
    Posts:
    26
    Hello everyone,

    I recently played the Links Awakening remake on the switch and I was in awe of the art style they chose and began to wonder how different things were realized.

    Today I was thinking about how I could implement a warped floor plane that uses tiles. Look at this example from the game I was talking about:
    Screenshot 2020-08-10 at 17.17.03.png

    What would be a good strategy to implement such an inclining floor plane while still using tiled graphics? Even in blender I could not come up with a good solution:

    I) Blender only
    1) Have the flat floor geometry consisting of a quad mesh
    2) Raising and lowering intividual vertices to have a nice slope
    3) Split up the quads
    4) Unwrap all quads, scale and reposition UVs (repeat hundreds of times)

    II) Blender only
    1) Create quads for the individual tiles
    2) Unwrap, scale and reposition UVs to fit on the tile map
    3) Clone tiles and slowly build up the floor plane
    4) Build the slope geometry underneath
    5) Project all the quads onto the slope geometry and delete it (no smooth normals :/)

    III) Blender + Unity + Tiled
    1) Create the slope geometry and save vertex information as a height map
    2) Create the flat floor geometry in Blender
    3) Modify UV coordinates via script to get the texture right
    4) Height-displace the vertices via shader ...

    All methods are far from being convenient and too abstract for level-building ...

    What would be a good approach for this problem?

    BR,

    Andrej
     
  2. unity_B9Hl2lkooCHApw

    unity_B9Hl2lkooCHApw

    Joined:
    Apr 19, 2019
    Posts:
    26
    I think I got a good solution now:
    1) Build geometry
    2) Create tile map using tiled and convert it to a texture (1 px per tile, the value of the red channel stands for the tile index)
    3) Load tiles into a texture array
    4) Sample the index texture to get the texture from the texture array to be drawn
    Screenshot 2020-08-11 at 14.18.25.png
    Screenshot 2020-08-11 at 20.11.51.png Screenshot 2020-08-11 at 20.12.02.png

    BR