Games104 Introduction to Modern Game Engines - Rendering System in Lecture4 Games

insert image description here

1. Is there a game to choose people?

insert image description here
Drawing is the hardest part professionally.
There are games without an engine – word games.

2 Graphics Rendering Theory

Radiosity Algorithm
insert image description here

3 Challenges of Game Rendering

1 There are many objects, and there are many types of rendering effects

insert image description here

2 Need to be deeply adapted to modern CPU and GPU

insert image description here

3 Frames are getting bigger and bigger

insert image description here

4 CPU bandwidth

insert image description here
insert image description here

4 Rendering framework of game engine

GPU hardware architecture;
material, shader, lighting
Special rendering
pipeline: delayed rendering. . .

insert image description here
This course does not cover the following sections:
insert image description here

5 renders

insert image description here
Things stuck behind pixels;
projections and rasterization

insert image description here
Then start coloring;
data operations, constant access, and texture access can get the results you want.
insert image description here
Mining textures is actually very resource-intensive.
One of the pixel colors, I need to interpolate 7 times
insert image description here

6 GPU

insert image description here

1 SIMD and SMIT

SMIT: The same instruction is executed many times at the same time.

With the same code, everyone runs together.

insert image description here
Structures are repeated.
A graphics card puts many cores.
SMT architecture
insert image description here
insert image description here
Data flow in the computer is very resource-intensive. Moving data around in different cells is also very slow.

Data is transported in one direction, from cpu to GPU, try not to read data from GPU.
insert image description here
Buffering has a huge impact on modern computing.

a On my memory, the cpu finds that it is not in its own buffer, and needs to find it in the memory, and needs to wait for more than 100 clock cycles.

The data must be kept together.
The data is in my buffer, cash hit. If not in the buffer, cash gap.

If the texture is not done well, if you always let the computer do cash gap, the efficiency will drop.
insert image description here
GPU Bounds and Performance

A computer is an assembly line, if there is only one card owner, it will be stuck

insert image description here

7 Modern Hardware Pipeline

insert image description here
insert image description here

Before learning rendering, you need to understand how the graphics card works?

insert image description here
As a game developer, it's good to know some concepts.

8 Renderable

insert image description here
Meah render component is the core of render
2

1 Mesh

insert image description here
Store the index value, the number of fixed points is only half of the triangle; it can save memory.

insert image description here

Each vertex has a normal: each vertex must define a normal.
insert image description here

2 Material

It is easy to confuse the material system with the physical material;
the emphasis is on the coefficient of friction, which are similar but not the same.
Physical materials are defined separately.

insert image description here
insert image description here

3 textures

Texture is a very important form of expression in materials.
insert image description here

4 shader

It is source code, but it will be treated as data in the game.

insert image description here

9 Render in Engine

insert image description here
insert image description here
Submesh is segmented according to each object, each object, and each mesh according to the material, and then the same material is classified together and managed with a large library.

insert image description here
Many shaders are the same.
insert image description here

insert image description here
instance must keep in mind: this data is my definition, this data is my instance.
insert image description here
insert image description here
GPU Batch Rendering: Optimization

Many objects are exactly the same,
insert image description here

10 Visibility clipping

is basic
insert image description here
insert image description here

1 bounding box

Bounding sphere
AABB: Axisymmetric bounding box, the calculation efficiency is the highest
OBB: Axial bounding box
Bounding box is the basis of calculation.
insert image description here
BVH:
insert image description here
BVH is used a lot, and it is suitable for acceleration of dynamic scenes!
insert image description here
PVS: Thoughts are useful
insert image description here
insert image description here

insert image description here

2 GPU Culling

Store the depth first, and look at the depth when rendering.
The depth map of the occluder is useful for complex scenes.

insert image description here

11 Texture Compression

Very important module.
insert image description here
The compression algorithm does not support access.
The idea is to cut into small pieces and then go to compress.
insert image description here
Block Compression
BC7, DXTC

ASTC/ETC/PVRTC

insert image description here

12 tools

blender is getting better and better.
insert image description here
insert image description here
insert image description here

scanning, entity-based scanning
insert image description here
insert image description here
insert image description here

13 Cluster-based mesh pipeline

insert image description here
Model Representation Pipeline

Very detailed models – divided into very small parts.
Very efficient to deal with
insert image description here
countless refinements of triangles,
Meshshader - can use an algorithm, the code is not easy to understand.
A cutting-edge direction that needs much attention.

insert image description here
insert image description here
insert image description here
insert image description here

14 Nanites

insert image description here

15 Draw the four points of the system

(1) Engineering science: rely on hardware, know where the performance is stuck,

(2) The relationship between mesh, model, and material data, and the relationship between mesh and submesh is a very good solution.

(3) Let the computer do nothing when optimizing

(4) Use GPU computing.
insert image description here

16 PILoT

study alone
insert image description here

17 videos

Guess you like

Origin blog.csdn.net/qq_41286360/article/details/124026000