
Lee Deuk-woo's Game Mathematics
Description
Book Introduction
Let's follow along with 39 real-time rendering game programming practice examples one by one. The exciting world of game mathematics that readers can experience firsthand! What game developers and graphic artists have been wondering about Mathematical principles and applied techniques for implementing 3D virtual worlds and the metaverse! Everything you need to know about game math for developers and artists looking for a job or career change! This book provides a friendly explanation of the basics of linear algebra for beginners, and presents the principles of game mathematics and their applications necessary for creating three-dimensional spaces and characters for intermediate users. This book goes beyond explaining the theory; you can learn the basic principles and structure of game engines by creating your own game engine through 39 step-by-step examples. |
- You can preview some of the book's contents.
Preview
index
Chapter 1: Game Mathematics that Underpin the Metaverse
1.1 New changes brought about by the metaverse
1.2 Game Engine Structure
1.3 Structure of game mathematics
1.4 Building a Practice Environment for This Book
__1.4.1 Configuring a Practice Example
__1.4.2 Configuring the development environment
__1.4.3 Building the source code
__1.4.4 Source code composition
1.5 Summary
Part 1 | Building a Virtual World
Chapter 2: Number: The smallest unit that makes up the virtual world
2.1 Numbers and sets
__2.1.1 Operations and Number Structure
__2.1.2 Structure of numbers
__2.1.3 Representation of numbers
2.2 Function
__2.2.1 Concept and types of functions
__2.2.2 Composite functions
__2.2.3 Identity function and inverse function
__2.2.4 Extension to the coordinate plane using product sets
2.3 Summary
Chapter 3 Vectors: The Birth of Virtual Space
3.1 Cartesian coordinate system
3.2 Vector Spaces and Vectors
__3.2.1 Scalars and Vectors
__3.2.2 Operations on vector spaces
__3.2.3 Size and movement of vectors
3.3 Combining and Creating Vectors
3.4 Summary
Chapter 4 Trigonometry: The Mathematics of Rotation
4.1 Trigonometric functions
__4.1.1 Properties of trigonometric functions
__4.1.2 Angle measurement method
4.2 Rotation of objects using trigonometry
4.3 Inverse functions of trigonometric functions
4.4 Polar coordinate system
4.5 Summary
Chapter 5: Matrices: Transformation Tools for Virtual Worlds
5.1 Linearity: A predictable proportional relationship
__5.1.1 Linear functions
__5.1.2 Linear transformations of vector spaces
5.2 Matrix
__5.2.1 Basic Matrix Operations
__5.2.2 Matrix Multiplication
__5.2.3 Multiplication of square matrices
5.3 Matrix Design
__5.3.1 Size transformation matrix
__5.3.2 Rotation Transformation Matrix
__5.3.3 Shear transformation matrix
__5.3.4 Addition theorem of trigonometric functions
5.4 Inverse matrix
__5.4.1 Determinant that determines the existence of an inverse matrix
__5.4.2 Inverse matrix of the size transformation matrix
__5.4.3 Inverse of the shear transformation matrix
__5.4.4 Inverse matrix of rotation transformation matrix
__5.4.5 Inverse of matrix multiplication
5.5 Summary
Part 2 | Content Creation Basics
Chapter 6: Affine Space: Building Moving Virtual Worlds
6.1 Affine Space for Transformations
6.2 Components of an affine space
__6.2.1 points
__6.2.2 Movement vector
__6.2.3 Properties of affine spaces
6.3 Affine combination
__6.3.1 Joining two points
6.4 Line Drawing Algorithm
__6.4.1 Representing a vector as a point on the monitor
__6.4.2 Line drawing algorithm
__6.4.3 Line Clipping Algorithm
6.5 Summary
Chapter 7: Inner Products: Analysis and Applications of Vector Spaces
7.1 Dot product of vectors
__7.1.1 Properties of the inner product
__7.1.2 Relationship between inner products and trigonometric functions
__7.1.3 Expressing matrix multiplication as an inner product
7.2 Field of view determination
__7.2.1 Front and back determination
__7.2.2 Field of view determination
7.3 Implementing lighting effects
7.4 Projection vector
7.5 Summary
Chapter 8 Triangles: The Smallest Units That Make Up Objects
8.1 Combination of three points
8.2 Messi
8.3 Center of gravity coordinates
__8.3.1 Calculation of center of gravity coordinates
__8.3.2 Utilization of additional information set at the vertex
8.4 Texture Mapping
8.5 Summary
Chapter 9 Game Engines: The Art of Creating Content
9.1 Game Engine Components
__9.1.1 Scene Structure
__9.1.2 Design of the modeling matrix
__9.1.3 Local Space and Local Axis
__9.1.4 Resource Management
9.2 Game Engine Workflow
__9.2.1 CK Soft Renderer Workflow
__9.2.2 Rendering Pipeline
9.3 Camera System
__9.3.1 Camera in Virtual Space
9.4 Summary
Part 3 | 3D Content Creation
Chapter 10 Three-Dimensional Space: Creating Three-Dimensional Space
10.1 Design of three-dimensional space
10.2 Transformation in 3D space
__10.2.1 Euler angles
__10.2.2 Derivation of rotation matrix
__10.2.3 3D modeling matrix
10.3 Camera Space
10.4 Characteristics of Euler angles
__10.4.1 Gimbal lock phenomenon
__10.4.2 Calculating Rotational Interpolation
10.5 Summary
Chapter 11: Cross Products: Analysis and Applications in Three-Dimensional Space
11.1 Cross product of vectors
__11.1.1 Parallelism Determination
__11.1.2 Normal vector
__11.1.3 Determining left and right direction
11.2 Creating a rotation matrix from a vector
11.3 Backface culling reduces rendering computation
11.4 Rodriguez rotation formula for solving Euler angle problems
11.5 Triple product
__11.5.1 Scalar Triple Product
__11.5.2 Vector triple product
11.6 Summary
Chapter 12 Perspective Projection: Transformations That Give Reality to Your Screen
12.1 Principles of Perspective Projection Transformation
12.2 Homogeneous Coordinate System
12.3 Depth value
12.4 Perspective Correction Mapping
12.5 depth buffer
12.6 Summary
Chapter 13 Frustums: Optimized Three-Dimensional Space
13.1 Frustum culling
__13.1.1 Equations of the plane
__13.1.2 Normalization of the equations of the plane
__13.1.3 Representing a frustum using the equation of the plane
__13.1.4 Creating the equation of the plane from the perspective projection matrix
13.2 Bounding Volume
__13.2.1 Determining the bounding volume of a sphere
__13.2.2 Judgment with AABB
13.3 Triangle Clipping
13.4 Summary
Part 4 | Four-Dimensional Mathematics and Characters
Chapter 14 Complex Numbers: Numbers in the Two-Dimensional Plane
14.1 Complex numbers
__14.1.1 Imaginary number
__14.1.2 Structure of complex numbers
14.2 Complex plane
__14.2.1 Product with a unit complex number
__14.2.1 Rotation of conjugate complex numbers
14.3 Relationship between complex numbers and matrices
14.4 Summary
Chapter 15 Euler's Formula: Rotational Transformations Expressed in Imaginary Numbers
15.1 Natural exponential function
__15.1.1 Irrational number e
__15.1.2 Natural exponential function
15.2 Differentiation
__15.2.1 Derivatives
__15.2.2 Derivative of natural exponential function
__15.2.3 Derivatives of the sin and cos functions
15.3 series
__15.3.1 Geometric sequence
__15.3.2 series
__15.3.3 Maclaurin series
15.4 Euler's formula
15.5 Summary
Chapter 16: Quaternions: 3D Rotations Designed with Four-Dimensional Numbers
16.1 Quaternion algebra
__16.1.1 Three imaginary numbers that make up a quaternion
__16.1.2 Structure of the temple number
__16.1.3 Quaternions and Vectors
16.2 Rotation of the quaternion
__16.2.1 Quaternions and Euler's Formula
__16.2.2 Rotation in three-dimensional space using rotational quaternions
16.3 Transformation of quaternions
__16.3.1 Conversion from Euler angles to quaternions
__16.3.2 Conversion from quaternions to Euler angles
__16.3.3 Transformation from quaternions to rotation transformation matrices
__16.3.4 Transformation from rotation matrix to quaternion
16.4 Interpolation of quaternions
16.5 Use of the number of employees
16.6 Summary
Chapter 17: Characters: The Art of Bringing Games to Life
17.1 Skeletal Animation
17.2 Transform Hierarchy
__17.2.1 Transformation of the Transform Hierarchy
__17.2.2 Computing the world transform from the local transform
__17.2.3 Computing local transform from world transform
17.3 Character mesh and animation
17.4 Summary
1.1 New changes brought about by the metaverse
1.2 Game Engine Structure
1.3 Structure of game mathematics
1.4 Building a Practice Environment for This Book
__1.4.1 Configuring a Practice Example
__1.4.2 Configuring the development environment
__1.4.3 Building the source code
__1.4.4 Source code composition
1.5 Summary
Part 1 | Building a Virtual World
Chapter 2: Number: The smallest unit that makes up the virtual world
2.1 Numbers and sets
__2.1.1 Operations and Number Structure
__2.1.2 Structure of numbers
__2.1.3 Representation of numbers
2.2 Function
__2.2.1 Concept and types of functions
__2.2.2 Composite functions
__2.2.3 Identity function and inverse function
__2.2.4 Extension to the coordinate plane using product sets
2.3 Summary
Chapter 3 Vectors: The Birth of Virtual Space
3.1 Cartesian coordinate system
3.2 Vector Spaces and Vectors
__3.2.1 Scalars and Vectors
__3.2.2 Operations on vector spaces
__3.2.3 Size and movement of vectors
3.3 Combining and Creating Vectors
3.4 Summary
Chapter 4 Trigonometry: The Mathematics of Rotation
4.1 Trigonometric functions
__4.1.1 Properties of trigonometric functions
__4.1.2 Angle measurement method
4.2 Rotation of objects using trigonometry
4.3 Inverse functions of trigonometric functions
4.4 Polar coordinate system
4.5 Summary
Chapter 5: Matrices: Transformation Tools for Virtual Worlds
5.1 Linearity: A predictable proportional relationship
__5.1.1 Linear functions
__5.1.2 Linear transformations of vector spaces
5.2 Matrix
__5.2.1 Basic Matrix Operations
__5.2.2 Matrix Multiplication
__5.2.3 Multiplication of square matrices
5.3 Matrix Design
__5.3.1 Size transformation matrix
__5.3.2 Rotation Transformation Matrix
__5.3.3 Shear transformation matrix
__5.3.4 Addition theorem of trigonometric functions
5.4 Inverse matrix
__5.4.1 Determinant that determines the existence of an inverse matrix
__5.4.2 Inverse matrix of the size transformation matrix
__5.4.3 Inverse of the shear transformation matrix
__5.4.4 Inverse matrix of rotation transformation matrix
__5.4.5 Inverse of matrix multiplication
5.5 Summary
Part 2 | Content Creation Basics
Chapter 6: Affine Space: Building Moving Virtual Worlds
6.1 Affine Space for Transformations
6.2 Components of an affine space
__6.2.1 points
__6.2.2 Movement vector
__6.2.3 Properties of affine spaces
6.3 Affine combination
__6.3.1 Joining two points
6.4 Line Drawing Algorithm
__6.4.1 Representing a vector as a point on the monitor
__6.4.2 Line drawing algorithm
__6.4.3 Line Clipping Algorithm
6.5 Summary
Chapter 7: Inner Products: Analysis and Applications of Vector Spaces
7.1 Dot product of vectors
__7.1.1 Properties of the inner product
__7.1.2 Relationship between inner products and trigonometric functions
__7.1.3 Expressing matrix multiplication as an inner product
7.2 Field of view determination
__7.2.1 Front and back determination
__7.2.2 Field of view determination
7.3 Implementing lighting effects
7.4 Projection vector
7.5 Summary
Chapter 8 Triangles: The Smallest Units That Make Up Objects
8.1 Combination of three points
8.2 Messi
8.3 Center of gravity coordinates
__8.3.1 Calculation of center of gravity coordinates
__8.3.2 Utilization of additional information set at the vertex
8.4 Texture Mapping
8.5 Summary
Chapter 9 Game Engines: The Art of Creating Content
9.1 Game Engine Components
__9.1.1 Scene Structure
__9.1.2 Design of the modeling matrix
__9.1.3 Local Space and Local Axis
__9.1.4 Resource Management
9.2 Game Engine Workflow
__9.2.1 CK Soft Renderer Workflow
__9.2.2 Rendering Pipeline
9.3 Camera System
__9.3.1 Camera in Virtual Space
9.4 Summary
Part 3 | 3D Content Creation
Chapter 10 Three-Dimensional Space: Creating Three-Dimensional Space
10.1 Design of three-dimensional space
10.2 Transformation in 3D space
__10.2.1 Euler angles
__10.2.2 Derivation of rotation matrix
__10.2.3 3D modeling matrix
10.3 Camera Space
10.4 Characteristics of Euler angles
__10.4.1 Gimbal lock phenomenon
__10.4.2 Calculating Rotational Interpolation
10.5 Summary
Chapter 11: Cross Products: Analysis and Applications in Three-Dimensional Space
11.1 Cross product of vectors
__11.1.1 Parallelism Determination
__11.1.2 Normal vector
__11.1.3 Determining left and right direction
11.2 Creating a rotation matrix from a vector
11.3 Backface culling reduces rendering computation
11.4 Rodriguez rotation formula for solving Euler angle problems
11.5 Triple product
__11.5.1 Scalar Triple Product
__11.5.2 Vector triple product
11.6 Summary
Chapter 12 Perspective Projection: Transformations That Give Reality to Your Screen
12.1 Principles of Perspective Projection Transformation
12.2 Homogeneous Coordinate System
12.3 Depth value
12.4 Perspective Correction Mapping
12.5 depth buffer
12.6 Summary
Chapter 13 Frustums: Optimized Three-Dimensional Space
13.1 Frustum culling
__13.1.1 Equations of the plane
__13.1.2 Normalization of the equations of the plane
__13.1.3 Representing a frustum using the equation of the plane
__13.1.4 Creating the equation of the plane from the perspective projection matrix
13.2 Bounding Volume
__13.2.1 Determining the bounding volume of a sphere
__13.2.2 Judgment with AABB
13.3 Triangle Clipping
13.4 Summary
Part 4 | Four-Dimensional Mathematics and Characters
Chapter 14 Complex Numbers: Numbers in the Two-Dimensional Plane
14.1 Complex numbers
__14.1.1 Imaginary number
__14.1.2 Structure of complex numbers
14.2 Complex plane
__14.2.1 Product with a unit complex number
__14.2.1 Rotation of conjugate complex numbers
14.3 Relationship between complex numbers and matrices
14.4 Summary
Chapter 15 Euler's Formula: Rotational Transformations Expressed in Imaginary Numbers
15.1 Natural exponential function
__15.1.1 Irrational number e
__15.1.2 Natural exponential function
15.2 Differentiation
__15.2.1 Derivatives
__15.2.2 Derivative of natural exponential function
__15.2.3 Derivatives of the sin and cos functions
15.3 series
__15.3.1 Geometric sequence
__15.3.2 series
__15.3.3 Maclaurin series
15.4 Euler's formula
15.5 Summary
Chapter 16: Quaternions: 3D Rotations Designed with Four-Dimensional Numbers
16.1 Quaternion algebra
__16.1.1 Three imaginary numbers that make up a quaternion
__16.1.2 Structure of the temple number
__16.1.3 Quaternions and Vectors
16.2 Rotation of the quaternion
__16.2.1 Quaternions and Euler's Formula
__16.2.2 Rotation in three-dimensional space using rotational quaternions
16.3 Transformation of quaternions
__16.3.1 Conversion from Euler angles to quaternions
__16.3.2 Conversion from quaternions to Euler angles
__16.3.3 Transformation from quaternions to rotation transformation matrices
__16.3.4 Transformation from rotation matrix to quaternion
16.4 Interpolation of quaternions
16.5 Use of the number of employees
16.6 Summary
Chapter 17: Characters: The Art of Bringing Games to Life
17.1 Skeletal Animation
17.2 Transform Hierarchy
__17.2.1 Transformation of the Transform Hierarchy
__17.2.2 Computing the world transform from the local transform
__17.2.3 Computing local transform from world transform
17.3 Character mesh and animation
17.4 Summary
Detailed image

Publisher's Review
| Target audience for this book |
- Developers who want to create their own 3D virtual world that users can freely control.
- Game developers who want to create their own game engine
- Technical artist curious about the principles of visualizing vectors on screen
- Students, developers, and artists who want to learn the basics of linear algebra consisting of vectors and matrices
- Students, developers, and artists who want to learn the basic theories related to 3D graphics
- Game developers who are curious about the quaternion system used by game engines and how it is implemented.
| Structure of this book |
This book is written for those who want to learn or review the basics of mathematics, or for game developers and graphic designers who have given up on mathematics.
The main content can be classified as linear algebra, but among them, it can be said to be linear algebra specialized for computer graphics.
This book is divided into four parts, and is organized sequentially, starting with Part 1 and gradually increasing in completeness, and ending in Part 4.
Chapter 1, "Game Mathematics Supporting the Metaverse," which opens the book, discusses why game mathematics is necessary in the Internet world, which will further develop into the metaverse.
Part 1, "Building a Virtual World," covers the structure of virtual space created from numerical order and the concept of transformation in virtual space, allowing you to change the order of space as desired. Chapter 2, "Numbers: The Smallest Unit Constituting a Virtual World," defines the structure of numbers from axioms, which are self-evident propositions that do not require proof, and teaches the basic concepts and operations of functions.
Chapter 3, “Vector: The Birth of Virtual Space,” defines vector space and studies operations and various concepts based on two-dimensional vector space to lay the foundation for constructing a virtual world.
In Chapter 4, 'Trigonometric Functions: Mathematics for Rotation', we will learn about trigonometric functions that are essential for rotational transformations of vector spaces.
Chapter 5, the last chapter of Part 1, "Matrix: A Transformation Tool for Virtual Worlds," concludes by establishing the concept of linear transformation and learning how to transform vector spaces using matrices.
In Part 2, 'Content Creation Basics', we define affine space, a space that contains content, based on the mathematical theory outlined in Part 1, and examine the implementation methods required to create a 2D game in affine space.
Chapter 6, 'Affine Space: Building Moving Virtual Worlds', examines affine spaces and their components, which support translation, rotation, and scale transformations in the form of linear transformations.
Points defined in an affine space come together to form a line, and an algorithm for effectively drawing lines on a computer is also introduced.
In Chapter 7, 'Inner Product: Analysis and Applications of Vector Spaces,' we will learn about the inner product, an operation that can be used to analyze vector spaces and apply it to various situations, and its applications.
After establishing the mathematical foundation necessary for content creation in Chapters 6 and 7, Chapter 8, “Triangle: The Smallest Unit Constituting an Object,” covers methods for forming objects in virtual space based on triangles defined mathematically.
Chapter 9, "Game Engine: The Technology of Creating Content," introduces the structure of a game engine that gathers various objects in one space and manages the camera, as well as the workflow for drawing content in real time.
Part 3, '3D Content Creation', covers extending the 2D game engine structure covered in Part 2 to 3D.
Chapter 10, "3D Space: Creating Stereoscopic Space," covers how to design 3D space and what to consider when implementing rotation and camera transformations in 3D space.
In Chapter 11, "Outer Product: Analysis and Application of 3D Space," we learn about the outer product, an operation that analyzes and applies 3D space. We will examine various application methods that can be used in 3D space by applying the inner product learned in Chapter 7.
In Chapter 12, "Perspective Projection: Transforms That Give Reality to Your Screen," you'll learn how to implement perspective, a crucial element when expressing three-dimensional content, and how to address the new problems it creates.
And in the last chapter of Part 3, Chapter 13, 'Frustum: Optimized 3D Space', the equations of a plane are introduced, and a closed space called a frustum is mathematically defined by combining multiple planes, and then a technique for drawing only objects visible in the field of view is covered, concluding the 3D game engine.
Part 4, '4D Mathematics and Characters', covers the mathematics and character creation methods for reliably implementing rotation transformations in the 3D game engine developed in Part 3.
In order for the transformation in three-dimensional space to work cleanly, the rotation transformation must be designed using quaternions, which are numbers in four-dimensional space.
Since quaternions are an unfamiliar topic that is not covered in university linear algebra or industrial mathematics, there are not enough textbooks or materials to properly study them.
In this book, as a prerequisite for properly understanding quaternions from the ground up, Chapter 14, 'Complex Numbers: Numbers in the Two-Dimensional Plane', covers complex numbers, and Chapter 15, 'Euler's Formula: Rotational Transformation Expressed with Imaginary Numbers', covers Euler's formula.
Based on this, Chapter 16, 'Quaternions: 3D Rotation Designed with 4-Dimensional Numbers', explains the structure of quaternions and then summarizes the application methods required when applying them to actual game engines, completing the basic functions of a 3D game engine.
Finally, Chapter 17, "Characters: The Art of Bringing Games to Life," the book's grand finale, covers how to implement hierarchical structures in game engines and how to apply them to create characters that move through virtual space.
| Development environment for using this book |
The course material was designed to be produced entirely in CPU programming without utilizing graphics card GPUs, allowing students to directly experience and learn the entire rendering process based on mathematics.
Programs that implement computer graphics without using a GPU are commonly called "soft renderers." The example is named CK Soft Renderer after the school I work at. Because CK Soft Renderer operates solely on the CPU, it's not ideal for practical use. However, because it allows you to implement the entire rendering process yourself, it's a valuable learning tool.
To improve rendering speed, we used the C++ language, which has a relatively high barrier to entry, and created examples based on Visual Studio 2022 and 2019 on the Windows 10 operating system.
Basic C++ programming skills are required to practice the examples, but a completed example is also provided so that readers can check the results even if they do not know C++ programming.
Also, on the next page, you can see at a glance the results screen of the entire example that ran the practical examples in this book.
Even if you don't know much about programming, you'll be able to easily understand how math is used in game development.
〈Preview of the Practice Example Results Screen〉
- https://bit.ly/math4game
[Author's Note]
As the keyword "metaverse" has emerged as a new topic in the Internet industry, the technology used to create 3D virtual spaces and virtual characters is receiving greater attention.
These technologies have been developed primarily in the gaming industry, but with the rapid rise of the metaverse, they are being widely used not only in game production but also in various fields such as movies, dramas, broadcast media, concerts, and shopping malls. As they are being utilized as media production tools suitable for the current pandemic era, they are now spreading to all aspects of politics, economy, society, and culture.
A game engine is a cutting-edge software that most effectively integrates technologies related to virtual worlds and virtual characters.
As the scope of game engine utilization expands in recent years, the demand for more precise and advanced virtual spaces is also increasing.
Moreover, in this environment, many practical developers realize the necessity of mathematics.
But there aren't many people who actually enjoy talking about math.
Many people have given up on learning math midway through their school days due to the rote learning and memorization-based math education, or have felt that their math skills were above average during their school days, but that the math knowledge they accumulated as children is gradually declining due to the repetition of patterned development in the workplace.
I was like that too.
It's daunting to have to go back to the math textbooks I used in middle and high school to refresh my faded math memories.
I find myself blaming myself for not studying math harder in school.
However, this is not my past fault, but the fault of the math education system that is filled with rote learning for the sole purpose of entrance exams.
To share my experience, I felt bored with the repetitive task of creating content on a game engine, so I decided to create my own game engine, and that's when I realized the need for mathematics.
From then on, I began to untangle my hardened brain one by one through various math-related books, Wikipedia sites, and internet information.
As I tried to regain my sense of mathematics in my own way, I realized:
My past self didn't do anything wrong.
If I had to point out my own fault, it would be that I didn't know how to use math and just tried to find the answers to problems as others told me to.
Now that I think about it, the order was wrong.
Before learning math, the most important thing was to decide what I wanted to do.
Therefore, this book is neither a general textbook covering general mathematical theory nor a specialized mathematics book that covers a specific field in depth.
Problems that involve solving complex equations, which are common in mathematics textbooks, do not appear in this book.
The primary goal of this book is to provide a practical introduction to the mathematical concepts needed to display something on a monitor screen for those interested in game development and computer graphics.
This reflects my past feelings of being lost when I tried to study mathematics again.
To write this book, I first created an example called CK Soft Renderer, which shows virtual characters in a virtual space in their simplest form.
After that, I worked backwards, organizing and recording the mathematical elements essential for creating examples, and only after reaching the very bottom of the mathematical axioms could I create the table of contents for the book.
While I could have included any number of fun movements and flashy examples related to game production, I've already devoted a lot of space to explaining the mathematical principles and their applications, and since the subject of this book is game mathematics, I've designed the practical examples to be as simple as possible in order to focus on the fundamental principles above all else. (Readers who are curious about the principles of computer graphics that implement realistic, dynamic movements and create flashy visuals are encouraged to refer to other books.)
While writing the first draft of this book, I was able to confirm that my efforts were not in vain as I taught classes based on the book's contents for two semesters.
Students who were once fearful of math no longer find it difficult, and they are now able to freely create virtual characters using the mathematical theories they have learned.
I won't exaggerate by saying that the content of this book is very easy.
The process of understanding and internalizing the entire contents of a book can be arduous.
It will not be an easy journey, but I would be deeply rewarded as an author if readers can experience a sense of liberation from mathematics through this book.
I wish you all the best.
- Developers who want to create their own 3D virtual world that users can freely control.
- Game developers who want to create their own game engine
- Technical artist curious about the principles of visualizing vectors on screen
- Students, developers, and artists who want to learn the basics of linear algebra consisting of vectors and matrices
- Students, developers, and artists who want to learn the basic theories related to 3D graphics
- Game developers who are curious about the quaternion system used by game engines and how it is implemented.
| Structure of this book |
This book is written for those who want to learn or review the basics of mathematics, or for game developers and graphic designers who have given up on mathematics.
The main content can be classified as linear algebra, but among them, it can be said to be linear algebra specialized for computer graphics.
This book is divided into four parts, and is organized sequentially, starting with Part 1 and gradually increasing in completeness, and ending in Part 4.
Chapter 1, "Game Mathematics Supporting the Metaverse," which opens the book, discusses why game mathematics is necessary in the Internet world, which will further develop into the metaverse.
Part 1, "Building a Virtual World," covers the structure of virtual space created from numerical order and the concept of transformation in virtual space, allowing you to change the order of space as desired. Chapter 2, "Numbers: The Smallest Unit Constituting a Virtual World," defines the structure of numbers from axioms, which are self-evident propositions that do not require proof, and teaches the basic concepts and operations of functions.
Chapter 3, “Vector: The Birth of Virtual Space,” defines vector space and studies operations and various concepts based on two-dimensional vector space to lay the foundation for constructing a virtual world.
In Chapter 4, 'Trigonometric Functions: Mathematics for Rotation', we will learn about trigonometric functions that are essential for rotational transformations of vector spaces.
Chapter 5, the last chapter of Part 1, "Matrix: A Transformation Tool for Virtual Worlds," concludes by establishing the concept of linear transformation and learning how to transform vector spaces using matrices.
In Part 2, 'Content Creation Basics', we define affine space, a space that contains content, based on the mathematical theory outlined in Part 1, and examine the implementation methods required to create a 2D game in affine space.
Chapter 6, 'Affine Space: Building Moving Virtual Worlds', examines affine spaces and their components, which support translation, rotation, and scale transformations in the form of linear transformations.
Points defined in an affine space come together to form a line, and an algorithm for effectively drawing lines on a computer is also introduced.
In Chapter 7, 'Inner Product: Analysis and Applications of Vector Spaces,' we will learn about the inner product, an operation that can be used to analyze vector spaces and apply it to various situations, and its applications.
After establishing the mathematical foundation necessary for content creation in Chapters 6 and 7, Chapter 8, “Triangle: The Smallest Unit Constituting an Object,” covers methods for forming objects in virtual space based on triangles defined mathematically.
Chapter 9, "Game Engine: The Technology of Creating Content," introduces the structure of a game engine that gathers various objects in one space and manages the camera, as well as the workflow for drawing content in real time.
Part 3, '3D Content Creation', covers extending the 2D game engine structure covered in Part 2 to 3D.
Chapter 10, "3D Space: Creating Stereoscopic Space," covers how to design 3D space and what to consider when implementing rotation and camera transformations in 3D space.
In Chapter 11, "Outer Product: Analysis and Application of 3D Space," we learn about the outer product, an operation that analyzes and applies 3D space. We will examine various application methods that can be used in 3D space by applying the inner product learned in Chapter 7.
In Chapter 12, "Perspective Projection: Transforms That Give Reality to Your Screen," you'll learn how to implement perspective, a crucial element when expressing three-dimensional content, and how to address the new problems it creates.
And in the last chapter of Part 3, Chapter 13, 'Frustum: Optimized 3D Space', the equations of a plane are introduced, and a closed space called a frustum is mathematically defined by combining multiple planes, and then a technique for drawing only objects visible in the field of view is covered, concluding the 3D game engine.
Part 4, '4D Mathematics and Characters', covers the mathematics and character creation methods for reliably implementing rotation transformations in the 3D game engine developed in Part 3.
In order for the transformation in three-dimensional space to work cleanly, the rotation transformation must be designed using quaternions, which are numbers in four-dimensional space.
Since quaternions are an unfamiliar topic that is not covered in university linear algebra or industrial mathematics, there are not enough textbooks or materials to properly study them.
In this book, as a prerequisite for properly understanding quaternions from the ground up, Chapter 14, 'Complex Numbers: Numbers in the Two-Dimensional Plane', covers complex numbers, and Chapter 15, 'Euler's Formula: Rotational Transformation Expressed with Imaginary Numbers', covers Euler's formula.
Based on this, Chapter 16, 'Quaternions: 3D Rotation Designed with 4-Dimensional Numbers', explains the structure of quaternions and then summarizes the application methods required when applying them to actual game engines, completing the basic functions of a 3D game engine.
Finally, Chapter 17, "Characters: The Art of Bringing Games to Life," the book's grand finale, covers how to implement hierarchical structures in game engines and how to apply them to create characters that move through virtual space.
| Development environment for using this book |
The course material was designed to be produced entirely in CPU programming without utilizing graphics card GPUs, allowing students to directly experience and learn the entire rendering process based on mathematics.
Programs that implement computer graphics without using a GPU are commonly called "soft renderers." The example is named CK Soft Renderer after the school I work at. Because CK Soft Renderer operates solely on the CPU, it's not ideal for practical use. However, because it allows you to implement the entire rendering process yourself, it's a valuable learning tool.
To improve rendering speed, we used the C++ language, which has a relatively high barrier to entry, and created examples based on Visual Studio 2022 and 2019 on the Windows 10 operating system.
Basic C++ programming skills are required to practice the examples, but a completed example is also provided so that readers can check the results even if they do not know C++ programming.
Also, on the next page, you can see at a glance the results screen of the entire example that ran the practical examples in this book.
Even if you don't know much about programming, you'll be able to easily understand how math is used in game development.
〈Preview of the Practice Example Results Screen〉
- https://bit.ly/math4game
[Author's Note]
As the keyword "metaverse" has emerged as a new topic in the Internet industry, the technology used to create 3D virtual spaces and virtual characters is receiving greater attention.
These technologies have been developed primarily in the gaming industry, but with the rapid rise of the metaverse, they are being widely used not only in game production but also in various fields such as movies, dramas, broadcast media, concerts, and shopping malls. As they are being utilized as media production tools suitable for the current pandemic era, they are now spreading to all aspects of politics, economy, society, and culture.
A game engine is a cutting-edge software that most effectively integrates technologies related to virtual worlds and virtual characters.
As the scope of game engine utilization expands in recent years, the demand for more precise and advanced virtual spaces is also increasing.
Moreover, in this environment, many practical developers realize the necessity of mathematics.
But there aren't many people who actually enjoy talking about math.
Many people have given up on learning math midway through their school days due to the rote learning and memorization-based math education, or have felt that their math skills were above average during their school days, but that the math knowledge they accumulated as children is gradually declining due to the repetition of patterned development in the workplace.
I was like that too.
It's daunting to have to go back to the math textbooks I used in middle and high school to refresh my faded math memories.
I find myself blaming myself for not studying math harder in school.
However, this is not my past fault, but the fault of the math education system that is filled with rote learning for the sole purpose of entrance exams.
To share my experience, I felt bored with the repetitive task of creating content on a game engine, so I decided to create my own game engine, and that's when I realized the need for mathematics.
From then on, I began to untangle my hardened brain one by one through various math-related books, Wikipedia sites, and internet information.
As I tried to regain my sense of mathematics in my own way, I realized:
My past self didn't do anything wrong.
If I had to point out my own fault, it would be that I didn't know how to use math and just tried to find the answers to problems as others told me to.
Now that I think about it, the order was wrong.
Before learning math, the most important thing was to decide what I wanted to do.
Therefore, this book is neither a general textbook covering general mathematical theory nor a specialized mathematics book that covers a specific field in depth.
Problems that involve solving complex equations, which are common in mathematics textbooks, do not appear in this book.
The primary goal of this book is to provide a practical introduction to the mathematical concepts needed to display something on a monitor screen for those interested in game development and computer graphics.
This reflects my past feelings of being lost when I tried to study mathematics again.
To write this book, I first created an example called CK Soft Renderer, which shows virtual characters in a virtual space in their simplest form.
After that, I worked backwards, organizing and recording the mathematical elements essential for creating examples, and only after reaching the very bottom of the mathematical axioms could I create the table of contents for the book.
While I could have included any number of fun movements and flashy examples related to game production, I've already devoted a lot of space to explaining the mathematical principles and their applications, and since the subject of this book is game mathematics, I've designed the practical examples to be as simple as possible in order to focus on the fundamental principles above all else. (Readers who are curious about the principles of computer graphics that implement realistic, dynamic movements and create flashy visuals are encouraged to refer to other books.)
While writing the first draft of this book, I was able to confirm that my efforts were not in vain as I taught classes based on the book's contents for two semesters.
Students who were once fearful of math no longer find it difficult, and they are now able to freely create virtual characters using the mathematical theories they have learned.
I won't exaggerate by saying that the content of this book is very easy.
The process of understanding and internalizing the entire contents of a book can be arduous.
It will not be an easy journey, but I would be deeply rewarded as an author if readers can experience a sense of liberation from mathematics through this book.
I wish you all the best.
GOODS SPECIFICS
- Publication date: February 22, 2022
- Page count, weight, size: 652 pages | 1,198g | 185*240*27mm
- ISBN13: 9791189909376
- ISBN10: 1189909375
You may also like
카테고리
korean
korean