Reader small image

You're reading from  Learning AWS Lumberyard Game Development

Product typeBook
Published inOct 2016
Reading LevelIntermediate
PublisherPackt
ISBN-139781786460868
Edition1st Edition
Languages
Right arrow
Author (1)
Dr. Edward Lavieri
Dr. Edward Lavieri
author image
Dr. Edward Lavieri

Dr. Edward Lavieri is a veteran software engineer and developer with a strong academic background. He earned a Doctorate of Computer Science from Colorado Technical University, an MS in Management Information Systems (Bowie State University), an MS in Education (Capella University), and an MS in Operations Management (University of Arkansas). He has been creating and teaching computer science courses since 2002. Edward retired from the U.S. Navy as a Command Master Chief after 25 years of active service. He is the founder and creative director of three19, a software design and development studio. Edward has authored more than a dozen technology books, including several on Java.
Read more about Dr. Edward Lavieri

Right arrow

Chapter 4. Creating 3D Characters

In the previous chapter, we created our game world. Our game world, also referred to as our game environment, is where the game takes place. It is the environment in which our players will interact. In order for our players to play our game, they need a game character. Our game world is three-dimensional (3D), so our characters will need to be 3D as well.

In this chapter, we will add 3D characters to our game. These characters will come in two forms, player-controlled characters and non-player-controlled characters.

After reading this chapter, you will:

  • Understand the concept of 3D characters

  • Understand Lumberyard's capabilities regarding 3D characters

  • Learn how to use the FBX Importer

  • Become familiar with the Geppetto user interface

  • Understand how to use Geppetto to manipulate 3D characters

  • Learn how to create your own character definition

  • Understand the significance of using third-party modeling software

Dissecting 3D characters


Characters are a key part of our game. Characters can come in many forms, including humanoids, animals, robots, and more. We can allow our players to play as any type of character that we instantiate in the game. As you would expect, characters are incredibly more complex than most other game objects, such as a building, rock, weapon, or lamppost.

3D Character vocabulary

Working with 3D characters takes a certain level of understanding. Creating these characters is a complex process and has an associated vocabulary. Here are some of the basic terms used when working with 3D characters:

  • Polygon: You'll remember from geometry class that a polygon is a plane figure with three or more straight line segments. Polygons can be very complex. They are always closed and contain no curves. When using 3D modeling software, polygons are also referred to as faces.

  • Polycount (short for polygon count): This is an important concept to consider. The polycount is the number of triangles...

Lumberyard's capabilities


When we work with characters in Lumberyard, we have multiple goals. For player characters, we want the player to navigate the characters in the game world and we want the character to be animated both by the player and automatically depending on the in-game situation. For non-player characters, we want animations to be evoked through our AI system, sparked by in-game events and real player interactions.

Lumberyard allows us to import characters from Maya and 3D Studio Max. You can also import characters that were exported to FBX format. FBX stands for Filmbox and is an industry standard file format that packages 2D, 3D, audio, video, and animation content for an object.

Lumberyard has two specialized tools for 3D characters: Geppetto, Lumberyard's character tool, and a Mannequin system for character animation. We will look at Geppetto in this chapter and save the Mannequin system for Chapter 5, Animating Your Characters.

FBX Importer

Lumberyard's FBX Importer permits...

Creating your own character


When we create a character using Geppetto, we start by creating a character definition file: a .cdf file. An important precursor to creating the character definition file is to have already created, at a minimum, a character skeleton file (.chr) and a skinned geometry file (.skin). These files can be generated from Autodesk Maya or Autodesk 3DS Max.

Note

For instructions on how to generate the .chr and .skin files, consult the Autodesk Maya or Autodesk 3DS Max documentation. Additional support is available in the Lumberyard documentation.

Character definition file

Here are the steps to create a new character definition file using Geppetto:

  1. Select View | Open View Pane | Geppetto from the pull-down menu to open Geppetto.

  2. In the pull-down menu, select File | New Character. This will open a Create Character file dialog window:

  3. Enter Farmer_Boy for the filename.

  4. Navigate to where you would like the new character definition file to be saved and click the Save button. You might...

Summary


In this chapter, we discovered the complexities of 3D characters in Lumberyard. Other than the included sample characters (a robot and a chicken), we need to use third-party software such as Autodesk Maya or Autodesk 3DS Max to generate the skeleton and skin files. We explored Geppetto, an important component of Lumberyard. Geppetto is Lumberyard's character tool. We used files provided from the book's website to create our own 3D character. Our character, a farm boy, was created using Geppetto and the Material Editor.

In the next chapter, we will take an in-depth look at character animations. Specifically, we will look at sample animations and learn how to create animations of our own. The next chapter will also give an overview of Mannequin, an important subset of Lumberyard.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Learning AWS Lumberyard Game Development
Published in: Oct 2016Publisher: PacktISBN-13: 9781786460868
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $19.99/month. Cancel anytime

Author (1)

author image
Dr. Edward Lavieri

Dr. Edward Lavieri is a veteran software engineer and developer with a strong academic background. He earned a Doctorate of Computer Science from Colorado Technical University, an MS in Management Information Systems (Bowie State University), an MS in Education (Capella University), and an MS in Operations Management (University of Arkansas). He has been creating and teaching computer science courses since 2002. Edward retired from the U.S. Navy as a Command Master Chief after 25 years of active service. He is the founder and creative director of three19, a software design and development studio. Edward has authored more than a dozen technology books, including several on Java.
Read more about Dr. Edward Lavieri