Author: | Jeroen Ruigrok van der Werven <asmodai@in-nomine.org> |
Revision: | $Revision: 231 $ |
Date Revision: | $Date: 2012-07-27 13:05:44 +0200 (vr, 27 jul 2012) $ |
Copyright © 2004-2012 Jeroen Ruigrok van der Werven
Redistribution and use in source (XHTML and CSS) and 'compiled' forms (SGML, HTML, PDF, PostScript, RTF and so forth) with or without modification, are permitted provided that the following conditions are met:
Important: THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
I started this document because I like the subject of computer graphics and see a lot of ties with previous work I did on toolchains.
A lot of this right now is really unstructured. Basically a sort of brain dump, it will get fixed in the end.
This document uses MathML for rendering formulae as they were intended to be shown. In order to render these formulae on non-MathML compliant browsers this page uses MathJax.
The default font support on Windows 7 and MacOS X is good enough to display many formulae. You might want to install Stix Fonts to get even better coverage.
For non-native English speakers some geometric and mathematical terms might be radically different than those in their own language. My own native language, Dutch, is a good example of this knowing ‘loodrecht’ as the word that is known as ‘perpendicular’ in English.
The world of 3D graphics relies heavily upon mathematical concepts, so any affinity or rudimentary experience with geometry and set theory makes things a lot easier to understand.
Phong reflection model.
Rendering.
URL dump:
Alpha blending is a very simple technique to create the effect of transparency. It accomplishes this by using a variable factor to determine the amount of blending between the foreground colour and the background colour.
In mathematics this is written as such:
So an α value of 0 results in an RGB value that is totally transparent, in other words it allows the background to show through. If the α value is 1, however, the foreground is totally opaque and obscures the entire background. Any α value in-between 0 and 1 will balance the foreground and background colour appropriately. Of course, the caveat here is that the α value applies equally to the individual RGB values. For appropriately filtered alpha blending see
TODO:
DirectX functions: OpenGL functions:
When one take a certain image of a specific size and scale it in a different X and Y
TODO:
Anti-aliasing is a technique goes against a phenomenon called edge-aliasing. But that still does not mean anything. In short: edge-aliasing is the effect that causes the so-called staircase (jaggies) effect in an image. In a drawing program when you have a white background and a black foreground colour and you draw a diagonal line you will see the pixels on-screen display a staircase effect. A pixel tends to be a cube form and thus a resulting image will have noticeable edges. Just like when you would recreate that line as a mosaic. Anti-aliasing is the process of applying a filter over the image to counter the effect of edge-aliasing.
Types of Antialiasing Methods:
TODO:
TODO:
TODO:
TODO:
Multum In Parvo (MIP; Latin for 'much in little') mapping is a texturing technique to improve the visual quality of computer graphics. In drawing 3D scenery objects that approach the horizon are drawn proportionally smaller in size. On the computer drawing like this will result in the objects in the distance losing their details due to their size. This leads to edge-aliasing, which leads to interference patterns forming commonly known as moiré.
To counter this MIP mapping, as stated above, uses a variety of scaled down objects. The normal texture might be drawn/rendered at 512x512 pixels and is what you see when you are very close up to a surface with that texture. For displaying surfaces with the texture in the distance it has pre-rendered and filtered textures in, typically, powers of two resolutions. So the GPU might have already pre-rendered 256x256, 128x128, 64x64, perhaps all the way down to 8x8, or even 2x2 resolutions.
MIP mapping scales and filters a texture map into multiple versions before applying it to the wire frame model. These versions are of varying resolution and details. At close distances to the camera viewpoint, the texture map appears in its original full detail. For medium distances, a smaller texture that is half the resolution of the original is used. Even further distances display texture maps that are a quarter the resolution and so on. Each of these stages is known as a MIP map level.
By choosing the appropriate texture map resolution and detail, MIP mapping ensures that pixels do not get lost at further distances. Instead, properly averaged smaller versions of the original texture map are used. Since low resolution textures are used for further distances, other benefits of MIP mapping include reduced memory bandwidth requirements.
TODO:
Adds an appropriate offset to force coincident z-values apart to cleanly separate a polygon edge from its highlighting line
Fill in.
TODO:
TODO:
Right now the two major Software Development Kits (SDKs) are:
As of this writing DirectX has version 11 out and OpenGL has specification 4.2 out.
Both specifications are quite powerful in their own right. The choice for selecting one of the other is a choice you make based on your requirements (which you do have, right?).
TODO:
Since DirectX is build up from multiple sub-parts this document will only highlight the graphics parts in order to cut back on the size of the total document.
DirectX Programming Documentation
DirectX has had the following releases:
The main feature of DirectX 6 is the support for environment mapped bump mapping
DirectX was introduced by Microsoft in 1995. It is based on their Component Object Model (COM) technology. Thus DirectX has been object oriented from the start. Prior to version 8.0 DirectX was rather cumbersome to program, since it required a lot of complex operations. Version 4 was never released and was solely known/used in-house
DirectX specifics:
D3DX New features:
DirectX 9 introduces a new high level shading language for shader programming. This language provides the ability to more easily write shaders with functions, arbitrary variable names, conditionals, and loops.
The shader compiler now supports the following profiles: vs_1_1, vs_2_0, ps_1_1, ps_1_2, ps_1_3, ps_1_4, ps_2_0, ps_2_sw.
A shader fragment linker has been added to facilitate the management and generation of shaders, The fragment linker links assembly or high level shading language shader fragments together. i.e. to allow mixing and matching of lighting types, skinning types, etc.
The Effect framework has undergone some exciting changes for DirectX9, specifically the addition of the ID3DXEffectCompiler interface. The Effect compiler interface can be used for shader specialization. i.e. marking a global variable as literal for a specific compile of the shader.
Added variable sharing between effects. Variables in effects files declared with the keyword "share" will be shared across all effects created with a given effect pool.
A new animation subsystem and mesh hierarchy loader are now included.
The mesh library now supports arbitrary vertex declarations (single stream only).
CloneMesh handles all data type conversions. i.e. FLOAT2 to FLOAT16_2, D3DDECLTYPE_DEC3N...
Patch support is included in the mesh library, including Adaptive tessellation.
- DirectDraw: DirectDraw provides for drawing raster graphics.
- DirectInput: DirectInput provides the developer with an interface to myriad input devices, including support for force feedback.
- DirectMusic: DirectMusic provides for playback of soundtracks. It also allows the composer to dictate what events will trigger transitions in the music to blend from one piece to another or to simply add more tempo, decrease tempo, increase volume or the intensity, all in order to supplement the gameplay. In other words it provides movie-like music control. It is based on MIDI with the Downloadable Sounds (DLS) feature to use custom sounds in combination with the MIDI power.
- DirectPlay: DirectPlay is a set of tools that simplify communications across networks, the Internet, or modems. The tools allow game players to find game sessions easily to help manage the flow between hosts and players.
- DirectSetup: DirectSetup provides a simple API for installing DirectX from your customized application. With DirectX being a complex product, this component greatly simplifies the process of installation.
- DirectShow: DirectShow provides multimedia support for video files such as AVIs and MPGs. This component of DirectX that was once an outside API is integrated with the release DirectX 8.
- DirectSound: DirectSound provides for playback and recording of waveform sound.
OpenGL specifics:
OpenGL was begun by Silicon Graphics, Incorporated (SGI). The name is a short form for 'Open Graphics Library'.
OpenGL, through its extension feature, allows vendors to more easily export their own API to provide functionality. Until the ARB standardises on a specific API it means you may encounter vendors offering the same functionality through widely different APIs. This, of course, has both its advantages as disadvantages.
OpenGL is based on a state machine accessed through a C API.
OpenGL has the following versions defined:
OpenGL 2.0 provides the following:
Documenting how 3d hardware generally is built up and how it progressed through history.
Blah.
Blah.
Blah.
NVIDIA generally uses the identifier NVnn to label their computer chip products. In the past a Cnn identifier has been used for a few products, all of them based on HyperTransport. More recently they seem to have started using the identifier Gnn.
Name | NV1 |
Transistors | 1 million |
Background | released in September 1995, this design was based on quadratic surfaces and the system used VRAM or Fast Page Mode (FPM) DRAM |
Blah.
Blah.
Blah.
Blah.
Direct3D, DirectDraw, DirectInput, DirectMusic, DirectPlay, DirectShow, DirectX are registered trademarks of Microsoft Corporation in the United States and/or other countries.
NVIDIA, the NVIDIA logo, 3DFX, the 3dfx logo, STB, STB Systems and Design, the STB logo, GeForce, NVIDIA Quadro, Vanta, TNT2, TNT, RIVA, RIVA TNT, VOODOO, VOODOO GRAPHICS and Glide are registered trademarks or trademarks of the NVIDIA Corporation in the United States and/or other countries.
OpenGLĀ® is a registered trademark of Silicon Graphics, Inc. in the United States and/or other countries worldwide.