386 Game Development and Simulation with Unreal Technology
we will export its Heightmap to a Heightmap PNG file. Once we have setup the
Heightmap , we will delete our landscape and impo rt it from the Heightmap file.
FIGURE 7.4: Creating a Blank Project for Landscape Tutorials.
FIND ON THE WEBSITE
To find updates to this tutorial and upda te d instructions about its implementa-
tion on othe r UE4 versions, p le ase visit the books companion Website at:
http://www.RVRLAB.com/UE4Book/
TUTORIAL 7.1 Creating Your First Landscape
In this tutorial we will first create a new landscape. The n, we will expo rt its
Heightmap and recreate it from the Heightmap.
CREATE A BLANK PROJECT
First, let us c reate an empty proje ct. By now yo u should be familiar with creat-
ing project, but if this is the first chapter you have picked up , follow these steps
to create a blank project:
Terrains and Landscapes in Un real Engine 387
1. Open the Unreal Launcher a nd select the version of the engine you would like to
work with. The following tutorial is created with Unreal Engine 4.5.1.
2. Once the Editor Op ens, c hoose New Project (see Figure 7.4).
3. Select the B lueprint as you r project ty pe, and make sure that the Blank is se-
lected.
4. Select your platform (D esktop/Console) and your graphics quality.
5. Make sure you include the starter content (see Figure 7.4).
6. Give your project a name and click Create Project.
CREATING A MAP AND ORGANIZING ASSETS
You will notice that the Advanced_Lighting map is op en. We would like to
create our own map as we will populate it through the tutorials in this chapter.
Take the following steps to organize yo ur create d maps and assets:
7. In the Game folder create a new fo lder. To do this, select the Ga m e folder. Then,
either Right- click and select New F older or simply click on New icon in the
content browser and choose Ne w Folder.
8. Name th is folder something like Ma ps.
9. Double click on the Maps folder you ju st crea te d to open it.
10. Click on the New asset icon and select New Level to create your new map.
11. Rename this level to Outdoors . You can do this by pressing the F2 key while
having the map selected. (Maps in the content browser are orange icons with the
word Level on their thumbnail).
12. Double click on the level to open it up.
You will notice that your level is empty. Which means that it is literally empty
no lights, or sky sphere, o r sounds. We w ill make some changes and popu la te the
level to at least be able to see things. That means adding a Directional Light
and a Sky Sphere blueprint to the level. To do this, perfo rm the following tasks:
13. Under the Modes Panel (the upper left corner of the Unreal Editor) click on the
Search classes and search of BP_Sky_Sphere to look for the Sky Sphere
class.
14. Drag the BP_Sky_Sphere class into the level to place an instance of this o bject
into your level.
15. Click on the Sky Sphere Actor in th e Scene Outliner (the upper right corner of
the Unreal Editor). Press F2 to rename the ac tor to LevelSkySpher e.
16. Move the Sky Sphere to (0,0,0) in the world by typing these numbers into its
Location in the Details rollout (the lower right co rner of the Unreal Editor).
17. Under the Modes Panel, click on the Search classes and searc h of Direc-
tional_Light to look for the Directional Light class.
18. Drag a copy of the Directio nal_Light and place it in the level.
19. Click on the Light and press F2 to rename it to LevelD irectionalLight. Move
it to (0,0, 100) by typing these numbers in the Location section of the Deta ils
rollout.
388 Game Development and Simulation with Unreal Technology
FIGURE 7.5: Sky Sphere in the Level.
20. Now, we need to assign this light to the directional light of the Sky_Sphere. To
do this, click on the LevelSkySphere, and open its Directional Light Actor
drop- down box in its Deta ils rollout.
21. In the drop-down, select the LevelDirectionalLight you just create d.
22. Again, under the Modes Panel, click on the Search classes and search of
Player Start to look for the Directional Light class. Alternatively, you can click
on Basic tab to access the Player Start.
23. Drag a copy of the Player Start and place it in the level.
24. Click on the Light and press F2 to rename it to LevelPlay erStart. Move it to
(0,0,200) by typing these numbers in the Location section of the Details rollout.
25. Save your level and progress so far. Your level shou ld look like Figure 7.5.
CREATE A LANDSCAPE
Now, with our Sky Sph ere set up, and the directional light assigned, it is time to
create a landscape.
26. In the Modes Panel, click on the Landscape Tool (The Mo untain Icon) to se-
lect the tool. You can alternatively press Shift+ 3 on your keyboard to select the
Landscape Tool.
Terrains and Landscapes in Un real Engine 389
FIGURE 7.6: New Landscape Placed in the Level.
27. In the Manage section of the Landscape tool make sure Create New radio but-
ton is selected. Use the following pr operties to create your landscape, and leave
everything else as default.
Location: (0,0,-200)
Size Sect ion: 15 × 15 Quads
Section Per Component: 2 × 2 Section
Number of Components: 4 × 4
Overall Resolution: 121 × 121
28. You will notice that the Landscap e tool is now in Sculp t mode. Your Level should
look like Figure 7.6.
SCULPT YOUR LANDSCAPE
We will now make some very basic e dits to our brand new landscape to create
some hills and valleys.
29. Zoom out a little in your editor to get a good view of your landscape. Note: Make
sure you do not accidentally Left-click on the landscape.
30. Once you have a good view of your landscape from afar, you can start editin g the
landscape. The following ac tions will pe rform the minor edits we intend to do.
Left-Click: Raises the landscap e up to create hills.
Shift + Left-Click: Lowers the landscape to c reate valleys.
31. Change the Bru sh Size to 2048.
32. Change the Bru sh Falloff to 0.5.
33. Change the Tool Strength to 0.3.
34. Now, sculpt your landscape by left-clickin g an d dragging the mouse over the land-
scape to create hills, or by holding the Shift key and left-clicking while dragging
the mouse over the landscape to create valleys.
390 Game Development and Simulation with Unreal Technology
FIGURE 7.7: The View of a Sculpted L andscape from Afar.
35. Feel free to change your brush parameters such as its size, falloff, and strength.
36. Once you are satisfied with the look of your landscape you may build your ligh ting
and save your level and progress.
37. My sculpted land scape looks like Figure 7.7.
What Happened in TUTORIAL 7.1. . .
You just set up a blank project, cr eated an empty level and populate it with essen-
tial assets and a landscape.
CREATE A BLANK PROJECT
In this section you created an empty project. N othing exciting happ ened here.
We just made sure that our pr oject is a Blueprint project and that it contains the
starter contents.
CREATING A MAP AND ORGANIZING ASSETS
In th is section we just added a new folder to our Game folder and pla ced our n ew
level there for organizational purposes. We will make another level in w hich we
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.124.145