Another good tutorial, more specific to OpenGL, is this one: http://www.songho.ca/opengl/index.html I liked this one because each lesson has a binary you can download and run on your computer (only tested on Mac).
Scratchapixel: Computer Graphics Programming from Scratch
11–20 of 73 posts
Re: Scratchapixel: Computer Graphics Programming from Scratch
#12What I don't get is why nearly all resources on 3D graphics assume the reader is familiar with matrices and linear algebra. For those who don't speak that language, what you're doing is plotting numbers into a magic box, doing a magic multiply, and hey presto, we got 3D! Magic. Meanwhile a teenager could easily get an intuitive grasp of 3D graphics if you just explained how translation is nothing besides addition, an…
I'm personally fine with using the computer as a "magic box" to do all the calculations, but it's important to have a geomtrical intuition about the operations. This is another short tutorial that does a good job at conveying the geometrical aspects of linear algebra: http://www.cns.nyu.edu/~eero/NOTES/geomLinAlg.pdf
For those interested in learning LA in full detail, you can check out my upcoming book which covers all the essential material and discusses lots of applications, including the homogenous coordinates used in computer graphics: https://minireference.com/static/excerpts/noBSguide2LA_previ...
Re: Scratchapixel: Computer Graphics Programming from Scratch
#13Maybe I missed it, but I didn't see any discussion of the Bresenham family of algorithms. I realize this is always done for you nowadays, but if you're really teaching pixels from scratch, it seems like drawing lines and circles from raw pixels needs to be covered.
Re: Scratchapixel: Computer Graphics Programming from Scratch
#14What I don't get is why nearly all resources on 3D graphics assume the reader is familiar with matrices and linear algebra. For those who don't speak that language, what you're doing is plotting numbers into a magic box, doing a magic multiply, and hey presto, we got 3D! Magic. Meanwhile a teenager could easily get an intuitive grasp of 3D graphics if you just explained how translation is nothing besides addition, an…
"Linux 3-D Graphics Programming" [1]
That explains how to build a 3d engine almost from scratch and it does explain 2D math (cross product, etc) and also 3D stuff of course (matrix operations, perspective projection, etc).
It's a bit dense in that it pretty much builds everything from zero, but it's a very nice way to go through everything needed to work with 3D graphics.
You can check the content table in Amazon I think.
The second book "Advanced Linux 3D Graphics" is a bit less interesting for me since it talks a lot about Blender and other software which it doesn't really go with the theme of the first one, but there's still a lot of good info in there.
[1] http://www.amazon.com/Linux-3-D-Graphics-Programming-Norman/...
Re: Scratchapixel: Computer Graphics Programming from Scratch
#15What I don't get is why nearly all resources on 3D graphics assume the reader is familiar with matrices and linear algebra. For those who don't speak that language, what you're doing is plotting numbers into a magic box, doing a magic multiply, and hey presto, we got 3D! Magic. Meanwhile a teenager could easily get an intuitive grasp of 3D graphics if you just explained how translation is nothing besides addition, an…
The book teaches you how to write a 3D software rasterizer from first principles. The first part of the book is nothing but a well written linear algebra primer. The book then assumes you have nothing but a C++ compiler and a pointer to the frame buffer like you might get using SDL.
Unfortunately the book appears to be out of print, and the APIs used are a bit out of date at this point (Win32 and old DirectX used to set up a window w/ a frame buffer ptr).
All the same, I would still highly recommend it to anyone who wants to understand the foundations of 3D math and fixed function rendering pipelines.
Re: Scratchapixel: Computer Graphics Programming from Scratch
#16What I don't get is why nearly all resources on 3D graphics assume the reader is familiar with matrices and linear algebra. For those who don't speak that language, what you're doing is plotting numbers into a magic box, doing a magic multiply, and hey presto, we got 3D! Magic. Meanwhile a teenager could easily get an intuitive grasp of 3D graphics if you just explained how translation is nothing besides addition, an…
Speaking of short tutorials on linear algebra, you should check out this one I wrote last year. It's more of a "prepare for an exam" document, but it gets to the core idea of matrix-vector product serving as a way to "implement" linear transformations: https://minireference.com/static/tutorials/linear_algebra_in... I'm personally fine with using the computer as a "magic box" to do all the calculations, but it's impor…
Re: Scratchapixel: Computer Graphics Programming from Scratch
#17What I don't get is why nearly all resources on 3D graphics assume the reader is familiar with matrices and linear algebra. For those who don't speak that language, what you're doing is plotting numbers into a magic box, doing a magic multiply, and hey presto, we got 3D! Magic. Meanwhile a teenager could easily get an intuitive grasp of 3D graphics if you just explained how translation is nothing besides addition, an…
Speaking of short tutorials on linear algebra, you should check out this one I wrote last year. It's more of a "prepare for an exam" document, but it gets to the core idea of matrix-vector product serving as a way to "implement" linear transformations: https://minireference.com/static/tutorials/linear_algebra_in... I'm personally fine with using the computer as a "magic box" to do all the calculations, but it's impor…
Re: Scratchapixel: Computer Graphics Programming from Scratch
#18What I don't get is why nearly all resources on 3D graphics assume the reader is familiar with matrices and linear algebra. For those who don't speak that language, what you're doing is plotting numbers into a magic box, doing a magic multiply, and hey presto, we got 3D! Magic. Meanwhile a teenager could easily get an intuitive grasp of 3D graphics if you just explained how translation is nothing besides addition, an…
What you are wanting is this book: "Tricks of the 3D Game Programming Gurus" by Andre LaMothe. The book teaches you how to write a 3D software rasterizer from first principles. The first part of the book is nothing but a well written linear algebra primer. The book then assumes you have nothing but a C++ compiler and a pointer to the frame buffer like you might get using SDL. Unfortunately the book appears to be out…
But I think the 12-yo-me wouldn't have bought a book and certainly wouldn't have appreciated one that starts with a linear algebra primer (no matter how well written).
Really, what I would've needed back then would've been a relatively short tutorial somewhere online, preferrably one that doesn't require me to start with linear algebra. Just the basic arithmetic I was familiar with back then. Maybe I will indeed have to try write one now some day.
Short enough that it would be easy for people to contribute translations. Indeed, a math heavy book in English would've been totally inappropriate.
Re: Scratchapixel: Computer Graphics Programming from Scratch
#19Maybe I missed it, but I didn't see any discussion of the Bresenham family of algorithms. I realize this is always done for you nowadays, but if you're really teaching pixels from scratch, it seems like drawing lines and circles from raw pixels needs to be covered.
Sadly if you're actually implementing Bresenham's algorithm today you're doing something very wrong (or don't care about performance). Drawing lines and shapes is all a matter of pumping the desired geometry and shaders into your GPU today and letting it take care of the rasterization--running Bresenham's algorithm on your CPU will be many orders of magnitude slower.
Re: Scratchapixel: Computer Graphics Programming from Scratch
#20Wow this is an awesome online book. Goes into a lot of details, and uses words to convey the important things + supports it with code. Another good tutorial, more specific to OpenGL, is this one: http://www.songho.ca/opengl/index.html I liked this one because each lesson has a binary you can download and run on your computer (only tested on Mac).