The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

4. Definitions: Video Card and 3D Terminology

We'll cover video card and 3D graphics terminology. This material isn't crucial to actually getting a game working, but may help in deciding what hardware and software options are best for you.

4.1. Textures

A rendered scene is basically made up of polygons and lines. A texture is a 2D image (usually a bitmap) covering the polygons of a 3D world. Think of it as a coat of paint for the polygons.

4.2. T&L: Transform and Lighting

The T&L is the process of translating all the 3D world information (position, distance, and light sources) into the 2D image that is actually displayed on screen.

4.3. AA: Anti Aliasing

Anti aliasing is the smoothing of jagged edges along a rendered curve or polygon. Pixels are rectangular objects, so drawing an angled line or curve with them results in a 'stair step' effect, also called the 'jaggies'. This is when pixels make, what should be a smooth curve or line, jagged. AA uses CPU intensive filtering to smooth out these jagged edges. This improves a game's visuals, but can also dramatically degrade performance.

AA is used in a number of situations. For instance, when you magnify a picture, you'll notice lines that were once smooth become jagged (try it with The Gimp). Font rendering is another big application for AA.

AA can be done either by the application itself (as with The Gimp or the XFree86 font system) or by hardware, if your video card supports it. Since AA is CPU intensive, it's more desirable to perform it in hardware, but if we're talking about semi-static applications, like The Gimp, this really isn't an issue. For dynamic situations, like games, doing AA in hardware can be crucial.

4.4. FSAA: Full Screen Anti-Aliasing

FSAA usually involves drawing a magnified version of the entire screen in a separate framebuffer, performing AA on the entire image and rescaling it back to the normal resolution. As you can imagine, this is extremely CPU intensive. You will never see non hardware accelerated FSAA.

4.5. Mip Mapping

Mip mapping is a technique where several scaled copies of the same texture are stored in the video card memory to represent the texture at different distances. When the texture is far away a smaller version of the texture (mip map) is used. When the texture is near, a bigger one is used. Mip mapping can be used regardless of filtering method (Section 4.6). Mip mapping reduces memory bandwidth requirements since the images are in hardware, but it also offers better quality in the rendered image.

4.6. Texture Filtering

Texture filtering is the fundamental feature required to present sweet 3D graphics. It's used for a number of purposes, like making adjacent textures blend smoothly and making textures viewed from an angle (think of looking at a billboard from an extreme angle) look realistic. There are several common texture filtering techniques including point-sampling, bilinear, trilinear and anisotropic filtering.

When I talk about 'performance hits', keep in mind that the performance hit depends on what resolution you're running at. For instance, at a low resolution you may get only a very slight hit by using trilinear filtering instead of bilinear filtering. But at high resolutions, the performance hit may be enormous. Also, I'm not aware of any card that uses anisotropic texture filtering. TNT drivers claim they do, but I've read that these drivers still use trilinear filtering when actually rendering an image to the screen.

4.6.1. Point Sampling Texture Filtering

Point sampling is rare these days, but if you run a game with 'software rendering' (which you'd need to do if you run a 3D accelerated game without a 3D accelerated board) you're likely to see it used.

4.6.2. Bilinear Texture Filtering

Bilinear filtering is a computationally cheap but low quality texture filtering. It approximates the gaps between textures by sampling the color of the four closest (above, below, left and right) texels. All modern 3D accelerated video cards can do bilinear filtering in hardware with no performance hit.

4.6.3. Trilinear Texture Filtering

Trilinear filtering is a high quality bilinear filter which uses the four closest pixels in the second most suitable mip map to produce smoother transitions between mip map levels. Trilinear filtering samples eight pixels and interpolates them before rendering. Trilinear filtering always uses mip mapping. Trilinear filtering eliminates the banding effect that appears between adjacent mip map levels. Most modern 3D accelerated video cards can do trilinear filtering in hardware with no performance hit.

4.6.4. Anisotropic Texture Filtering

Anisotropic filtering is the best but most CPU intensive of the three common texture filtering methods. Trilinear filtering is capable of producing fine visuals, but it only samples from a square area which in some cases is not the ideal method. Anisotropic (meaning 'from any direction') samples from more than 8 pixels. The number of sampled pixels and which sampled pixels it uses depends on the viewing angle of the surface relative to your screen. It shines when viewing alphanumeric characters at an angle.

4.7. Z Buffering

A Z buffer is a portion of RAM which represents the distance between the viewer (you) and each pixel of an object. Many modern 3D accelerated cards have a Z buffer in their video RAM, which speeds things up considerably, but Z buffering can also be done by the application's rendering engine. However, this sort of thing clearly should be done in hardware wherever possible.

Every object has a stacking order, like a deck of cards. When objects are rendered into a 2D frame buffer, the rendering engine removes hidden surfaces by using the Z buffer. There are two approaches to this. Dumb engines draw far objects first and close objects last, obscuring objects below them in the Z buffer. Smart engines calculate what portions of objects will be obscured by objects above them and simply not render the portions that you won't see anyhow. For complicated textures this is a huge savings in processor work.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру