4 ms·
I ran out to Barnes & Noble and bought your book right after seeing your post and seeing one nearby that had it in stock. (Amazon was going to take a couple wee
by drivers99 4y ago
I ran out to Barnes & Noble and bought your book right after seeing your post and seeing one nearby that had it in stock. (Amazon was going to take a couple weeks to send it. Actually some other company was the sender. Weird. Also I didn’t notice you had it online but I like having the book and paying you anyway. :) )
So I picked up the book Thursday and finished the basic ray tracer Friday :) Not counting chapter 5 of course so there’s a lot more that I can add from here but it’s made me interested in multi-processing to make it faster, (mine is in unoptimized Python currently, using pygame to have a canvas/window and calling it for each pixel), maybe using GPU shaders to do it (never used those before), and learning about techniques other people are using[1][2] (from YouTube etc), and going down the rabbit hole of old CGI animations from the last 50 years[3].
Looking forward to the second half of the book this weekend. I have written a basic renderer before. I did an independent study class in college and I wrote a stereoscopic one for the iGlasses VR headset[4] in the 90s (you just have to draw using two cameras and interlace the images).
[1] https://youtu.be/A61S_2swwAc https://youtu.be/A61S_2swwAc “NamePointer - I made a better ray-tracing engine”
[2] https://excamera.com/sphinx/article-ray.html https://excamera.com/sphinx/article-ray.html “A reasonably speedy Python ray-tracer”
[3] https://youtu.be/WV4qXzM641o https://youtu.be/WV4qXzM641o “The Compleat Angler (1978)” Ray tracing animation with refraction, rippling water, etc. from 1978!
[4] https://youtu.be/NoVMIVY5tPA https://youtu.be/NoVMIVY5tPA “Virtual I/O iGlasses”
- drivers99 4y agoBy the way the vertices of the cube on page 109 ("Projecting our first 3D Object") appear to be wrong. I checked your example code online and got the correct vertices. Didn't see that listed as an errata so thought I'd let you know, if you see this. Basically the cube just needed to be manually moved back and to the left to look like the example screenshot. As it is in the book, it's too close to the viewport and so it's not visible. (BTW, for fun, I also animated it flying left and right and forward and back on a sine/cosine wave. Pretty fun!)
- ggambetta 4y agoThanks for bringing this up. I had fixed this on the website version [0] as well as the code, as you mention. I thought I had reported this to NSP, but can't find an email, so I'll let them know so they can add it to the errata. [0] https://gabrielgambetta.com/computer-graphics-from-scratch/09-perspective-projection.html#projecting-our-first-3d-object https://gabrielgambetta.com/computer-graphics-from-scratch/0...