3d Game Development With Blender

Build anything you can imagine, and make fun 3D games!

Last updated 2022-01-10 | 4.1

- Build 3D models suitable for any game engine
- Manipulate a 3D environment
- Create custom mesh objects - vehicles
- humanoids
- animals

What you'll learn

Build 3D models suitable for any game engine
Manipulate a 3D environment
Create custom mesh objects - vehicles
humanoids
animals
Use UV mapping for realistic color effects
Build basic procedural textures and bake them to UVs
Create terrain
sky maps
and ground textures
Create timeline-based animations (moving platforms
doors)
Use shape keys to modify a mesh (moving eyes and mouth
for example)
Create a basic skeleton rig and animate a character with it
Combine various animations into actions
Master the blender game engine logic bricks
Get user input from mouse
keyboard
and joystick
Manage collisions through bounding boxes
raycasting
and convex hull
Use dynamic physics for realistic motion and collisions
Dynamically create and destroy objects
Track properties for scorekeeping
inventory
time
Create scene overlays for dynamic HUD elements
Display dynamic text on the HUD
Write Python code for better control
Use Python to manage joysticks and mouse with more finesse
Generate a realistic car rig with suspension
acceleration
brakes
and emergency brakes
Create a basic FPS with mouselook
jumping
and (of course) weaponry.

* Requirements

* Please download and install a recent version of Blender (2.76 or greater.) You can use any desktop operating system. Blender is completely free software.
* You may also want an image editor like Gimp (free) or Photoshop (definitely not free.)

Description

  • Build 3D models suitable for any game engine
  • Manipulate a 3D environment
  • Create custom mesh objects - vehicles, humanoids, animals
  • Use UV mapping for realistic color effects
  • Build basic procedural textures and bake them to UVs
  • Create terrain, sky maps, and ground textures
  • Create timeline-based animations (moving platforms, doors)
  • Use shape keys to modify a mesh (moving eyes and mouth, for example)
  • Create a basic skeleton rig and animate a character with it
  • Combine various animations into actions
  • Master the blender game engine logic bricks
  • Get user input from mouse, keyboard, and joystick
  • Manage collisions through bounding boxes, raycasting, and convex hull
  • Use dynamic physics for realistic motion and collisions
  • Dynamically create and destroy objects
  • Track properties for scorekeeping, inventory, time
  • Create scene overlays for dynamic HUD elements
  • Display dynamic text on the HUD
  • Write Python code for better control
  • Use Python to manage joysticks and mouse with more finesse
  • Generate a realistic car rig with suspension, acceleration, brakes, and emergency brakes
  • Create a basic FPS with mouselook, jumping, and (of course) weaponry.

Course content

9 sections • 40 lectures

Introduction Preview 10:28

Viewport controls Preview 11:45

3D modeling tools can be very intimidating, and Blender is no exception.  Learn which parts of the user interface you need to pay attention to, and which ones can be ignored by beginners.  Move around in the default scene so you can see various viewpoints, select objects, pan and zoom. Manage quad views and learn how to use the keypad to quickly see your world from any direction.

NOTE: In the video I didn't remember how to force the top numeric keys to act like a keypad.  It's the Emulate Numpad checkbox under the input tab in the user preferences.  You'll see that checked in the video. I just forgot what was what.  I'm pretty sure I come back to it in the next video, just in case.

Also, I rapidly imported the monkey without explaining how I did it.  I used the shift-A followed by Mesh->Monkey.  You'll always be able to see the keystrokes I do by scrubbing through the video.  In this case, I really didn't want to focus on importing a mesh, I just needed something that has a front, back, top and bottom.  I'll explain how to add new figures in the next video.

Transformations Preview 21:11

Learn how the main types of transformations work: translation, rotation and scaling.  Change objects with the mouse-based inputs as well as through keyboard commands.  Understand the difference between local and global coordinate systems.  

Primitive Objects Preview 10:23

The default cube is more interesting than it looks, but it's not the only shape built into blender.  Learn how to add the other primitive objects, including spheres, cones, and cylinders.  Use normal interpolation to make your elements look smooth and natural. 

Adding Colors Preview 11:37

Use materials to add basic colors to your object.  Understand the difference between diffuse color and specular color, and add multiple materials to the same object. Use the outline view to to understand the scenegraph, which is how a 3D modeler represents the world.

At the end of this session, you should be able to build your own model.  Put together a picture using a number of primitive objects.  Translate, rotate, and scale the objects to get a bit more variety, and use materials to give them color.  If you want, you can use the F12 key to get a snapshot of the model through the current camera, and the F3 key to save that image.

Using Edit mode Preview 15:38

Edit mode is Blender's secret weapon. with this powerful tool, you can subdivide an element to create more vertices.  You can then manipulate these vertices to build many kinds of shapes.  

Use the select all command, block and circle select for powerful selection.

Use subdivision and extrusion to add more vertices to a basic object.

Building your first car Preview 15:01

Finally you're ready to combine the techniques described so far to build your first foundational model.  Once you learn a technique for building a basic car, you can modify it to build nearly any vehicle.

Use subdivide on a basic cube, extrude to flesh out the basic shape, and add multiple materials to get a nice color.

Learn how to apply a multiresolution to get a more organic shape. 

Finally build wheel objects, learn how to combine multiple primitives into the same object, duplicate objects, and use the parenting technique to combine the wheels with the car while maintaining individual identities.

Be sure to practice this many times.  If you can build the basic car from memory, you can then modify that model to build pretty much any vehicle, from a helicopter to a space ship.

Note that many tutorials will focus on using a mirror modifier here, and I have chosen not to do this.  Instead, I'm focusing on keeping the basic model so simple that mirroring is not necessary.  I've found that mirroring causes a number of problems later on, which can be easily avoided.

Building a basic human figure Preview 14:17

Human-like figures are a staple of game development. Learn to build a very simple humanoid figure.  This simple figure can be the foundation of anything roughly human-shaped, including ogres, angels, or aliens.

Note: You should definitely learn to build your own human models, but there are also some great models available for free online.  Use the import command to import a model once you have downloaded it.  There's also a wonderful free program called "MakeHuman" which allows you to build very realistic custom human figures.  Once you can build a basic model by hand, be sure to experiment with these other ways to import great models.

Building a four-legged creature Preview 12:43

Four-legged creatures are built in a way similar to human and vehicle figures.  Learn a basic prototype for any animal and see how you can modify the proportions to make any creature you can imagine.

Basic UV texture mapping Preview 22:15

One of the primary tricks of game programmers is to use 2D drawings as textures on 3D objects.  This technique is called UV mapping.  Learn how to paint directly onto an object from within Blender.  Then learn how to use the UV mapping tools to paint a 2D image within Blender, and how to work with an external image editor (Gimp) to make even fancier graphics.

UVs and modeling Preview 27:23

Frequently you'll want to build some sort of realistic object from an image. Learn how to use a composite image to create a rough outline of a model (in this case a toy car.) Then use edges to create a more useful UV map for your object, then apply UV mapping to map the image onto the object. Essentially this technique is a "poor man's 3D scanner."  It can be a very effective way to build a great-looking 3D model with minimal artistic skills.

building a world environment with UV mapping Preview 16:29

You've built some great models, but the world they live in is flat and gray.  Learn some techniques to add a UV map to the ground.  Also learn how to build a sky sphere, and make it visible from the inside. You'll also learn how to walk around in your scenery with WASD controls, and how to work with lighting with your world environments. 

Note: There are a couple of places here where I refer to 'texture mode.'  Technically, we haven't done texture mode yet, and the panel I'm referring to is the 'material' mode.  In the next lecture I'll describe the difference between textures and materials.

Procedural textures and texture baking Preview 19:22

Blender has some great tools for building your own textures, but these techniques can't normally be used in the game engine.  Learn how to build randomized grass and sky textures, and use the 'texture baking' feature to convert your textures to an image you can use through UV mapping.

Building a terrain model Preview 19:12

While our environments look good, they are incredibly flat.  Use the sculpting mode to create an interesting terrain with mountains, valleys, and islands.  Use texture paint mode to make your terrain look wonderful, and experiment with fly mode and a custom sky to fly around your new world.

texture painting Preview 17:56

Not only can you paint with colors, you can also import image samples into blender and paint with them. Use this technique to create an incredibly realistic scene.

Basic animation with keyframes Preview 15:27

Now you're ready to animate your models.  Learn how basic keyframes work.  Add location keyframes to your objects and manipulate the timeline to build objects that move over time. Use the dope sheet to understand more clearly what is happening in your animation, and the curve editor for crazy amounts of control of your animation.  Learn how keyframes can be applied to any numeric input, and play with color animation. Lots of fun.

Animating a moving vehicle Preview 15:56

It's time to put together some of the objects you've built before to make an animation of a 3rd person driving simulator.  Learn how to import objects from other blender files, how to create a complete animation cycle, and how to attach a camera to an object so you can animate the viewpoint to follow an object.

Shape key animation Preview 16:13

Shape keys allow you to modify part of a mesh. Learn to add shape keys to an object, and record multiple shape key animations with the shape key editor.  

Armature and skeleton animation Preview 14:03

Armatures are an animation technique that allows you to create a skeleton for your model and attach your mesh to the skeleton.  This allows you to create realistic motions. Build a skeleton, name the bones, and use pose mode to move your character like a doll. 

Creating Actions Preview 16:51

Often an object in a game will have a number of different animations.  Learn how to create multiple animations including waving and a basic run cycle.  Use the Action editor to create, modify, and save actions.

Note that I started this example with basicRig.blend, from the last video.  Download a copy of that file if you want to follow along.

Basic Logic: keyboard and motion Preview 17:39

It's finally time to go from modeling and animation to gaming. The secret is user input.  Learn about the game logic view, how the logic bricks work, and how to map keyboard inputs to basic movement.

Using a gamepad Preview 15:59

Joysticks and gamepads add a tremendously immersive input experience. Read various kinds of joystick input including buttons, the hat, and axis controls.  Learn how to manage the axis threshold for better control, and connect joystick input to a model.

Aircraft control Preview 21:26

Putting together inputs seems pretty easy, but it doesn't take long for things to get confusing.  Learn how to put together a gamepad control for a simple flight simulator.  More importantly, learn a technique for managing complexity so that you can map any input you want to the appropriate output. See how frequent testing can make your debugging much easier when things go wrong.

Activating actions from the game engine Preview 13:25

Once you have created a model, added an armature, and created animations, you need to be able to play back those animations from within the game engine.  Learn how to invoke any recorded action from user input. Also learn how to combine multiple actions with the animation layers mechanism, and how to 'snap' back to a neutral position after all animations are completed.

Note that I only described actions, but you can do exactly the same things with shape keys.

Creating mouse look FPS motion Preview 16:44

Mouse look behavior is one of the keys of modern gaming. It involves combining WASD motion with a mouse to rapidly rotate the head and body.  This is a surprisingly difficult effect to achieve by hand, but blender includes a really nice tool to make it relatively easy.  Attach a camera head to a cube body, map WASD motion to the body, and attach mouse motion to the head to achieve both flying and standard FPS walking motion.

Basic forces Preview 21:42

Learn how to convert an object to dynamic physics mode.  Modify its mass, drag, and anistropic friction values to get more realistic motion, and use the improved physics motion controls to add forces and torque.  If you didn't understand all that, we're building a FLYING CAR!!!  Seriously!

Colliding into innocent objects Preview 14:00

Of course, much of the fun of gaming happens when you crash into things.  Learn how dynamic physics objects collide with each other.  Use the various collision bound techniques, and see how a rigid body mechanism can give better behaviour.  

Creating weapons and bullets Preview 20:04

Crashing into things is fun, but shooting things is even better.  Learn how to create a bullet spawn point, attach it to a camera for a first-person view, build dynamic bullet objects, and have bullets die on demand to avoid overloading memory with unneeded vertices.

Using the Character physics model Preview 19:05

The character physics model allows you to easily apply character motion to your game objects. Learn how to build an object that can move over terrain, jump and double-jump.  Turn a character into an actor that can be read by the near and radar sensors of other objects, and learn how to use these sensors to activate animations like opening doors and jumping cubes.

Working with properties and text elements Preview 14:35

Games are ultimately about data.  Learn how to add a property to a game object.  Discover the difference between floating point, integer, and string properties.  Learn how text elements have a special visible text property, and copy the value of a property from one object to another.

Building a HUD Preview 13:25

Many games feature things like crosshairs for targets, and text input. These features are often called a HUD (for Heads-Up Display.)  Learn how to build a HUD that stays in place as the camera moves with scene overlays. Also learn how to check for ray-style collisions when there is no actual bullet, and how to send messages from any object to any other object in your game.

Switching logic states Preview 12:21

The game engine has its own variation of layer called 'states.'  This tool allows you to apply more than one set of logic bricks to an item and switch between various logic layers at different times.  Use this tool to build an object that moves back and forth indefinitely.

Escape the Room! Preview 16:30

Now you can put together all of the things to create a staple of the gaming world - an escape the room game.  Move the player towards a door and the door does not open. But if you pick up a key then approach the door, the door automatically opens. 

This example is a good review of everything we have done so far: basic modeling, materials, animation, properties, motion, and logic.

Introduction to Python Preview 13:41

Blender's logic bricks are awesome, but there are some things that simply can't be done with logic bricks alone, and some other things are more complicated than they need to be. Learn how to integrate the Python programming language into your games, and learn how to use an existing python template to begin writing code that can do new things.  It's a whole new world!

python-based movement Preview 21:01

Extend your ability to work with code by building an animation that would be quite complex with logic bricks alone.

Learn why an always sensor in pulse mode is so commonly used in python programming, explore the python documentation, and discover the difference between worldPosition and localPosition. Learn how to read game object properties from within python code, and build code that can create a game like the classic centipede.

python keyboard and mouse Preview 18:04

There are a number of great ways you can automate keyboard input with Python.  I have created a couple of template scripts you can use to simplify managing the keyboard.  See how you can build a script that can read any key on the keyboard in either a single burst or continuous stream without requiring a ton of keyboard sensors.  

Learn how a single script can easily implement complete FPS controls (mouse movement and keyboard) much more quickly than you would do it with logic bricks.


Using the car physics model Preview 20:57

One of the best hidden secrets of Blender is a complete automotive suspension system that's built in.  This technique is very powerful, but has a lot of set-up steps.  I walk you through the entire process so you can add a really fun car suspension and power system to any vehicle model and create really fun and exciting driving games.

Using Python with a Joystick Preview 15:29

While it's possible to read a joystick with logic bricks alone, the logic brick mechanism boils all joystick input into simple on/off impulses.  It would be better if you could determine how far the stick is being moved.  You can do this with a script, and we learn how in this video.

Also, although we can control a lot of elements directly within code, another interesting approach is to set up generic actuators, and change their behavior through code.  This can often be a lot easier than managing objects directly, because you already know how actuators work. 

We'll take input from a joystick and use it to control a generic motion actuator.

Creating a Game Design Document Preview 20:53

Game design is an interesting topic in its own right, but in order for a game design to be useful, you must have some idea of your technical capabilities and the knowledge to implement your ideas. Now that you have a foundation in the required skills, you can begin creating realistic game design documents.  Look over a GDD for a game that was actually created from the document, and see all the thought that goes into planning an actual game.

Building the Spatial Invaders game Preview 20:12

Now that you've seen the plan for the Spatial Invaders game, look over how it was created.  For the most part, there's nothing new here, but we finally put everything together to build an interesting game.