As game developers, all of us have our dream game—that one game that excites us and sticks in our minds no matter how many years have passed. For some, that means waiting until another game developer builds something like it, but their version never quite matches up with our own. For most of us, the desire to see this game made and to be able to play it became the catalyst for starting our careers in independent game development. As we build our dreams and pour our heart and souls into the development of games, we still want to compete with the big boys in today's game markets, but we don't have the money for commercial licenses of "triple A" game engines and high-end 3D software packages. That all changed a few years ago when big 3D game engines like Unreal Engine went free for indie developers. Now smaller developers have the same access to high-end tools that larger developers enjoy. These new game engines gave us the ability to build the games of our dreams. However, 3D art programs never really followed suit. Many of the industry standard creation suites, such as Autodesk 3ds Max, still cost thousands of dollars. This changed in 2002 with the creation of the Blender Foundation, a nonprofit organization dedicated to the support of Blender. Blender is an open source 3D creation software that allows small developers like us to use our art in our commercial projects without having to spend tons of money up front. We can finally create the 3D games of our dreams without the stress of having to wonder how we can pay for the tools we need.
And that's why you're here. Maybe you are already an independent developer using the latest version of Unreal Engine 4, but are still only using game assets created by others. Maybe you are a complete novice with your mind filled with amazing digital vistas that need to be created. Either way, this book is for you. Within these pages, we will take a look at how to use Blender and Unreal Engine 4 together to create custom levels and game content for your games.
In this chapter, we will cover the following topics:
Exploring the interface
Customizing your settings
Working with modes
Jumping into our first project
Getting things started in Unreal Engine 4
The first step along our development journey begins at http://www.blender.org, online home of the Blender Foundation. Here you can learn about the history of Blender, connect with their community, access training videos, and more. I encourage you to check out the website when you have time as it has much to offer. For example, every time there is a major update to the software, there is also a release of an animated short film. These films tend to be very entertaining as well as show what the toolset is capable of.
Here's how you download Blender:
Go to http://www.blender.org/.
Click on the button on the right labeled Download Blender 2.76-rc3 (the current version as of this writing):
Blender is a cross-platform software. Select a 64- or 32-bit mirror for your operating system. Most likely, your computer will be 64 bit:
Click on the Installer once it has finished downloading.
Follow the installation prompts. They are pretty straightforward and do not need additional configuration.
When you run Blender, you are greeted by the splash screen. A list of files you have worked on recently will be listed on the left, as well as some quick links to various things, such as the documentation and the website. Click in the space to either side of the splash screen to remove it. Now let's take a look at the default scene.
Blender starts you off with three basic objects in the scene already: a cube, a light, and a camera, as shown in the following screenshot:
We can rotate our point of view around the center by holding the middle mouse button (MMB). We can slide our view by holding Shift + MMB and zoom it using the mouse wheel or + and - on the number pad. Lastly, the number pad can also be used to view specific angles of your object.
Now let's take a look at the menus:
All of the preceding options have several functions. We will discuss them briefly here and more as we continue with the project:
Menu Bar: This contains the File, Render, Window, Help, Scene Layout drop-down, Browse Scene drop-down, and the Render Engine drop-down options. For the most part, we will use the File menu to save, load, change user preferences, export our files, and exit the program.
Tools Panel: This contains most of our functions that we will use to edit our shapes and mold our creations.
Animation Timeline: We will use this later to manage our animated game asset.
Properties: We will use the panel frequently to edit the properties of our scene, add modifiers, and more.
Scene Properties: This contains a few specific functions that pertain to items in the scene, such as scale.
Scene Outliner: This is a convenient list of every object in our scene and is handy if you can't find a specific object visually. Unreal Engine has one of these as well.
Without customizing some of your settings, working with Blender can be a bit of a chore, especially if you have any experience with another 3D software. When we started moving around the interface a bit, you may have noticed right away that if you left-click, it moves the little bullseye cursor. This is called the 3D cursor and it is actually used for a lot of things within Blender, such as where to place new 3D shapes. Now, moving this when you left-click is less than ideal and is sometimes easily forgotten as you attempt to select things in your 3D scene, but there is a way to change that.
In the top-left corner of the screen, click on File and select User Preferences. Select the Input tab and look down along the left-hand side until you see the Select With option. You can see that it's currently set to right-click to select objects. Let's change that to Left to bring it more in line with Unreal Engine 4. It stops a lot of confusion later when you are going between the two programs. Be sure to click on the Save User Settings button at the bottom left corner once you have made this change. The second setting that needs to be changed involves scale.
The following screenshot shows the Blender User Preferences window:
To change this next setting, we are going to take a look at the Properties pane. The window looks something like this:
This pane allows us to change several options pertaining to the scene, such as the scale. Unreal Engine 4 uses centimeters as its default measurement, so we want to match that here. This will make our game assets fit into our levels without the need to scale them in the game engine. Follow these steps:
Change the units used from None to Metric.
Change the scale to
Objects already in the scene (such as our cube) will not scale. If there is anything you would like to keep, scale it by
100. This can be done by clicking on the Scale button on the left hand side, typing
100, and pressing Enter.
This will cause the object to start clipping through the edge of the grid. To fix this, we press N to open the Scene Properties bar, find the View section, then the Clip section, and lastly, change the End property to
Hint: Certain objects dropped in through the Add menu will not be scaled appropriately. Scaling these objects by 100 will fix the issue.
It contains the View, Select, Add, and Object menus. It also contains the modes drop-down. We will use many different modes throughout this book, but we will spend most of our time in the Edit mode. This mode allows us to push and pull basic shapes into our new creations. Blender allows us to switch between Object mode (the default mode) and Edit mode fairly easily by pressing Tab. This will only work if you have an object that can be edited selected in the scene. You will notice that many of the menus change when you change modes. We will explore this more when we create our first object in Chapter 3, It's Time to Customize!.
Hint: It may seem like I am skipping a bunch of information. Blender's menus contain way more than I can explain in one chapter of this book and I don't want to bog you down with unnecessary information. If you are curious, check out Blender 3D Basics Beginner's Guide, Second Edition, by Gordon Fisher, for a more complete description.
This book is broken into two projects that will have us creating custom game assets in Blender and adding them to levels built in Unreal Engine 4. The first project will be a basic level that I have taught many students to create over my 10 years of teaching experience: two rooms connected by a hallway with some stairs, doors that function, and an elevator. Though the level itself is not complicated, we will walk through the entire design process from idea, to prototype, to the final product. We will then use this same process to design a more complex level later in this book. The levels themselves will be created with a science fiction horror theme in mind. Having a theme will unite the two levels and give us an art style to work with when the time comes to design custom level assets.
So how do you design a level from scratch? Our process will follow a few distinct steps:
Every good thing starts on paper. Artists start ideas with sketches. Architects have blueprints. Level designers start their levels with map sketches. I recommend graph paper. We will start our custom game assets with sketches as well.
Begin laying out the level using basic shapes in your level editor. Script gameplay sequences. Test the level to see if the layout works for the player. This is called white boxing, or boxing out your level. It is essentially a level prototype.
Once your white box level is where you would like it, use the blocked out sizes to begin creating and adding game assets. This allows us to make assets in Blender that are of the correct size and fill the correct space in our level.
Add in your game assets, adjust lighting, and add special effects.
Don't forget to playtest and gather the opinions of your players every step of the way!
Now let's get our project started in Unreal Engine 4.
Before we get started with Unreal, make sure that you have installed the Epic Games Launcher. This is available for free at https://www.UnrealEngine.com/ and can be downloaded by clicking on the Get Unreal button located at the top right-hand corner of the page. You will be asked to create an account and the launcher will ask for this information when you run it.
Next, click on the Library button along the left-hand side of the screen. In the section labeled Engine versions, click on Launch on version 4.9.2 (the latest version as of this writing). If there are no engines visible, select Add Versions and follow the prompts:
Once the engine has loaded, you will be presented with all of the projects you have been working on. For this one, let's start a new project. Click on the New Project tab at the top, as shown in the following screenshot:
At this point, Unreal provides you with a few choices. The engine comes with many free starter projects to get you started on a number of different types of projects. For our projects, we will use the First Person starter project. Make sure that the Starter Content button says With Starter Content and give the project a unique name with no spaces. When you are all set, click on Create Project, down in the bottom right. Unreal Engine 4 will load and we will be all set to start our level.
Throughout this chapter, you took a look at the tools you will use to bring our level idea to life. Blender is a freely available open source creation suite that supports the entire asset development process. Created using the Python programming language, Blender is flexible enough to run on almost any machine and is entirely cross-platform; it runs in Windows, Mac, or Linux. Next, you took a look at the design process you will use and how Blender and Unreal Engine 4 plug into it. Lastly, you set up Unreal to begin our first project. As you move to the next chapter, you will build your first level that will play host to your first original game asset. Can you feel the excitement!?