Sign in to follow this  

3D programming w/o 3D-libraries

Recommended Posts

nyrhinen    109
Hello, again bothering you with questions. \o I have had some information from the programming "gurus", and they say that I should start 3D-programming by learning the theory and to learn how to do it without any helping libraries. I know that this requires some serious maths, but can you suggest any sites that deal with this issue? Sorry if a topic like this exists, but the search doesn't work on my browser or something, I'm not getting any results. :-) Edit, and if possible, in C/C++, because I prefer some examples also, not just the pseudo and theory.

Share this post

Link to post
Share on other sites
Dethtoll    126
In my introductory graphics course in college, we each built our own real-time rendering engine from high level application down to rasterization. openGL was used to output our final matrix of pixel values to screen.

If you're learning on your own (and depending on your level of expertise), I'd recommend starting with the easier goal of learning basic transforms and projections. If you can get a working program to transform triangles from 'object space' to 'screen space' and then output them using DirectX's screen coordinate triangle specification, then you'd be well on your way to learning much of the basic math that goes into computer graphics.

In other words, your program would do the following:
-Allow specification of triangles in object coordinates (by reading in a mesh or specifying the coordinates directly).
-Transform all objects into uniform 'world coordinates'. Ideally, you'd have several objects with different local transform matrices. Even better would be creating a scene graph hiearchy to operate on groups of objects.
-Transform objects into 'camera space' using an inverse camera transform
-Project vertices to 'screen space' using a perspective projection matrix
-Use DirectX (or openGL) to output the triangles, specified in screen coordinates.

All of the above concepts are covered in many introductory graphics books. I can highly recommend the latest edition of "Real Time Rendering" (Haines and Moller), which provides concise coverage of the basics and an extensive array of more advanced graphics topics.

Another thing you might consider is checking out the websites for college graphics courses. These quarterly sites often provide assignments similar to the one above, sometimes including sample code and even lecture slides. Many are password-protected, but there are a great deal of major universities that don't secure these sites (mine included).

Hope that helps.

Share this post

Link to post
Share on other sites
CaveDweller    188
My favorite book for learning pure software rendering was Sergei Savchenko's "3D Graphics Programming: Games and Beyond". It covers the theory extremely well, covers the math fairly well (you will probably want to read some supplemental articles) and includes a relatively simple software renderer on the accompanying CD. You could probably get a used copy for 10 or 15 bucks from Amazon.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this