Floating Island – Part 1

I’ve decided to deviate from the path I was following, learning proceedural generation by ProjectSalt’s example. With that I’ve begun turning this into an actual game because I thought it was fun to work with and I have a decent idea for where to go with it.

Without further ado, the next step is making floating islands! It’s a big step up from having basic heightmap terrain islands on ground level because a floating island demands more interesting geometry, not to mention we now need some form of bottom that can be viewed from down below. Now you might imagine that we could still use the single plane approach from the ground islands and simply have clouds around it to disguise the hollow bottom, but my vision extends beyond that, which is also why I cut this step into several parts.

My first step was to do what I do on ground level and just elevate the new islands.

Bunch of underlying code reworks to make new type of island and dedicate a whole new grid to the floating islands so that they can appear on their own without ground island interference.

Next step is to create a suitable bottom for our island, which can be done with close to the same steps as when creating a normal island, but instead of using randomness to create height we’ll be taking control instead. Make another island the same size as the floating one and extrude the vertices downwards the closer they are to the center of the island. Make sure to flip the triangle directions because we’re technically looking at the inside of the mesh and not the surface. If we also add the round island mask for our normal islands we’ll get a rounded bottom that snugly fits the circular shape of our island.

So now we have an ugly square floating island. Before we could get away with not cutting the edges of the ground islands because our water covers that anyway so it wasn’t really an issue, but now that we have a floating island the sharp rectangle edges are a huge eyesore, so let’s start the cutting process and make this a nice smooth round-edged island instead.

The approach I’ll use is identifying parts to cut away with the island mask. Black in the mask represents parts that should be cut away. Since I’m using a round mask the cutaway becomes a lovely circle shape.

In order to make more interesting cutaway shapes we could modify the round island mask with noise. Make sure the bottom also uses the same noise values so there’s not a disconnect between the island and bottom. I never did arrive at an interesting difference in the cutaway shape, not interesting enough at least, so I decided to grow a bit more bold and cut away all triangles that went below height=0 in model space. Vice versa for the bottom. This left me with some gaps into the island but much more interesting cutting patterns for the islands. Patching up the triangle gaps by making new triangles that was based by the cutaway triangles but instead capped at height=0.

I left the edge triangles in constrast with the island itself to see where they were cut and patched. It’s a little bit patchy and what not, but significatly more interesting then the timid circle shape we had before.

This will have to do for now for this part, but rest assured we’ll be revisiting the issue of the floating islands in the future.