Creating a Heightmap

In this tutorial you will learn how to use COALA to create a height heatmap based on the papermap.

Creating COALA ProjectTags for each Height segment

To be able to give different colors to cells in different heights, we need to create COALA ProjectTags for each height segment.

Creating the node system for the first height segment

Navigate to the “Contexts” section.

Create a new ProjectTag by selecting the plus button.

You should see the node editor with the ProjectTag Result node.

Right click anywhere in the node editor and select Height to create a Height node.

Set up the node as shown below. This is going to be ProjectTag for the smallest height segment,

which will be everything up to 5m for this example (you can of course use smaller or larger height segments to adjust the heightmap to your needs).

Connect the Height node to the ProjectTag Result node.

In the ProjectTag Result node, type in a name for the ProjectTag. In this case, 0m.

Now we can save the node system and return to our ProjectTag overview page.

You should now see your new ProjectTag in the list.

Creating node systems for the other heights

Create a new ProjectTag by clicking the plus button.

Create a new Height node and set it up as shown below.

Connect the Height node to the ProjectTag Result node and call it “50m”.

Save and return to the overview page.

Repeat steps 1-4 for all other height segments, adjusting the Height value and the ProjectTag Result name accordingly. Here is an overview of all the height segments we used:

Adjusting the weight of each ProjectTag

For the heightmap to work properly, we need to make adjustments to the weighting of each ProjectTag.

Go to the Context tab.

In the Weight section adjust the values as shown below.

Important: You need do press Enter after changing a weight value, in order to save it.

To make sure all changes have been applied, go to the Configuration tab and click the Increase button for the ProjectTag version.

Setting up the UE4 project to display height.

Now you need to connect your COALA project to your UE4 project.

Open the paper map from our COALA map plugin.

Take the Coala API Key of the Coala Project you just configured and set it to the map.

(See Setting Your Coala API Key on how to do this)

In the World Outliner select the “BP_Coala_ChildMap2” object to reveal its details.

In the Details tab scroll down to the “Cell” section and delete the 4 existing Render Config Cell entries.

Create a new Render Config Cell entry and add a new Gametag Name entry to it.

Enter the name of the first ProjectTag of the height segments in the Gametag Names entry, in this case 0m.

Create more Render Config Cell entries with Gametag Names for the other height segments and give them each a new material instance with different colors. For this example we went from green to yellow to orange to red.

Assign the MI_CellColor_0m material to the material slot of your ProjectTag entry.

Create a material instance (MI_CellColor_0m) and change its color parameter to a light green.

Create a new material (M_CellColor) with the following setup:

When starting play mode, you should see a heightmap.

Hint: If you want to see more areas at once, increase the “Area Load Buffer” value in the BP_Coala_ChildMap2 object.