So what actually...

So what actually...

Vidja Games — Page [1]
CornJer
Metal does cocaine.

Frontline Heroism Medal
2005 Mar 21 • 1531
36 ₧
...projects a 3D enviroment onto a 2D computer screen? Do you do just a bunch of hardware calls to the graphics card, or do you need to do pixel by pixel math in order to get the final 2D image?

In other words: what does a graphics card do exactly? Does it render the 3D sceen itself? And How does 3d rendering work?
If you jump high enough you'll hurt your ankles when you land.
 
 
 
2006 Nov 25 at 05:22 UTC
Downfall
Was: pwnisher
2005 Apr 23 • 94
33 ₧
im not entirely sure about this, but i think that a 3d enviornment is simply floating textures. The game uses math (graphing) to draw the polygon wireframe to a vanishing point, and the textures are layed ontop of these polygons. Depending on the players perspective the texture's image is skewed and distorted depending on the polygon's placement. Earlier 3d objects were rendered by "floating pixels" Half-Life was one of the games that pioneered actually laying bitmaps over polygons.
So I believe the graphics card will take this enviornment in 3d form, lay the textures, then compile the pixel placement from your point of view onto your monitor. well i think so
 
 
 
2006 Nov 27 at 01:52 UTC
SuperJer
Websiteman

2005 Mar 21 • 6670
TRIANGLES!!

It's all about triangles!! And matrix multiplication.

The thing about triangles is, a triangle in either 2D or 3D looks like a simple 2D triangle on your screen, no matter how you look at it.

One thing the graphics card does to make 3D happen is transform the points on all your triangles from the game world, to points on the screen.

In the world, they are 3D (x,y,z) points, but on your screen they are just 2D (x,y) points. A triangle made out of (x,y) points is really easy to draw, and yes the graphics card does that, and FAST. It's designed to fill pixels inside a triangle very fast. The color for each pixel can come from a texture (bitmap), lighting, shaders, fog, etc. and combinations of those.

The way your graphics card transforms points in 3D space to pixels on your screen is by using a transformation matrix.

A point in space is a vector, or "one-dimensional matrix", like this:

[code:1][[ 3.7]
[-12.1]
[169.6]][/code:1]

If you take that matrix and multiply it by a projection transformation matrix, the result will be the 2D (x,y) location where the point ends up on your screen, plus a depth value.

Although the graphics card does this work, the game programmer has to set up all the matrixes and decide exactly how they should work. The graphics card just takes them and multiplies really fast.

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

Half-Life was not the first game to use bitmapped polygons, Doom, Wolfenstein, Magic Carpet and many more did this earlier. Not to mention Quake which Half-Life is based on.
 
 
 
2006 Nov 27 at 18:55 UTC
CornJer
Metal does cocaine.

Frontline Heroism Medal
2005 Mar 21 • 1531
36 ₧
How does it fill the pixels into the triangles?
If you jump high enough you'll hurt your ankles when you land.
 
 
 
2007 Jan 5 at 23:00 UTC
Nuclearblob

2006 Oct 2 • 60
15 ₧
Pixels are a bitch
 
 
 
2007 Jan 6 at 20:43 UTC
Page [1]