1. Project Setup

Going over the Project Setup for creating a Height Map painter.


In this section of the Height Map Painter How - To, we will go over creating a new level for our project to use.

Project Setup

Before we can start to create and setup the required Actors for the Height Field Painter, we will first need to create and setup a Gamemode Override. In the following section, we will take a look at how this can be accomplished in your project.

If you are working out of the Content Examples map, you can skip this step and use the MyGame game mode. This game mode can be found under Content > Blueprints > MyGame.


Creating a New Game Mode & HUD

In order to see the crosshair that will let the user know where they are shooting, we will need to create and setup new Game Mode and HUD Blueprints. In the following section, we will take a look at how to setup all of this so that it will work with our Height Field Painter.

  1. Right-click in the Content Browser and from the menu in the Create Basic Asset section, click on the Blueprint Class option.


  2. From the Pick Parent Class Window, click on the Game Mode option, naming the new game mode, HighFieldPainterGameMode.


  3. Right-click in the Content Browser again to bring up the Create Basic Asset menu and then click on the Blueprint Class option.


  4. When the Pick Parent Class window is displayed, expand the All Classes option and input HUD into the search box. Look for the HUD option and when located, click on it and then press the Select button to create it.


  5. Name the newly created HUD Blueprint, HeightFieldPainterHUD, and then double-click on the HeightFieldPainterGameMode Blueprint to open it up.


  6. In the Details panel of the HeightFieldPainterGameMode under the Classes section, set the HUD Class to the HeightFieldPainterHUD Blueprint that was just created.


  7. Now, Compile and Save the HeightFieldPainterGameMode Blueprint and then open the HeightFieldPainterHUD Blueprint by double-clicking on it in the Content Browser.


  8. Inside of the HeightFieldPainterHUD Blueprint, go to the Event Graph and copy-paste the following Blueprint code into the graph.

    Copy Node Graph


    Do not forget to Compile and Save your Blueprint so that it can be used.

    This Blueprint code is telling the HUD to draw the specified Material so that it will be centered on the player's screen while the game is running. To see if everything has been setup correctly, press the Play button to run the game and you should now have a crosshair positioned in the center of the screen (as shown in the following image).


    If you don't see a cross hair on the screen, check to make sure that the Material input on the Draw Material node has something inputted into the Material input.


Now that the level and HUD have been created, in the next section we will take a look at what assets need to be created and how to set them up.

Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback