[Xichuan Shansi] concept of 3D graphics and rendering pipeline (5 rounds)

Source: Internet
Author: User
Http://www.opengpu.org/forum.php? MoD = viewthread & tid = 7550 & extra = Page % 3d1

 

This article is taken from the 3D graphics technology serialization of Xichuan Shansi, 99 times
This post is 9 ~ 13 times, strive for every 1 ~ Let's make another update in two days. Updated in half a year.
I also hope you can support it.

Translation trace
Proofread and comment qianma GaN

 

Render Pipeline)

We have introduced the history of 3D graphics. Next we will explain the processing process of 3D graphics.

Flowchart of 3D graphic Pipelines

Figure 1 shows the flow model of a 3D image. Although this is the GPU process model corresponding to DirectX 10/sm4, some processes may be processed in more detail based on different GPUs, and sometimes it will be simplified. Please understand this.

First, we will introduce the root cause of 3D image processing. This is because, in the long and short history of real-time 3D graphics, this part needs to be processed smoothly, more importantly, it is easier to design the GPU for implementation. This process is not significantly different in either direct3d or OpenGL.


Figure 1 GPU internal rendering process

The CPU is responsible for the 3D graphics processing part = the game engine?

The [1] and [2] sections in Figure 1 are mainly processed in the CPU.

Configure 3D objects or move them before setting them. Because these two types are very similar, all these processed parts in the system are called the [Game Engine].

In the game engine, follow the keyboard input, mouse input, game control input to move a 3D role, or perform collision detection when a shot hits an enemy. Based on the collision results, although it is necessary to perform physical simulation of 3D players, these are the parts of the game logic, in a sense, the same as [1] [2.

In addition, if the GPU corresponding to DirectX 10/sm4.0 exists in [2], you can also use geometry shader on the GPU, point Sprite, such as particle or billboard, uses geometry shader for creation and destruction to process GPU intervention. Even so, in general 3D Game processing, this part is still processed by the CPU.

What is the coordinate system of vertex pipeline and vertex shader?

The section of the red line [3] [4] [5] [6] In the figure is the vertex pipeline for processing vertex correlation.

It usually starts from here as part of processing within the GPU. However, in order to simplify the internal logic to reduce costs, it is also called [Unified chipset] to integrate graphics Functions, and transfer this vertex pipeline to the CPU (simulation) system.

So, until a little earlier, this vertex pipeline is often called []. The so-called geometry is [ry]. In high school, although I will learn [vector operations] and [linear ing (Linear Map) in mathematics or [algebra • ry) or linear transformation (linear transformation)], but this is the thing in that world. To put it bluntly, NVIDIA's GPU and geforce series names are abbreviated by geometric force, which can be said to have a wordout with [g-force gravity.

Let's turn the topic back to the [3 dimensional vector] concept in 3D graphics. Simply put, we can think of it as [the "direction" in the 3 dimensional space. These "Directions" are represented by the coordinate values of the three axes of X, Y, and Z. These "Directions" are referred to as [coordinate systems].

"Local Coordinate System". If the specific description is for a 3D role, the orientation of the 3D role is the reference coordinate system of the 3D role, by processing [where is the orientation], the controller is easy, so the concept of a local coordinate system is used.

By the way, although most 3D roles have arm and foot, considering that the hands and feet bend at the joints, if you use the local coordinate system as the reference for joint control, it will be easier to understand, but in this case, you need to make the local coordinate system into a multi-layer structure, and the final processing will become difficult to understand.

Next, it is necessary to control the overall coordinate system of the 3D Global space. This is the [World coordinate system]. When processing the vertex units in the vertex pipeline of a 3D image, the transformation from a local coordinate system to a world coordinate system occurs multiple times.

The generated vertex must undergo coordinate system transformation based on the shader program, that is, [3] [Vertex coloring language] [vertex shader]. You can perform unique and special coordinate system transformations by using the coloring tool.

Figure 2 concept diagram of Coordinate System

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.