Adding slopes to terrain

Whats the best way to add in the slopes to this?


How it works is I have a 2d array of tile objects, which have x,y,z values for its position in the grid (x,z) and height (y)
The intended outcome is this, something similar to Chris Sawyer’s isometric terrain system.
image
I have 3 different tiles for the slopes, shown as 3 different colours.

There appears to be a discrepancy with the title. Did you actually mean “slopes”?


I think the method to work with this is some logical and procedural works. There are three types of tiles in this:

  • Slopes
  • Squares
  • Air

Imagine the placement system like cells.
Detecting the neighbours of one cell, how many squares or slopes are around it?

Logics:

  • If it’s only one side of square, it’s just one single slope.
  • If it’s two sides of squares in adjacent directions, it’s an inner corner slope.
  • If it’s two sides of squares in opposite directions, it’s a trench of two slopes merged.
  • If it’s two sides of slopes in adjacent directions, it’s a corner slope.
  • Etc.

I’m assuming you’re looking for some kind of system that has an identical function similar to the old Roblox terrain system.