Book Image

Game Development with Blender and Godot

By : Kumsal Obuz
Book Image

Game Development with Blender and Godot

By: Kumsal Obuz

Overview of this book

Game Development with Blender and Godot is a comprehensive introduction for those new to building 3D models and games, allowing you to leverage the abilities of these two technologies to create dynamic, interactive, and engaging games. This book will start by focusing on what low-poly modeling is, before showing you how to use Blender to create, rig, and animate your models. You will also polish these assets until they’re game-ready, making it easy for you to import them into Godot and use them effectively and efficiently. Next, you will use the game engine to design scenes, work with light and shadows, and transform your 3D models into interactive, controllable assets. By the end of this book, you will have a seamless workflow between Blender and Godot which is specifically geared toward game development. Alongside, you’ll also be building a point-and-click adventure game following the instructions and guidance in the book. Finishing this game will help you take these newly acquired skills and create your own 3D games from conception to completion.
Table of Contents (20 chapters)
1
Part 1: 3D Assets with Blender
7
Part 2: Asset Management
11
Part 3: Clara’s Fortune – An Adventure Game

Understanding low-poly models

Simply put, a 3D model is considered to be low-poly when it uses the minimum number of polygons to make its most characteristic features, mainly its look and feel. However, let’s take a look at them in a little more detail.

In real-time applications such as game engines, your computer’s central processing unit (CPU) and graphics processing unit (GPU) are responsible for processing the visual information you see on the screen. In the last two decades, the trend has been leaning heavily toward the GPU side since GPUs are dedicated to one main task: processing graphics.

GPUs have an advantage over CPUs in that regard, and they don’t discriminate between 2D and 3D graphics. However, whereas 2D images contain pixel information, 3D objects are represented by data that holds the necessary coordinate information that defines the object.

Although a cube is still a bunch of pixels after it is rendered on your screen, the data that defines the cube is essentially eight points, which are called vertices. For demonstration purposes, in the following screenshot, Blender’s vertex size setting has been changed so that you can see where those vertices are more easily:

Figure 1.1 – The eight vertices of a cube

Figure 1.1 – The eight vertices of a cube

Both cubes are the same object, but it’s possible to render the same eight vertices and their relationship with each other in two different ways: one that looks like a solid object (on the left) and another that looks transparent (on the right). So, keep in mind that vertices are data points that define the shape of the object, not how it looks. Later in this chapter, you’ll learn how to make objects look different, similar to what’s shown in the preceding screenshot.

Before we discuss what makes a model low-poly, we must understand a few other essential parts. You’ve already seen that the vertex is the most crucial component, but there are two more concepts you must be aware of:

  • Edge
  • Face

Let’s see how these two relate to a vertex. By doing so, we’ll be on our way to understanding what makes a model low-poly.

Parts of a 3D model

An edge is what connects two vertices. It’s as simple as that. If you look at Figure 1.1 again, you’ll see that not all the vertices are connected. However, when they are connected, it’s called an edge and depicted by Blender with a straight line going from one vertex to the other.

A face, as you may have deduced, is a logical outcome when you arrange vertices – or edges – in a certain pattern. For example, a cube or a six-sided die has six faces. Although Figure 1.1 makes it look like you need four edges to make a face, there is a simpler way – that is, three edges are enough to form a face. So, a triangle is the simplest face, also known as a polygon.

Low or hi, what’s the difference?

When you are designing a model, you are creating polygons. The density of the polygons in a model is what determines whether a model can be considered low-poly. The following figure displays one low-poly and one high-poly work sample, courtesy of Sketchfab users MohammadRezae and DJS_05:

Figure 1.2 – An example of a low-poly versus high-poly model

Figure 1.2 – An example of a low-poly versus high-poly model

You can find a lot of examples of different polygon counts on websites such as Sketchfab.

In the industry, if you are asking for a model to be designed for you, you may want to mention that you want it done in low-poly form. It’s often agreed that if you don’t mention this, people will assume it’s going to have as many polygons as possible since you would want your models to be as detailed as possible with plenty of polygons. So, the distinction is made when you are cutting those polygons out, not when you are keeping them in.

Let’s focus on our default cube again. Is it low-poly or hi-poly? It might be both. Although we know that only eight vertices are needed to create a cube, we could have had many more vertices along the edges that connected the original corner vertices. However, it would not have made any difference in the rendered result. That being said, it would have taken the computer a lot longer to render the same visual result.

So, as mentioned previously, when your model has just enough polygons to make sense of the object you’d like to design, you’ll have a low-poly model.

Although GPUs are fast and they do a fantastic job these days of rendering millions of polygons and going low-poly may feel like you are cutting corners, there are good reasons why you may not want to have that many polygons in your project.