Jump to content
  • Advertisement
Sign in to follow this  
MrJoshL

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

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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.

This is just a very basic overview, there's tons of documentation to be found online about this process Edited by Radikalizm

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!