Chapter 3. Game Objects – More and Move

We created our first room in the Unreal Editor in Chapter 2, Creating Your First Level. In this chapter, we will cover some information about the structure of objects we have used to prototype the level in Chapter 2, Creating Your First Level. This is to ensure that you have a solid foundation in some important core concepts before moving forward. Then, we will progressively introduce various concepts to make the objects move upon a player's interaction.

In this chapter, we will cover the following topics:

  • BSP Brush
  • Static Mesh
  • Texture and Materials
  • Collision
  • Volumes
  • Blueprint

BSP Brush

We used the BSP Box Brush in Chapter 2, Creating Your First Level, extensively to create the ground and the walls.

BSP Brushes are the primary building blocks for level creation in the game development. They are used for quick prototyping levels like how we have used them in Chapter 2, Creating Your First Level.

In Unreal, BSP Brushes come in the form of primitives (box, sphere, and so on) and also predefined/custom shapes.

Background

BSP stands for binary space partitioning. The structure of a BSP tree allows spatial information to be accessed quickly for rendering, especially in 3D scenes made up of polygons. A scene is recursively divided into two, until each node of the BSP tree contains only polygons that can render in arbitrary order. A scene is rendered by traversing down the BSP tree from a given node (viewpoint).

Since a scene is divided using the BSP principle, placing objects in the level could be viewed as cutting into the BSP partitions in the scene. Geometry Brushes use Constructive Solid Geometry (CSG) technique to create polygon surfaces. CSG combines simple primitives/custom shapes using Boolean operators such as union, subtraction, and intersection to create complex shapes in the level.

So, the CSG technique is used to create surfaces of the object in the level, and rendering the level is based on processing these surfaces using the BSP tree. This relationship has resulted in Geometry Brushes being known also as BSP Brushes, but more accurately, CSG surfaces.

Brush type

BSP Brushes can either be additive or subtractive in nature. Additive brushes are like volumes that fill up the space. Additive brushes were used for the ground and the walls in our map in Chapter 2, Creating Your First Level.

Subtractive brushes can be used to form hollow spaces. These were used to create a hole in the wall in which to place a door and its frame in Chapter 2, Creating Your First Level.

Brush solidity

For additive brushes, there are various states it can be in: solid, semi-solid, or non-solid.

Since subtractive brushes create empty spaces, players are allowed to move freely within them. Subtractive brushes can only be solid brushes.

Refer to the following table for comparison of their properties:

Brush solidity

Brush type

Degree of blocking

BSP cutting

Solid

Additive and subtractive

Blocks both players and projectiles

Creates BSP cuts to the surrounding world geometry

Semi-solid

Additive only

Blocks both players and projectiles

Does not cause BSP cuts to the surrounding world geometry

Non-solid

Additive only

Does not block players or projectiles

Does not cause BSP cuts to the surrounding world geometry

..................Content has been hidden....................

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