Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am wondering if there is a simple tutorial that covers the basics of how to initialize rotation, translation and projection matrices, and how to multiply them, and how to get the screen coordinates afterwards for a 3d point.

Idealy, the tutorial comes with compilable code and is not dependent on any 3rd party library.

Searching the internet, I found lots of tutorials, so this is not the problem. Yet, it seemed all of these either covered openGl or directX, or they were theoretical in nature.

share|improve this question
    
Question is why do you want this? Maybe learn only theory and then try using some albebra library? But best is in my opinion use ogl or dx and actuly see what that matrices doo. Or absolutly best ... create your own CPU openGl like library that really really pushes you to learn all those things. I did that and never regret time i had spend with it –  Notabene Jan 11 '11 at 23:37
    
@notabene telling someone to go rewrite OpenGL (while a valid exercise that would make you an expert in a whole lotta stuff) isn't necessarily a good idea: game devs, especially new ones, appreciate immediate gratification and closed-loop feedback. –  David Lively Jan 11 '11 at 23:42
1  
@David Lively I almost agree with you. But you can write really simple rastarizator using world,view,projection matrices and you don't have to use Bresenham's line algorithm as a begining :). You can just use some canvas which enables to use polygons and then it would be great and quite simple exercise. I did not say to write any support for shading. –  Notabene Jan 11 '11 at 23:53
    
I made those mine comments into an answer –  Notabene Jan 12 '11 at 0:40

3 Answers 3

up vote 1 down vote accepted

I have found that the D3D SDK documentation does have a reasonably good, and relatively API-agnostic overview of the transformation pipeline. The thing to remember is that while references may show you how to set matrices with API-specific alls, nothing about the form or values in those matrices is API-specific -- it's all just math under the hood, and you can make it do whatever you need it to.

In addition to the two links David Lively provided, there's an MIT Opencourseware graphics course here. You can also find a fair number of references -- of perhaps unknown quality -- by searching for "computer graphics pipeline" and omitting specific references to APIs.

However, for the deepest forays into the theoretical graphics pipeline fundamentals, I would submit that books are still the best way to go. I am particularly fond of "Fundamentals of Computer Graphics, 3rd Ed," and "The Geometry Toolbox" (the latter is primarily a discussion of the linear algebra behind the graphics and not so much the graphics itself, though).

share|improve this answer

One of my very, very favoritest things:

Matrices can be your friends

And another one that just came up but looks nice, Matrices ARE your friends.

Get the math down, and the framework you're using (OpenGL, DirectX/XNA, or whatever) will start to make more sense.

share|improve this answer

This is not a actual answer to your question. But something like learning exercise i suggest for you, if you want to learn about 3D graphics matrices.

Make you own super simple CPU based 3D rendering library. For start you should use something like canvas which enables to draw polygones (triangles). I sugests SDL. For algebra maybe armadillo, but it is little overkill. You can be fine with some simple matrix4x4 and vector2/3/4 class (or write own).

Then go to opengl documentation and code these function:

gl_begin //(support only triangles)
gl_color //color will help you to determine which triangle is which one
gl_vertex
gl_end

glViewport

glMatrixMode // it is not neccesery to have matrix stack for you, so you can use some easier approach
glLoadIdentity
glOrtho
glFrustum
gluPerspective

glTranslate
glRotate
glScale
// and that could be enough for easy render library. 

And read as much theory before. David Lively suggested nice articles. I don't say to make it in the same way that opengl does. It can be simplier for super simple library you are going to create, but opengl has very smart archicture, so consider keeping your path with it.

It is possible that i forgoten to include some crucial function, let me know in comments please.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.