Getting Started Basic Concept - Excerpt

xiaoxiao2021-03-05  31

ConverseHeavenpr MM Original works set (Elfin sorting)

Heavenpr (referred to as HPR), a 1X year from New Zealand, studying MM (according to the paradise, Su Hangcai will produce this PLMM ^^ /) is "basic principles of basic principles of graphics acceleration technology" written by gzeasy.com. In addition, Heavenpr also wrote two graphics card test software for Gzeasy - FillRateBenchmark 2004 and Virtual Shading Studio.

BTW: This person is extremely mysterious, and its personal information has not been confirmed. . . Another expertise in this person, the strong knowledge of the water is really hiji (55555555)

-------------------------

Graphics Acceleration Card Technology Forum: 1. Getting Started - Graphics Acceleration

(Posted in gzeasy.com: JUL 20 2003, 04:14 PM)

It's been a long time, and it has a probably aware of the friends here.

IMHOS, the name here is the "Graphic Acceleration Card Technology Forum", but the scenario is not the case. Buy, change card, and even games are also technically, I don't say anything, but N more people say something that has no relationship, or let people feel completely impressed, I will leave us bad. impression.

In general, friends in the forum also have several people in software, hardware and comparing, and we can also observe from their words. However, most users, although it is a computer enthusiast, it may not be much in contact with the various aspects of the computer, so always ask some repetitive, basic issues. Some friends even don't even know what the graphics card is used. In view of this, I have a lot of time, to write this article, there may be any intermediate articles, advanced articles, XX level (!), Etc., the main purpose is to give the vast number of hardware enthusiasts A chance, also testing my 8 years experience. If you have any confidential place, everyone can correct it, I am sure to accept it.

Also, this article is written in my own, some of which may refer to some meaningful literature, but I will indicate. I usually speak, the post is lazy, but this academic description, I will try to use words with caution. Here, I don't want to bring you back to ancient times, starting from the beginning of the development of the computer, because I am embarrassed to the history of the computer, I am embarrassed, and I have learned very badly. Also, thank you for everyone!

Question: Getting Started ---- Graphic Acceleration Total

First, let's take a blunt word: Graphics Acceleration Card. It is an expansion card used to accelerate graphics processing. What is the so-called graphic processing? Pure text era computer, the command and text of the line, not called graphics processing. :-P graphics and text are two things that the computer outputs to people "see".

First, the text, the forgotten era

The real text is handled, very unfortunately eliminated after DOS. So there is no "text accelerated card" stream, because the current graphics card, even if there is no text processing function, you can work properly under Windows. Here, some people may ask: Writing in Windows, isn't it "text"? The answer is: For you, it is. But for the computer, it is not a text. The text in Windows is also a graphic. Those texts are "painted" by Windows. Open the "font" in the control panel, what did you see? A wide variety of fonts is. These are not stored in the graphics card, but on the hard disk. When Windows receives commands that print a line on the window, it dispatches the "Draw" word, read the font from the hard disk, and draw it on the screen. Now it is clear: Windows interface is completely graphically based. So the graphic acceleration card is very important for Windows. Ok, now, let us forget "text"! Second, the definition of graphics, pixels and others

Let's take a look at the definition of the graph. There are two distinct definitions in the computer in the computer. The first type is called Raster Graphics, and the second is called vector graphics. The so-called "raster pattern", each computer player has a wide range of contact. You now open the "brush" program of Windows, just draw a few rounds, a few lines, a few pieces of colors, then enlarge you to zoom in 8 times (this doesn't have to guide you ?!) What did you see? Is it a small piece of a piece of a piece of graphics? Every small square is called a pixel "Pixel". That is, your graphic is a small pixel.

Staring at a pixel, what do you find? correct! There is only one color of a pixel! (#% @ #% ^ @). People who know a little color should be known that the light is combined with the three primary colors of red (BLUE) and blue (Blue). One pixel in this pattern is also made up of red, green and blue. Among the most widely used computer graphics, each primary color, from eight 0 or 1 binary numbers, that is, the performance of each color is 2 ^ 8 = 256, called "color" Order. Have you learned statistics? Each primary color 256 color order, then how many colors of the three primary color of R / G / B? ......... Are you in the high school mathematics? Cough, forget it, or let me tell you. To take them. The result was 256 x 256 x 256 = .... 16777216. Wow? ! so much? Ok, let us use the computer habit to come to it. It separates: 16,777,216 = 16m. This is what people often say 16 mega, true color, etc..

Here is a little episode. If a dye is 8 positions, then R / g / b accounts for 8 8 8 = 24 bits. However, the 24-bit 32-bit computer system is a very uncomfortable length. It should be 24 bits for the 32-bit processed by the computer, but the two 24 bits are processed once, and the processing power of 32 bits should be processed. How to do? Only behind the 24-bit color, then make up the 8-bit empty data. In this way, the color of a pixel will take up 32 bits, just right and the processing capability of the 32-bit system. This is more comfortable to handle it. "Empty data? Do you mean that every pixel is wasting 8 data?" The answer is not yet. The last 8 although there is no effect on the display of graphics, but because there are more than 8 digits here, people always have to make full use of existing resources. So another concept is added to the pixel: transparency. That is, all the pixel alpha values ​​of all earmidden dyes. Save alpha, good creative with original 8 bits that have not been used. In this way, we can mix a pixel and another pixel to make overlapping effects depending on the transparency of the pixel. This is a mixture of ALPHA mixed effects in the legend. Quite simple. Here, we express the most commonly used pixels with comparative professional format: R8G8B8A8. Wow, what? Ok, disassemble: R8, G8, B8, A8 is also red 8, green 8, blue 8, transparency 8 bits. It's a good one to let people look like it ~ The raster pattern is introduced here. Next another hero debut: vector graphic. Don't underestimate it, now a large part of it is based on it.

The raster graphic is a point, while the vector graphics are? In fact, it is also a point, but there is a mathematical formula. This way: If the raster graphic is telling the computer what color is painted at each point, then the vector graphic is how to draw a graphic. For example, a circle. If you are expressed with a raster pattern, then there is a pile of pixels to move the colors of each point in the area where the circle is located. The vector graphic is used to indicate: it is a circle, circular center, round radius (possibly a circle color). It's that simple. When the computer draws two pictures, it is very different from work. When the screen is mapped, the computer reads all the pixel data, and then the original model is like a copy to the display cache so that we will see this round on the screen. The circle of painting vector is completely different: First, the computer should determine the roundness of the circle, radius, then find this circle will fall on which piece of the screen. This is a very important step, called setting (SETUP). After finding the screen area where the circle is located, you can fill this area with the specified colors. This step is rasterize. The area where the circle is located is filled out, and we will naturally see this round.

This is the initial basis of computer graphics. Keep in mind the definition of the raster graph, vector graphics, and vector graphics. There are two steps in general, which is set and rasterized. This is important in the later 3D graphics knowledge.

Ok, I wrote so much in a breath, I will take a break. Everyone is slowly digested. Where else is not to say it.

(Original source: http://bbs.gzeasy.com/index.php? Showtopic = 35024 & view = findpost & p = 413893)

------------------------- Graphics Acceleration Card Technology Forum: 2. Principle - Graphics Acceleration

(Posted in gzeasy.com: JUL 20 2003, 06:38 PM)

Review: Previous, I will give you a simple introduction to what is graphics, there are several types, and their paintings, can you read it?

Question: Principle ---- Graphics Acceleration Acceleration

A long time ago, the drawing work was done by our great and sacred CPU. At that time, the graphics card was the truly used to "display the card". It works to put the CPU to handle data "move" to the display. At that time, the work of the CPU was really hard. Now it is good, the CPU is getting faster and faster, but the work to do is less and less. Let me first talk about several phases of graphics acceleration. 2D image acceleration, Windows acceleration and 3D image acceleration.

First, 2D acceleration of simple dead plate

2D acceleration, it was a product. Its role is to use the display chip instead of the CPU, the data in the whole block of movement. For example, you have to move a window, in the era of 2D acceleration, CPU works: 1. Find the address in the window, 2, copy the line data to the destination address, 3, repeat 2 until copy all the lines . carry out. In this way, when the window is large, the amount of data to be processed will be done, resulting in the movement of the window to climb the snail is slow ... I want to experience it? Ok, enter the device manager, remove your graphics card, then restart .... Let's enjoy it! Ha ha

With 2D acceleration, the CPU has done a lot, but it is necessary to guide the display of the chip to dry this. CPU's work: 1. Find the address in the memory, 2, send the "copy this line to the destination" command to the graphics card. 3, repeat 2 until all rows are copied. It seems that it seems that it is similar to that it is not accelerated, but the second step is the key.

Now let's take a second step in decomposition: no 2D acceleration: 1, read 32 bit data (entry in the door!), Write this 32 bit data into the destination. 2. Repeat 1 until all pixels are processed. And the work after 2D acceleration is only: 1, send commands to let the graphics to copy this line. In this way, 2D acceleration does have a large extent to release the burden on the CPU. So everyone now lifts a window moving, is it very smooth? The graphics card is responsible for the movement of the window.

Second, a weird Windows acceleration

Windows can be described with "strange" for each PC programmer. Windows has too many specific things, so that the graphics card must also develop a set of acceleration plan for Windows itself. The graphics card with all Windows acceleration features is almost no, and the current CPU is enough to make up for the shortcoming of Windows without all hardware acceleration. In general, the acceleration of the mouse cursor, the acceleration of the icon and the special window acceleration, and the like.

The mouse acceleration is the hardware of the graphics card to handle Windows mouse cursor. Everyone now seeing the mouse cursors and other content on the desktop are actually not the same layer. It is in the "top" in the graphics card to be divided separately. If you don't have to introduce more detailed, I tell you a way to distinguish. Open an animation window, that is, the content has been changing window, then move the mouse cursor. If the cursor is constantly flashing, the graphics card does not accelerate the mouse cursor. Conversely, if the mouse is screened, the graphics card is accelerated to the mouse cursor. The acceleration of the icon is the function of the graphics card to paint the Windows icon. This function is really less, but the 32Bit transparent chart currently used in Windows XP, modern graphics acceleration card can play a certain degree of acceleration.

Special window acceleration: Does the window acceleration do not use 2D acceleration function? What special? Of course. Move a window, hey, now you know what your computer is doing. However, when a top window is on the window you move, it is a "total in the forefront" window (Windows fixed name) blocks on the desktop, and you move a window below .... Like, I can't explain it! ? At this time, Windows has to do something is slightly different. It first locates the section of the window to be outside, then divides the entire window into a small piece, one another moves them to the target location. Is it more troublesome? And if you use a graphics card with a Windows accelerated function, you can handle this yourself. Windows accelerates this way, because it is too large, I don't know all. So next, our protagonist appeared ------

Third, complex huge 3D acceleration

Everyone likes to rendering 3D animation (except for dizziness). Seeing the virtual protagonist jumps on the screen, killing, saving the world, who is not excited! Speaking of 3D acceleration, because it is too complicated, I have to pay 5 partials, covering the 3D accelerated basics of simplification from the past, from the past to the future, so that everyone can learn more about our silently 3D accelerator cards jobs.

3.1: Colored triangles

The world is starting like this. It is thought of using a triangle to represent 3D objects. In fact, it is very simple. I have learned that the students of high school geometries know that three points are determined a plane. So the triangle is always flat. In this way, the complex surface object is approximated by a small plane, which is convenient to the top of the painting. To look at a triangular process: the previous article I have talked the process of drawing the vector. In fact, a triangle is also equivalent to a vector illustration. It consists of three vertices. There are two steps as the process of drawing: 1, find a triangle will be located on the screen which place. 2, fill this place with the color. That is, the process I mentioned (SETUP) and rasterize. Because the object is a triangle, we give these two processes to name: Triangle Setup and triangle rasterize procedure. Oh, there is a bit of modern graphics mean! At the beginning of the 3D graphics, only color, there is no current map, texture, etc., so generated images are sensible. At that time, I didn't have a concept of 3D games, and the professionals didn't care about this ...

3.2: Texture? Skin ... color mix

People obviously do not satisfy something that always looks at the bare triangle on the screen. So slow someone thinks: How do we give the triangle stickers? Speaking of texture, look at your home furniture, what is the wood grain on your surface, really is a bit similar to the textured texture of the triangle! Texture maps play in the 3D graphics field, and the wallpapers in real home, the stickers do so much. And at the time of the initial time invented in the texture map, some people opposed it! Some people think that the texture map is something that is useless, so that the company has produced a graphics card that does not support texture map (without TMU graphics card, can you imagine? The company's name I forgot)! However, the texture map still shows its powerful charm. Now 3D graphics technology, texture map is also a separate study. Some people will ask, how did the texture map stick to the triangle? The interpretation of this process is more complicated. You can try to imagine: Texture map requires coordinates to specify, just like you paint fixed points on the table just doing, so that the sticker is attached to the Qi Ding point. That is, the vertices of each triangle include a map coordinates, which can be attached to the corresponding position according to the map coordinates when it is processed. How to post? ! I haven't said yet? Oh, yes, huh, how to post it? This is the stage of the triangle setting, the map coordinates are also applied to each pixel. Specifically, I know the picker coordinates of the vertex, then the map coordinates of any one in the triangle should be calculated? ! Yes, it is interpolated. Using interpolation, we can draw the map coordinates corresponding to each point of the pixel of the triangle to be drawn, isn't it? With this map coordinate, it is more simple. We use coordinates, go to the map to get the corresponding coordinate color, don't you put the picture? Oh, this is a bit around, and I blame my text expression ability, everyone looks like a few times, I am sorry!

Also, with the color mix of texture map, it should also be returned to this section. Color mix ... I know! Is it a pixel that mixed two pixel operations with a pixel alpha value? correct! However, the mixing of the color is not limited to Alpha hybrids. There are still many mixed methods. For example, add the color of triangular pixels and the original pixels on the screen, which looks like it is "highlight". The flames in the game, the aura, etc., it is done with addition. Similarly, the color of the two pixels is subtracted, multiplied or removing is not taste, this is all - color mixing. Because there is a color mix, a variety of cool game special effects can be realized.

3.3: The revolution of the graphics card

What is said above, people have long been in some graphics chips. In this way, these all the work is liberated from the CPU. Ok! But CPU is still unfounded: I want more freedom! People want to mild the burden on the CPU. Therefore, in the end, the Pandora box before the triangle is set, and the Pandora box before the triangular rasterization has also been liberated. This is: Geometric transform and lighting operations (T & Lighting, T & L).

When you say this, you have to talk about these two pure mathematics. Geometric transform: Everyone knows that we can see the 3D graphics on the screen, which is drawn in a viewpoint as a viewpoint. How is this complete? Also, how do 3D objects move throughout the scene? This involves topics prior to graphics: 3D space geometry. Each 3D object has a data array that describes its location, direction, and we call it matrix. This matrix stores information on the location, rotation direction, scaling of the object in the scene, rotation, scaling, and the like. So when the object moves, we don't make fine to change the position of all triangles, only modify the information in the matrix, and the whole object is moving. The application of the matrix is ​​not only the case. Finally, the entire scene is to be converted into a camera-centric 3D space, which is also related to the matrix. Light, another mathematical process, is used to calculate the triangle to accept the intensity of the light relative to the position, distance, angle, etc. of the top of the triangle relative to the scene in the scene.

Previously, these two pure mathematics processes need CPUs to complete. After the CPU calculates all triangular data, the data is sent to the graphics card for setting and rasterization. However, later, people found that these operations are so dead, so that they can also integrate it into the display chip! This is the origin of the hardware geometry.

So, here, the CPU doesn't have anything. Modify the matrix of an object to set the parameters required, then send a command to the display chip: Draw! The rest is not worrying ...

3.4: Birth of the new CPU: GPU

So is it a graphics processing unit if it is displayed? NVIDIA is said so, but as a true processor, there is no programmable, it is also disabled. After the layers set with tired graphics card, the programmers screamed: I also brought me free! They urgently need a design that breaks the current hardware dead. Because everything is done by hardware, the flexibility is completely lost. The display chip can only process triangles according to circuit design, which has become a dull "triangular processor". At this time, people began to reflect, people think that the maximum freedom to programmakers makes them the key to writing a good 3D program. So - the programmable graphic chip is designed. The maximum difference between this chip and the previous T & L chip is that all of its behavior can be composed. The function of making it has increased to an unlimited height.

In turn, think about it, when there is no hardware 3D acceleration, everything is done, although slow, but flexible. Then, all hardware, flexibility, also dropped. At the end, the programmable graphic chip is achieved with speed and flexibility. At this time, the programmer did something, it seems to return to the original era: written the program to do light, turn, and rasterize the triangle. But what is this? They like freedom!

Everything is very good, we are very happy: This is what I want. Is it very satisfied? But the truth is not as perfect as you think, God loves to catch people ... ..

3.5: Truth? fallacy?

It has developed so many years, and the 3D graphic of rasterization can be said to be technically mature. However, the graphic it produces seems to be never true. Even if people do a big effort, its picture is always an animation, and the "movie level of the movie level" is always like this ...

Where is it wrong? At the same time, another branch of 3D graphics: Ray-Tracing is also developing fast. Light tracking graphics and rasterization graphics are based on completely different theoretical, and their research results are also incorporated. The theoretical basis of the light tracking graphics is to track each of the light, and accurately calculate the subsequent colors of the light through reflection, refraction, and scattering and the like. Due to the principle and complexity, the human material is less than the rasterized graphics, so that it is now, it has just emerged. And it really puts into the stage of civil and real-time processing, I am afraid I have to develop around ten years. And if it is successful, now all rasterized graphics theories will be overthrown. Who will get the last award? We will wait and see ....

Postscript: After writing this, I am surprisingly discovering that the history of the development of every aspect of human beings is so magical, full of mythology and opportunities. As a graphics researcher, I have seen the future joy, and I also sent a deep feeling for the progress of human beings ...

(Original source: http://bbs.gzeasy.com/index.php? Showtopic = 35063 & view = findpost & p = 414520)

-------------------------

Graphics Acceleration Card Technology Forum: 3. Advanced Articles - Graphics

(Published in gzeasy.com: Jul 21 2003, 03:20 PM)

Graphics Acceleration Card Technology Forum: Advanced Articles ---- Graphics Duty

Review: In the principle, I briefly told the graphics acceleration, how the graphics card accelerated, and the history of long 3D acceleration. 5 stages of 3D acceleration are milestones, I hope that each graphic enthusiast can understand. In addition, netizens mentioned the concept of "radiosity" rendering, which is another branch in 3D graphics. Its principle is very different from Ray-Tracing. Such a final technical competition will be more fierce ...

Question: Advanced Articles ---- graphics

If you want to speak light grid graphics from the beginning, not only I can't finish it, it is impossible to finish. Because my knowledge is limited, I can only write me the mainstream, useful knowledge, and useful knowledge. Learning, to hold an open mind, even if you have learned the sentence tomorrow, don't feel that you have not used it, because the experience in the process of learning will make you learn new knowledge faster. . Today, let's talk about the graphics process of the 3D acceleration card.

In the previous "principle", you should also know that the 4 phases of 3D graphics needs need to pass, think! See you can say them before I have said it ... Yes, they are:

First, geometric conversion (Transform)

As you know, the 3D object is made up of triangles. Each triangle is three vertices. Just move the position of these three vertices, then this triangle will naturally follow (% $% $$ # &% $ #). Therefore, the objective object corresponding to the geometric conversion is Vertex. Everyone wants to think, what actions can an object do in 3D space? The most basic should be: translation, rotation, zoom, twisted, projection, etc. ... Specific processes and computments, friends I want to learn from college's linear algebra should be very clear, I don't want to talk too deep in this article, Therefore, everyone only needs to see the geometry as a black box, enter the unprocessed vertex on the left, and the right to handle the vertices. For specific processes, you can find a matrix operation online. The matrix has a special nature that can combine all transformation into a single matrix by multiplying transformation. That is, for example, T1 is translation, T2 is rotation, T3 is zoom, then T '= T3 * T2 * T1. In this way, T 'is to translate an object and then rotate, and finally zoom the matrix. This feature is very important, it saves a lot of work for computer graphics.

After the geometry, there is still a job to do, that is crop. Simply put, the cropping is removed from the part of the object outside the screen, so you don't need to deal with something you can't see, thereby saving the processing.

Second, Lighting

Speaking of illumination, here you must mention another element of the vertex: the normal. The normal line is a line perpendicular to the plane. When the vertex is to be handled by the light, the normal process is involved in a very important process. Some people will ask: What should I do? Since the normal is a simple surface, then we can't calculate it according to the face? The answer is: This is too slow, and a vertex will be shared in many different triangles many times, so that the process will be more complicated. So each 3D model should have a pre-calculated normal. Here, we recognize the three characteristics owned by the vertices: position, normal and - map coordinates. what? I don't know what the map coordinate is? Go back to the second article! Ha ha

The lighting mathematical model can be described as a change. After using the programmable processing characteristics of the new GPU, people have written endless illumination. Here I will give the most simplest illumination model as an example. If you feel enough, you can search the following "3D graphics illumination" on the Internet. I guarantee that you can be filled with illumination. First, we have to get the direction of the light source. Assume that there is a sun in the scene, then its direction is L. The vertex, there is a normal N. We have to get the intensity of the light, just need to do a point: c = L? N. So simple? ! It is so simple. The result of the point is the intensity of the light. Try ... But when you tried, you will find that when the normal direction is directed in the direction, the result is negative ... it seems to have an error. This should be, we should approximate the intensity of the light according to the angle of the normal and rays, so the direction of light is to be reversed, such a point, the result is the relationship between the angle. So, let's correct it: c = -l? N, and when the calculation result is negative, it indicates that the direction is back to the light source. At this time, use the whole black to express it! Ok, the simplest direction optical model has been born! Congratulations on congratulations

The above two processes (geometric transformations and light!) Are completed by the CPU in the first and second generation graphics cards. In the third generation of graphics card, it is completed by fixed hardware, we call it Hardware T & L graphics card. In the fourth-generation graphics card, it is done by programmable geometry. That is, now popular Vertex Shader units. Third, setup (SETUP)

This process is relatively simple, and it is very dead. So even if the latest GPU does not open this feature to the programmer, it is fixed. Just, give the three vertices of the triangle, I said that three points of geometric transformation, cropping, and lighting, find them on the screen, when you find a location, you can proceed to the next step --- - Fill this triangle. This next process is the highlight of the legendary Pixel Shader:

Fourth, rasterization (rasterize)

Find the position of the triangle on the screen, that is, the pixel group, we can start drawing it. There are three basic work: one is to read the color data (Texture Reading) in the texture map according to the map coordinate (AGAIN ...). The second is a series of calculations to the read data and the previously calculated light intensity to obtain the color of this pixel (Texture Blending). The third is to handle it and the color of the current pixel on the screen, then draw this pixel (alpha blending).

In the previous graphics card, these three processes are fixed and sequentially, that is, the graphics card read texture map data in front of the previous cycle, and the mixing of the map is made in advance, and finally the same Mix the color of the new color and the current pixel of the screen with a predetermined method, and finally written to the screen. In this way, the pixel rendering pipeline of the graphics card is equipped with more than one map unit, and the speed of the first process can be improved. For example, the famous Geforce 4 TI series graphics, each pixel rendering pipeline is equipped with two map units, so that when the triangle is used to use two layers, the GeForce 4 TI can map two textures in one cycle. The data is read, and the opposite Radeon 9000 series graphics card is only one map unit, so it takes two clock cycles to read two-layer texture texture data. The fact is the same, the GeForce 4 TI series graphics card is very fast when running existing multi-map games.

Since the birth of GPU, the flexibility of programmable pipeline has been perfectly visible. The unit used to process pixels, called the Pixel Shader unit in DirectX. But in order to take into account the previous graphics architecture, Pixel Shader's first version 1.x is developed, it is necessary to perform SHADER code or in accordance with the traditional process, that is, the map reads first, the map is mixed, the final color is mixed. This flexibility is still very low. In the second version of Pixel Shader, it is also the development process of 2.0, people realize flexible importance, so the second version of Shader will be able to mix the map reading and color mixing procedures. One of these examples is: Environmental reflection map. Its computing process is this: read the offset of the vertex sheet from the first map, offset the current normal, and then read the second map with the offset normal. Everyone can see that between the two maps read, there is an operation process. This is very difficult to write in Pixel Shader 2.0, but Pixel Shader 1.1 is very difficult, even if it can be realized, the entire process is very opaque.

In the above case, the second map unit of the pipeline will be wasted because two textures are read, and the second map unit does not play the function of acceleration. Under this premise, for example, the design of Radeon 9700 reflects a flexible way. It only uses a map unit, but twice the pixel processing pipeline of the above-up graphics card, which can minimize unnecessary decrease in the premise of maintaining performance. Transistor waste. Ok, four processes are here, let's summarize:

The vertex enters the graphics card processing pipe => Geometry => Light => (crop =>) Set => rasterization => Pixels on the screen

How is it, is it intuitive? This is the case that the treatment method of rasterization pattern is like this. In fact, every step has a lot of detailed content, I will slowly speak in the following chapter.

Next time you see ~~

(Original source: http://bbs.gzeasy.com/index.php? Showtopic = 35274 & view = findpost & p = 417598)

-------------------------

Graphics Acceleration Card Technology Forum: 4. Expanding knowledge - interface and function of graphics card

(Posted in gzeasy.com: Jul 22 2003, 05:06 PM)

Graphics Acceleration Card Technology Forum: 4. Expanding knowledge - interface and function of graphics card

Review: In the "graphics card duties", I focus on the workflow of the graphics card as a 3D acceleration card, which is a probably functionality with each process. Let's review which four processes: geometric transformation, light, set, and rasterization. Yes, it is also attached to the geometric transformation. This is the basic generating step of the raster graph. However, the graphics card is not just to play games, otherwise it is called "game card". Ok, let's see ...

Also, thanks to the support and love of netizens, there is your support, I have confidence, I hope everyone can learn useful knowledge.

Problem: Expanding knowledge --- The interface and function of graphics card

In fact, in addition to 3D processing, there are still many functions, especially those with video related functions. However, these functions are made as an extension function to be attached to the graphics card as an extension. So I will say below, not everyone's graphics card has these functions! Let's see the simplest:

First, VGA output interface

Oh, you must laugh at me, VGA interface, this also said? I think all friends who use the computer know the absorbent of VGA, but since it is necessary to introduce the graphics card, of course, it is necessary to comprehensively. The VGA interface is a normative that has been developed earlier, the earliest VGA standard resolution is 640x480, 16 colors. The VGA output signal is an analog signal, that is to say that it expresses the purpose of different colors by outputting different voltages, R, G, and B are transmitted by three signal lines, respectively.

Everyone should know how the CRT (cathode ray tube) monitor is working, and the electron gun is scanned from the left to the right, the image is presented on the display. Regarding the detailed principle of the display, I will not talk more about the category of the graphics card, there is a lot of specific information. I introduced the main purpose of CRT, because the signal of the VGA interface is tailored for the CRT display (OH, how can my LCD will be VGA interface .... Faint). The display is constantly scanning, and the voltage strength of the electron gun is also changed, and the signal of this change is provided by the VGA interface of the graphics card. Here I am going to remind everyone that since it is an analog signal, then there will be a problem with signal attenuation. So this time the transmission quality of the analog signal is closely related to the analog output circuit, VGA interface and cable of the graphics card, and circuit design in the display. Ok, let's take a look at what is in the VGA interface:

1.1 Analog Output Circuit

Analog output circuits, mainly composed of RAMDAC and low-pass filtering circuits. The full name of RAMDAC is: Ram Digital / Analog Converter. That is, a memory digital / analog converter. Its responsibility is to convert the screen data (also referred to as a frame cache FrameBuffer) in the graphics card inventory (also in the memory!) And output it to the display. To display the image, the speed of the graphics output signal and the speed of the display acceptance signal must be complete, that is, to be synchronized. As a result, RAMDAC also carries a certain frequency to provide analog signals to the display. The previous graphics card, Ramdac is a separate chip, so we take an old graphics card, you can see there is a (or more) chips on the card, which is written with RAMDAC, which is this. And new graphics cards, their graphical cores have high integration, so RAMDAC has also been integrated into the core of the graphic.

The role of the low pass filter circuit, I want to see the name, you can guess the difference, that is, filter out high frequency throat, let the low frequency signal pass ... In fact, this low-pass filter circuit is not simple! Any analog signal circuit has a problem with a signal fidelity. Like the filter circuit, there is a set of signal cutoff frequency ranges. That is, the analog signal is not possible to cut from one frequency, there is a possibility that the reduction is poor, so in the design of the low-pass filter circuit, better graphics card tends to use 4 floors, even 5-layer circuits. That is to try to make clean high / low frequency signals, which is very helpful for an increase in the quality of the analog signal output. For example, the analog output section of the Matrox Parhelia-512 uses a 5-layer low-pass filter circuit to ensure the purity of the signal.

1.2 EMI electromagnetic shielding circuit

Pick up a graphics card, everyone can see, behind the blue VGA interface, there is a densely equipped component, but you can find a lot of components, you can find a lot of components. What is going on? In fact, many components in front of the output of VGA are designed to reduce electromagnetic radiation of the graphics card output signal. The use of components of this circuit is particularly picky, and if the component is not good, it will seriously reduce the quality of the signal. So there is only a small number of high-graphics card true use this part of the design. Other graphics cards, in the case of electromagnetic radiation, will omit this part of the circuit, so there are a lot of graphics card VGA ports that are empty, those who are reserved for EMI electromagnetic shield circuit (reserved? It Will it be back? Hehe) ...

Second, TV-Out)

This is a very common function on the civilian grade graphics card. Many medium / high graphics card have already configured it as a standard. The TV-OUT function is of course the output display signal to the TV, and the interface of the TV-OUT generally has two, that is, the common coaxial signal port and the S-Video signal port commonly used on TV, and the format of the signal, also NTSC and PAL. Two international standards. In order to support TV-OUT functions, the graphics card must also have circuits responsible for handling this part of the signal conversion. Similarly, the previous graphics card will have an external TV-OUT chip, and the new graphic processing core also integrates it into it (wow, it is good! What can I integrate?) TV-OUT function for civilian graphics card It is very practical because it can output the computer's screen to the TV, so that the video playing the video can play more interesting with the help of the big screen TV.

Third, VIVO: We are video capture cards

Many friends ask: What is Vivo? As the name suggests, Vivo - Video in Video Out, ie video input and output. For TV-OUT, Vivo's largest difference is that its video input. This graphics card can receive NTSC / PAL image signals through coaxial signal interface or S-VIDEO interface, that is, it can complete the acquisition function of the video signal. Everyone knows that the digital signal in the memory is output to an analog signal interface, and the NTSC / PAL signal is also analog signal, so when collecting them, it is necessary to reverse each other. Process: ADC (Analog / Digital Converter Analog / Digital Converter). VIVO features are generally supported by an external chip because the process of the ADC is required. Some of the latest graphics cores, also integrate VIVO functionality into (...) such as GeForce FX 5900 series.

The number of graphics cards with VIVO features do not only have the graphics card with TV-OUT function. A small number of vendors are equipped with some models of graphics cards with VIVO features. Such functions are more practical for friends who need to record movie programs, or friends with cameras. Because it can input a video or camera signal, save it on the hard disk. But want to watch TV through the graphics card, Vivo function is not. Because it lacks parts specific to the audio signal: high frequency head.

Fourth, TV reception function

A graphics card with TV reception function belongs to a real multi-function composite card. Its type is less. If you have seen the TV card (that is, it is simply used to receive the expansion card of the TV signal), it must have seen it above the above, big, square, weird box. This is a high frequency head. The effect of the high frequency head is to convert the modulated TV high-frequency signal from the air, or the cable television network, converted to video signals available to acquire. Because it is a high frequency signal, it is easy to interfere. Therefore, high-quality high-frequency head materials, work is very good, and the price is also very expensive. Our most common graphics card with TV reception function has ATI's AllinWonder Series graphics card, etc.

With the TV reception function, your computer turns into a TV. Ha ha. Many TV receiving cards also comes with a remote control to make your computer look more like a TV (more than 10,000 yuan to buy a small TV ...). The most important thing is that you can not only watch TV, you can also record the good-looking prod, will slowly return, or leave a commemoration.

Five, the beginning of the digital era: DVI

The DVI interface on the graphics card is probably started in the past two years. The full name of DVI is Digital Visual Interface. That is: the digital video interface. The DVI output is a digital signal compared to an analog signal of the VGA interface. Thus, the display signal will be transmitted to the display in the display signal. The DVI corresponds to a display device of a digital display device, an LCD liquid crystal display, a Plasma plasma display, and the like. The reason is that the display principle of the liquid crystal display and the plasma display is based on a digital signal, so that it can be easily displayed directly when the digital signal output from the DVI is accepted. About DVI details, I will give you a URL. This is the development of DDWG's website. You can find yourself here for yourself: http://www.ddwg.org/ Here I want to explain two everyone Common problems:

5.1 What is the connection between DVI to VGA?

In fact, the DVI interface retains the channel output from the analog signal when developed. DVI has two interfaces: DVI-D (Digital ONLY) and DVI-I (Integerated). The signal of DVI-D is a simple digital signal, and DVI-I is a DVI interface that retains an analog signal channel. You can find a DVI interface to see (why not map? Oh, you find some real thing, impression It is relatively deep!), There is a cross-shaped interface on the left, this is the channel of the analog signal, and the right side is the interface of the three row rules. This is the digital signal channel!

Therefore, the analog signal can be output using DVI-I analog signal channels. Here, don't ask the DVI to turn the VGA. How can VGA can't turn DVI's silly problem?

5.2 How is the VGA interface of the LCD monitor?

This problem is not very good explanation (#% @ #% # @% # @). To reason, LCD LCD monitors should be equipped with a DVI interface to accept pure digital signals, so that the real effect will be much better. After the VGA signal is input to the liquid crystal display, the ADC conversion can be displayed. See: If you use a DVI interface to pick up the LCD monitor, the path is like this:

Digital signal => encoded => DVI => Display => Decoding => Display

The "encoding" and "decoding" processes are made by the DVI standard, but because there is no loss of loss because it is a pure number.

With the VGA interface, it turns this:

Digital signal => DAC => VGA Transmission (loss) => Display => ADC => Display ....

Everyone can see how ridiculous the practice! From numbers to the simulation, then transmit analog signals, plus loss and interference, and then reserve digital signals ... but why only the home-level display is only VGA interface? I think it may be considered for compatibility. Since the graphics card of the VGA interface accounts for the vast majority, the merchant is afraid of the embarrassment of "buy the display inserted", decided to use the VGA interface. On the other hand, it is a commercial reason. As the interface technology that will only develop, although there is a congenital advantage for numbers, it is not high, but the manufacturer can improve the revenue of DVI products through this means of interest. Once the digital display technology is popular, the DVI interface will definitely be widely used. Sixth, 3D stereo glasses

Fun, 3D stereo glasses. I think most people have not experienced what it is to wear it.

In fact, its principle is this: human eye judges the far near the object, in fact, is determined by the fine difference of the object in two eyes. You can do a trial, extend your hands, hold a pen, one of the way, take a line of sight into a straight line. With both eyes, you must make two strokes into a vertical line (can't do?% # $% $ #% To find an eye doctor to check ...). Ok, now you have a look, try again to be a straight line ... is it very difficult. That's it, you have to see the real stereoboscopic, the image of both eyes is different.

3D principle of three-dimensional glasses is to let the brain think that what you see is "stereo" by letting the left / right eye to see different images. How can I see different images? ! Yes: When 3D stereo glasses are activated, there will be some changes in the 3D scene rendering process of the game. At this time, the display will be alternated to change the page, and the time to display the left / right eye (how to do it? It is the location of the camera in the mobile game!). At this time, 3D glasses secretly turn around your right eye and left eye (through liquid wafer discoloration) so that the display shows the left eye screen, you look at the left eye; the display shows the right eye picture, you use Go to the right ... you see the three-dimensional picture! This is the case.

This article wrote so much about the graphics function, some places may be more difficult to understand, I am sorry to think ... Everyone will look at it, it will be able to understand! Hehe, we summarize the six function / interfaces of the graphics card: VGA, TV-Out, Vivo, TV-in, DVI, 3D Glasses. I don't say some other strange features, we only talk about the trend.

Just here, goodbye ~~

(Original source: http://bbs.gzeasy.com/index.php? Showtopic = 35634 & view = findpost & p = 422104)

-------------------------

Graphics Acceleration Card Technology Forum: 5. Cupage - Games, Professional Things

(Posted in gzeasy.com: Jul 28 2003, 04:39 PM)

Review: "Interface and Features of Graphics Card", I will give you a probably introduced the various interfaces owned by the graphics card, and the basic principles and functions of these interfaces. Among them, VGA and DVI are the most widely used interfaces, and I also made a relatively detailed introduction. After reading the first four chapters, everyone should have a certain understanding of the function of the graphics card. But I saw that there are many friends who are very unfamiliar for the 3D acceleration card in addition to the game, so today I come to introduce: Question: Cupage - Games, Professional things

Speaking of professional drawing cards, what do you feel? Is it "Wow, good sacred! Can you can't afford! And I don't have to do it! ..." The attitude of respective attitude? Oh, in fact, the 3D acceleration card was originally developed in the professional field. The game card we used now is just a "military transit" product. So, when you understand the 3D game card, we also know what it is for its predecessor - professional 3D drawing card. Ok, let's take responsibility for professional drawing cards.

Everyone is imagined. If all the triangles in the game, you will not fill it, but only use the three edges of them. What do you see? ? Wow, it's dead! It is a bunch of messy ... Oh, this is what 3D drawing staff faces every day.

First, the world of wire basket

In a professional field, graphic designers tend to see the surface color and material of the object, more requirement to see the structure and precise shape profile inside the object. This, the texture map and material of the flower whistle not only cannot act, but it also interferes with the mastery of the designer. Therefore, fast, accurate, and large number of drawing lines become the "basic skill" of professional drawing cards.

Two points identify a straight line, so in the professional field, the object does not have to use a triangle to represent and display it. Therefore, professional drawings are more biased to draw objects using quadrilates. This looks neatly, two to easily and external acquisition equipment, such as the 3D scanner data interface.

During the process of drawing the game, use a small amount of triangles to draw a scene in a large number of texture maps. Since the reading and color calculation of the texture map account for the vast majority processing time, the game card's memory bandwidth and pixel processing power are very important, resulting in four or eight pixel pipelines, and up to 256bits 20Gb / s's memory bandwidth.

In this case, in this case, the professional drawing card work mode and bottleneck distribution are different from the game card: in the editing window of professional software, the lines are filled with all spaces. Professional drawing cards need to accept the number of vertex data that can be accepted, and these data are usually thousands of times the game scene. The process of the drawing line is relatively easy to process the process of the vertex. This method of working makes professional drawing cards need to have a very strong vertex processing capability. This can also be seen in the performance of graphics card professional performance similar to the vertex processing ability.

Since the drawing line is the main task, people of course want to make professional cards better. Therefore, people think of using a way to make the lines of the painting more beautiful:

Second, the line basket anti-aliasing (Anti-aliased lines)

Now open a slope of Windows brush, what did you see? (Of course, it is the line! @ #% @ #% $ # ^ $) What you see is a sawtooth! In fact, the slash is also composed of a very short horizontal or vertical line segment. This is the shortcoming of the rasterization of the line segment. How can I make the line come out more smoother, more beautiful? This is to use rasterized advanced techniques: floating point coordinate optical griding rules (FLOATING POINT COORDINATE RASTERIZATION: The specific name may not be the case, but this name will definitely explain the problem!). In the past, when the line is drawn, the coordinates of the line segment are first converted into an integer, then painted on the screen, such as (124.5, 11.2) => (125, 11). Because the coordinates of the pixels on the screen are integers, this method is simple and fast, but the line drawn is the serrated ... and the floating-point rasterization is, which is to map the coordinates represented by the floating point number directly to the screen. Take the four pixels adjacent to the neighborhood to make color weight distribution (the most complicated place, don't worry, I will talk slowly): For example, there is a point, its coordinates are (124.5, 11.2). Then let's take this neighborhood: (124, 11), (125, 11), (124, 12), (125, 12). The weight of this point is indicated by the fractional portion of the coordinates, and the color concentration of the four points is like this:

(124 (0.5), 11 (0.2)): 50% * 20% = 10%, (125 (-0.5), 11 (0.2)): 50% * 20% = 10%; (124 (0.5), 12 (-0.8)): 50% * 80% = 40%, (125 (-0.5), 12 (-0.8)): 50% * 80% = 40%;

In this way, a floating point coordinate is mapped to four integer coordinates. Since the concentration of the color is calculated with the weight of the floating point coordinates in an integer coordinate map, the entire line becomes very smooth.

I am only one of the methods of anti-saw tooth rasterization, and there are many faster ways have been widely used. Since the knowledge involved in these methods is too professional, I will not be more excited. (In fact, I am not very clear ...). The wire basket anti-serration has made good optimization in the new professional drawing card, so when using professional drawing card, you can get a clearer and accurate and beautiful wire basket renderings by using the wire basket against serration.

Third, professional OpenGL and new show D3D8 / 9

Speaking of professional drawing card, I can't mention OpenGL. What is OpenGL? You first think of it is quake !, doom! @% #% # @% @ ^ # $ ^% Please, we are talking about professional knowledge! Open Graphics Library is a professional drawing interface proposed by Silicon Graphics Inc. in 1992. It is widely used in almost all computer graphics fields. Including SGI, DEC, IBM, PC and MAC, etc., provide support for it, so OpenGL is a cross-platform professional drawing interface. Everyone uses OpenGL used in the game, but the entire OpenGL draw library function is very small, and this part is enough to let our customers experience the thrilling 3D world! Ha ha.

Since this god, the software that supports it is definitely a lot! correct. "Three giants" like 3DSMAX, Maya, SoftImage this PC 3D production tool provide support for OpenGL graphics interfaces. Since it is an interface, it represents "unrelated to the hardware". So professional drawing cards only need to focus on the support of OpenGL interface, that is, supporting all mainstream 3D production software. Everyone sees the current professional drawing card price so high, in fact, in addition to excellent hardware, its drive research and development also accounts for a large part of the cost. Maybe many friends are still wondering: What is OpenGL to do? I listen to you every day, say, why didn't I see it! In fact, OpenGL's common functions make you scared: draw points, draw lines, draw polygons, that is, these. As a game, these three functions provided using OpenGL are sufficient. And in the professional field, it provides a curve, the support of surface painting, triangle segmentation, vertex deformation, and other professionals of Jinjin's function (Don't say that I am causing you, I know very much!) And in the latest version Among OpenGL, the concept of programmable graphic pipeline (half shots than D3D8) can also be flexibly realize the image effect of the graphics card programming.

Maybe everyone can see from my words, OpenGL is in the future, as everyone expensive, falls to the back of D3D. Speaking of D3D, you have to mention Microsoft's DirectX entertainment multimedia engine. DirectX must be like a thunder. In fact, now the game on the market, 80% use DirectX's D3D graphics engine instead of OpenGL. This is also affected by OpenGL and D3D development makes different positioning. D3D is more biased to provide a direct, powerful functionality directly related to game designers, so it is more affinity for game designers.

The rapid development of D3D has also benefited from it is exclusive technology: personally developed by Microsoft, personally develop, and provide detailed technical support. The past D3D always gave the feeling of small gas, and D3D also made OpenGL as a competitive goal; while D3D8 was launched in DirectX 8.0, the D3D8 surpass OpenGL. It first proposes the concept of programmable geometric / pixel processing pipeline. With the perfect hardware support of the NVIDIA GeForce 3 series graphics card currently listed, it is visually gave people a new shock. The title returns: When D3D8 exceeds OpenGL in the game interface, greedy Microsoft (!) Will make D3D grow up in professional functions. Today, D3D has been supported by many professional drawings. For example, 3dsmax has added support from 4.0 to DirectX 8.0, making the material / light of approximately final rendering effects in the preview window, displayed in the preview window. come out.

DirectX 9.0's drawing component D3D9 is another milestone. It redefines the concept of programmable graphic pipeline, making full floating point accuracy, and there is no image in the PC game. Moreover, D3D9 introduces another new concept, which is the function of writing a graphics card using a high-level language while inheriting D3D8 assembly language, providing a program of a program with a high-level language, which is named HLSL (High Level Shader Language). At this point, D3D exceeds OpenGL, which also enables the new version of OpenGL to be close to D3D. The Vertex Program / Fragment Shader supported by OpenGL is developed on the basis of D3D's VertexShader / Pixelshader. The function of D3D is strong enough, and it has also been fully supported in the game field. However, we must want to have a distinctive place in the professional drawing field, but also need professional drawing software developers express their affirmation and input support. Let us heartfelt wish D3D and OpenGL all the way ...

Fourth, preview VS. rendering

There are many professional drawings, often unclear two concepts: the difference between preview and rendering, and where the graphics acceleration card is accelerated. Let's take a look at these things.

Use friends who have professional drawing software, must have seen its interactive editing window. Different software and settings have different number of interactive editing windows, also known as a preview window. The content in these windows is to be drawn by a graphic acceleration card (if hardware acceleration is enabled). In addition to the object in one window is filled by color and texture, the images in other windows are wire baskets. Oh, he said that everyone should understand that professional drawing card is accelerating the line basket. In fact, in the professional drawing software, there is only this partial drawing work is done by the graphic acceleration card. Another partial drawing function, exceeding the function of the graphics acceleration card:

This is the finished rendering. When you adjust all parameters, including the location of the camera and the light, press the Render button, the computer is doing this step. A slightly complicated scene, this step usually takes hours, and some is even for several days to complete. Why is this slow? ! If you open the image of the preview window, and the rendered finished product is compared, you can find the difference between the difference: the finished product is more delicate than the preview map. In fact, this step is completely completed by the CPU. The complexity of the algorithm used is also far from the grating pattern of the graphics card. Some use Ray-Tracing light tracking to calculate the material of the object and the reflection / refraction of the light, and some even utilize the radiomity to calculate the strength of the object surface to receive the light irradiation. These real algorithms are abnormal, and the flexibility is high. So the current GPU's programmable characteristics cannot be "substitute", only our poor CPU is fighting.

Here, everyone should understand that the professional drawing card acts as a function of previewing the viewport acceleration during the use of the drawing software. Don't think that there is no big use of the preview of the viewport. In fact, the plot workers have 90% of the time to draw graphics, that is, the graphic acceleration card is in 90% of the time, it is important for the system. Accelerate. Ok, look at the exciting Hollywood special effects, enjoy the beautiful 3D cartoon, let us pay tribute to the silent professional drawing card ...

Postscript: This article writes in chaos, even I don't know what I have written, I want to make a leader in the prevention of friends in the professional drawing field, let them have some of their work environment. Light understanding. In fact, I am a professional drawing application field, but I know one or two, it is really a book to use time! I hope everyone will try to learn new image technology to add a strength to our dream of 3D world! (Original: http://bbs.gzeasy.com/index.php? Showtopic = 37426 & view = findpost & p = 446913)

转载请注明原文地址:https://www.9cbs.com/read-34940.html

New Post(0)