Archived

This topic is now archived and is closed to further replies.

KevArnold

3d rendering

Recommended Posts

I am not entirely new to 3d api''s, I have done a little with opengl and directx but would like to understand whats going on within the api''s. I was hoping someone could point me to a good tutorial about what exactly happens to a point as its transformed from its 3d points to its 2d points. Thank you Ian

Share this post


Link to post
Share on other sites
There''s a nice little page on Kenny Hoff''s site...

http://www.cs.unc.edu/~hoff/techrep/index.html

If you look at the link "A view of the typical vertex transformation pipeline (word .doc)" you should get a better overall view of what happens to a point. After that it''s all down to the matrices. Knowing how they work is very valuable, so it''s a good idea to read those sections in the D3D/OGL docs to understand how they''re constructed and how they work together.


Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions

Share this post


Link to post
Share on other sites
Thanks for the reply but I was actually more interested in how the transformations are done.

I think the object -> world is easy, just moving the object from being at 0,0,0 to its location in the world.

But the camera transformation is something which I could read a more detailed explanation of. Or at least the calculations. And then an explanation of how to take these finals points and render them in 2d.

Thanks
Ian

Share this post


Link to post
Share on other sites
quote:

Thanks for the reply but I was actually more interested in how the transformations are done.


Every transformation is nothing but a matrix multiply.

quote:

I think the object -> world is easy, just moving the object from being at 0,0,0 to its location in the world.


The pipeline doesn''t move anything. The world->object transformation step is just a matrix multiply: the vector gets multiplied by the object''s local transformation matrix. Same thing for the world->camera step: again a matrix multiply, this time with the view matrix. Perspective transformation is, you guessed it, another matrix multiply, with a special projection matrix. The last step to get the 2D coordinates is the persepctive division. That''s simply 3 divides (x/w, y/w and z/w).

Share this post


Link to post
Share on other sites
Yup, I should have explained further, but Yann L hit the nail right on the head. If you look at the word doc on Kenny Hoff''s site, each of the stages between different coordinate spaces is just a vector-by-matrix multiply, finishing off with a divide by w.


Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions

Share this post


Link to post
Share on other sites