# How Is 3D Data Projected Onto A 2D Bitmap?

This topic is 2356 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

[color=#333333][font=arial, helvetica, clean, sans-serif]

### I am a C programmer, and recently found an interest in computer graphics. When a 3D model is drawn to the screen, it has to be put into a 2D bitmap, right? So how is 3D data projected onto a 2D bitmap that passes through the framebuffer onto the screen? I have heard the term "projection matrix" thrown about on forums, but I have no idea how you would use an array to project the 3D data onto the screen bitmap. How is this done?[/font]

##### Share on other sites
http://en.wikipedia....i/3D_projection

Vertices are projected via matrix multiplication, then rasterization textures and shades the resulting on-screen pixels. Edited by Nypyren

##### Share on other sites
In standard rasterization engines you can express the process from getting a triangle-based 3D object from its local space to its projection onto a 2D plane as 3 transformations (ie. matrix multiplications)

The first one would be the world transformation where each vertex of the model is transformed to a position to the global or world coordinate space. The transformation is done by doing a matrix multiplication of your vertex positions with a world matrix which generally contains a translation, rotation and a scale factor.

The second transformation is the view transformation where your model is transformed from world-space to view-space using a view matrix. This transformation places the view point as the world origin (ie. at (0,0,0)).

The last transformation is the projection transformation which takes your view-space coordinates and projects them onto your final image. The projection matrix can hold info about your aspect ratio, clipping planes, field of view, etc.

1. 1
Rutin
33
2. 2
3. 3
4. 4
5. 5

• 13
• 9
• 9
• 9
• 9
• ### Forum Statistics

• Total Topics
633330
• Total Posts
3011388
• ### Who's Online (See full list)

There are no registered users currently online

×