You see how easy it is to create and texture a terrain in the SDK—but you can of course achieve the same with hand-drawn textures and hand-written Java code.
First, we create a heightmap for our terrain by performing the following steps:
Create a grayscale PNG image in a graphic editor of your choice. The size must be a square power of two; for example, 512 px x 512 px.
Use a spray or brush tool to outline the terrain's elevation in grayscales, where white represents high and black low.
Save the heightmap as
assets/Textures/Terrain/heightmap.png
.
Next, we draw the alphamap that specifies where the grass, rock, and road textures go.
Create an empty 32-bit RGBA color image. The size must be a square power of two; for example, 512 px x 512 px.
Open
assets/Textures/Terrain/heightmap.png
, copy its content, and paste it into your empty RGB image. We want to use the heightmap as a template for the alphamap.Choose a wide brush and paint over the heightmap as shown...