3D Game Design with Unreal Engine 4 and Blender

4.4 (7 reviews total)
By Justin Plowman
    Advance your knowledge in tech with a Packt subscription

  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Unreal, My Friend, I'd Like You to Meet Blender

About this book

Unreal Engine 4 now has support for Blender, which was not available in earlier versions. This has opened up new possibilities and that is where this book comes in. This is the first book in the market combining these two powerful game and graphic engines. Readers will build an amazing high-level game environment with UE4 and will show them how to use the power of Blender 3D to create stunning animations and 3D effects for their game. This book will start with creating levels, 3D assets for the game, game progression, light and environment control, animation, and so on. Then it will teach readers to add amazing visual effects to their game by applying rendering, lighting, rigging, and compositing techniques in Blender. Finally, readers will learn how to smoothly transfer blender files to UE4 and animate the game assets. Each chapter will add complexities to the game environment.

Publication date:
June 2016
Publisher
Packt
Pages
252
ISBN
9781785881466

 

Chapter 1. Unreal, My Friend, I'd Like You to Meet Blender

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:

  • Installing Blender

  • Exploring the interface

  • Customizing your settings

  • Working with modes

  • Jumping into our first project

  • Getting things started in Unreal Engine 4

 

Installing Blender


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:

  1. Go to http://www.blender.org/.

  2. Click on the button on the right labeled Download Blender 2.76-rc3 (the current version as of this writing):

    Click the download button to get the latest version of Blender

  3. 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 the download link that is closest to your location and that corresponds to your operating system. Most users will need the 64 bit version, but if you have less than 8 gigs of RAM you should use the 32 bit version

  4. Click on the Installer once it has finished downloading.

  5. Follow the installation prompts. They are pretty straightforward and do not need additional configuration.

Once everything has been installed, go ahead and run the program. You will be greeted with the splash screen. Now let's take a look at the interface.

 

Exploring the interface


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:

Our Blender default setup. We will change this to work better with Unreal 4

Select any one of them by right-clicking on the object. This will highlight it in orange. Try right-clicking on other objects in the scene:

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:

The Blender interface

  1. Menu Bar

  2. Tools Panel

  3. Animation Timeline

  4. Properties

  5. Scene Properties (press N if you don't see this menu)

  6. Scene Outliner

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.

A lot of information, huh? Trust me, it gets easier with practice. To make things even easier, let's customize some of our settings.

 

Customizing your settings


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:

Setting the mouse selection to use the LMB

To change this next setting, we are going to take a look at the Properties pane. The window looks something like this:

Along the top of the pane are several small tabs. We are looking for the Scene tab denoted by this icon:

Setting the mouse selection to use the LMB

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:

  1. Change the units used from None to Metric.

  2. Change the scale to 0.01.

  3. 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.

  4. 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 1km.

Tip

Hint: Certain objects dropped in through the Add menu will not be scaled appropriately. Scaling these objects by 100 will fix the issue.

Now that we have made those changes, save your file by using the File menu or pressing Ctrl + S.

 

Working with modes


Blender has one more menu we haven't talked about yet. This is a small menu bar along the bottom of the 3D view that looks like the following:

The menu bar at the bottom of the 3d view. We will use this a lot!

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!.

Tip

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.

 

Jumping into our first project


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:

  1. 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.

  2. 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.

  3. 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.

  4. Add in your game assets, adjust lighting, and add special effects.

  5. 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.

 

Getting things 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:

The Epic Games Launcher. Clicking Library on the Unreal Engine tab will show what engine version you have, as well as your current projects

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:

The New Projects tab

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.

 

Summary


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!?

About the Author

  • Justin Plowman

    Justin Plowman is a game designer and educator, who resides in the United States. At a young age, he discovered his love for video games and the joy they bring to others. He began teaching high school students about game development in 2005 and enjoys supporting the dreams of the next generation developers. He currently teaches at risk youth about game design and development through the West Michigan Center for Arts and Technology (www.wmcat.org); and also teaches Unreal Engine development as part of the Digital Animation and Game Design program at Ferris State University (www.ferris.edu). Justin has worked with Unreal Technology in the education arena for more than 10 years. When not teaching, he writes learning tutorials on different topics related to Unreal Technology, and continues to further his education by keeping up on recent industry news and learning about best practices related to both teaching and game development. He can be found on the Web at https://gamingbootcamp.wordpress.com/.

    Browse publications by this author

Latest Reviews

(7 reviews total)
Erg goed uitgelegd hoe je een level designed ben er erg blij mee
Good
Excellent

Recommended For You

Book Title
Unlock this book and the full library for only $5/m
Access now