5 ms·
This one: https://news.ycombinator.com/item?id=19584921 https://news.ycombinator.com/item?id=19584921 And it wasn't even my post! A long time ago I found mysel
by ggambetta 4y ago
This one: https://news.ycombinator.com/item?id=19584921 https://news.ycombinator.com/item?id=19584921 And it wasn't even my post!
A long time ago I found myself teaching Computer Graphics at my alma mater. Over the following years my approach to the subject evolved, and I really got the hang of it. After I stopped teaching, I took my notes, handouts and slides, and made them into a series of articles that I put on my website, where they remained in relative obscurity. Hacker News managed to find it every once in a while, and it was generally well received, but nothing came out of this. Until April 2019, when that post made the HN front page again, except this time it caught the attention of an editor in No Starch Press.
Long story short, my materials are now a book, Computer Graphics from Scratch, sold by No Starch Press [0], and also available for free on my website [1].
This genuinely wouldn’t have happened without your support. THANK YOU, HN community :)
[0] https://nostarch.com/computer-graphics-scratch https://nostarch.com/computer-graphics-scratch
[1] http://gabrielgambetta.com/computer-graphics-from-scratch http://gabrielgambetta.com/computer-graphics-from-scratch
- bob1029 4y agoI've got your book sitting on my coffee table right now. My primary reason for picking it up was to get my head around writing a triangle rasterizer from scratch. I found it to be a really good reference that addresses some of the nastier things like clipping, which most other tutorials happily omit. At some point, I will probably end up writing my own book about all of this as well. I don't know that any 2 people can ever have the same trip through this jungle.
- ggambetta 4y agoThe more, the merrier! Everyone understands and explains things in their own unique way, so there's no perfect book for everyone - but each book might be a perfect fit for someone!
- fermentation 4y agoI just wanted to say that I LOVE this book. It did a much better job of explaining how to render things than my graphics class back in college did, and in a much shorter timeframe.
- ggambetta 4y agoThank you! Happy to hear it's been helpful :)
- f0e4c2f7 4y agoWow this is so cool - I haven't read your book but I probably will after seeing this comment. Keep making cool stuff!
- ggambetta 4y agoThanks! Let me know what you think :)
- btkthrowaway1 4y agoThere's an intro bit you have on color and how it behaves in additive vs subtractive mediums. To this day, I feel like it was one of the most concise and well explained overviews I've ever read. I still plan on working through your book "eventually", but I just wanted to thank you for that first bit.
- drivers99 4y agoI 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...