Floating Islands
Last updated
Last updated
Written by James Kelly(Twitter)
In this Tutorial I will be running through how I was able to generating floating islands that look like this:
You will need Susbstance Player and an SDF Generator for creating the base shape of our island.
Substance Player (Free)
SDF Generator (Free)
Some way of generating a B&W mask - I will be using Photoshop.
First off, we need to create an image to define the shape of our island!
1. I started off by making a simple circle.
2. Then applying a "Wave" filter to it.
3. Next we open the SDF Generator in Substance Player and drag in our image. It is important to use the Scale value to ensure that our distance field does not reach the extents of the image.
[1](https://imgur.com/Gui6I1A)
You can stick with the default settings which will result in our island coming to a point on either side or increase the Inner Distance value to create a Plateau.
In the graph we create later we can also control steepness, so while the SDF may make the island come to a point on top, we can lower the steepness to flatten the top.
See the Voxel Graph Previews here: Default Settings Plateau
4. You will notice that the SDF Generator gives you 3 images suffixed as _Inner, _Outer and _Merged. The image we need is _Merged. Next we import our image as a Voxel Heightmap asset. See How to import a Heightmap.
Our island shape is done and imported! Now we just have to make the Voxel Graph.
If you are unfamiliar with using Voxel Graphs, please read the Voxel Graph Quick Start.
1. First we need to set up some base parameters.
Do note that Heightmap Size can be defined by using a separate heightmap sampler - which also allows you to seperate the X and Y size - but we'll stick to this method for simplicity. Just make sure that the image you're using is square and all will be well!
2. Next we need to sample our heightmap and prepare some local variables we can use elsewhere in our graph.
The math we are doing on the X and Y values going into our Heightmap Sampler ensure that our island is centered and allows us to change the overall size of our island. (There is an upcoming change to this node which exposes a centered boolean which negates the need for us to manually add half our textures resolution to the X and Y values.
3. To create the top part of our island we need to create a box that shares the same X and Y size as our heightmap and add it to our Heightmap Top variable. We then subtract a flat world from it that sits just below where the start of our bottom part would be. Separating the top like this is integral to achieving the look of hills on top of our island vs the craggy rock on the bottom.
Here is the result of what we have done so far:
4. To create the bottom part of our island, we do the same as step 3 except we add the box to our Heightmap Bottom variable and flip the flat world upside down.
5. Now we merge our Island Top and Island Bottom with a Smooth Union node.
Now if we reduce our Top Steepness to 0.1 but keep our Bottom Steepness at 1.0 we get a result that looks like this:
We now have what is beginning to look like a floating island!
In this section we're going to add noise to our island to make it look more natural. You can tweak the noise we input here to your own liking or use totally different noises from what I use, I am just showing what noise settings I used to achieve the look I was going for. Feel free to experiment with how we blend the noise too, in this example I am maxing it to prevent any unwanted overhangs and adding it to achieve higher hills/mountains in the center of the island.
1. Lets start by adding some hills to the top of our island. We'll do this by adding a simple 2D Perlin Noise.
1.1 If you don't like the look of of the clipped hills on top, you can use the Heightmap Mask variable we defined earlier in the Max (float) input to produce a different result.
2.
Next we add some distortion to the coordinates of the Box SDF that makes up the bottom part of our island to make the shape less uniform and more natural.
3.
And now for the finishing touches - we add some 2D IQ Noise to the bottom part of our island to make it a bit more rocky and craggy.
And we're done! I hope you found this tutorial useful. If you come up with any cool looking floating islands or use this example in your own project, please reach out to me on Twitter @jkelly206 so I can marvel at your work!
The map you provide doesn't need to be a solid shape, you can draw multiple islands in the one image. I just used a simple, single island image at 512px for this demo, the first image I made ended up looking like this!