basic RTS heightmap design in Unity + Photoshop

One of the things I quickly learned when I wanted to start making maps in RTSengine for Unity was there was a common theme in the RTS games that I yearned for.

In Various Command & Conquers and Age of Empires. they had hills. but more importantly they had plateaus and since it was from a orthographic point of view they needed to be at consistent heights across the board.

So much like my previous RTS Unit icon tutorial I came up with a design workflow that helped recreate this feel. We’ll only be using 2 tools for this. Photoshop and Unity’s Terrain Tools.

1st thing was I needed to decide was minimum height and maximum height on my maps.

To keep things simple this is what u decided to work with:

0 = Bottom Level; .5 = Beach Height; 1= Basic Land; 2= Second Tier; 3= Third Tier

Now this might seem fairly obvious but you can quickly get off the recoverable track if you don’t follow a plan and stick to it.

Step 1.

Unity Likes squares so open Photoshop and make a new canvas of 1024×1024. This is just for the map design you can make it whatever size you want on the actually terrain itself later. You can name it whatever you want.

Step 2.

Since we have 5 height level that’s how many layers we want.

Image 1

Now we also need to set our Color System. Edit -> Color Settings (or if you like Keyboard Shortcuts -> Shift + Ctrl + K)

Set it to Web Graphics Defaults

Image 2

The reason we do this is we want to limit the amount of color possibilities that there actually are available. This is A) Limit our accidental Error and more importantly B) Help use select the correct Grey scale colors.

Image 3

Now we have 6 colors related to the Greyscale that we can use.

Step 3.

Make your Bottom Layer (in my example it was called Layer 1 Bottom) completely Black.

Now you have Set up your Bottom Layer as far and the game engine is concerned.

Now Choose your beach layer and go to Grey just above the black. Select your Layer 2 Beach and draw something. Make sure you draw it on Layer 2 for ease of correcting it later.

Here is what I came up with very quickly while thinking of a 3 person map with visibility constraints while sheltering the base.



Don’t worry if its not perfect. You can either fix it in the layers or just correct it manually in Unity. Realistically this is good enough for now.

Now File -> Save As

I’m going to call mine Crescent_Field

Change the format to Photoshop Raw   <- This is critical!

Image 8

I also recommend these settings:

Image 9

Ignore any warnings. They don’t matter. Only thing that matters is the .raw was created.

Ok, Open Unity for the next step!

Step 4.

Now I’m going to assume you already imported RTS Engine if not, thats fine this will work in general to. Just skip the related SDK aspect.

File -> New Scene

RTS Engine -> Create New Map

Ok, this next step is important because of how Unity treats Terrains.

Expand the Terrain Object in the Hierarchy.

Image 10

Now grab those 3 object and Un-parent them from the Terrain.

Image 11

Now delete that Terrain Object entirely. You need to make a new one.

Game Object -> 3D Object -> Terrain

You can drag those object back under your new Terrain now.

Now we want to import our Raw…

Click on your terrain Then the COG icon on the far right side. Go alllll the way down tot the bottom and Under Heightmap Press the Import Raw Button.

Image 12

Pay careful attention to this part. The Important bits are The Depth if you manually set it. It MUST match. The Width and Height must also match the Raw we saved. Since we set 1024  that is what we are using.

Image 13

You can set the Terrain Size to what ever you want here, except for the Y since we set that to 5 layer we should exercise some restraint here or it will look out of proportion.

I will set my X and Z to 500 and my Y to 30.


Image 14

It came out fairly nice I think!

Step 5.

I recommend you run a smoothing brush over the entire thing at maximum power. Then in moderation try to smooth out the beach to slant into the normal ground level smoothly. I find a 30 degree angle is really good. To test it out simply generate a new navmesh and set the Agent Angle to 30

Image 15

Like so:

Image 16

Step 6.

Just give it some make up now!Image 17

paint it some then add Aquas, a CTS profile an viola!

This only took about 30 minutes. If i wasnt juggling a 1 month old baby, it would have been even faster. Given the proper time and tools these things are pretty easy to make. Everyone like to dis the Unity engine but the terrains turn out just fine. I haven’t even used any camera effects yet.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s