Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Author here. What a surprise to open HN and see this on the front page :) Happy to answer any questions.


I am preparing to teach a computer graphics course for the first time and have been reading up on WebGL, etc. It looks like this will be a nice intro to the lower level aspects of graphics. Thank you!

By the way, Eck's book at:

http://math.hws.edu/graphicsbook/

is REALLY helpful for learning WebGL.


Thanks for mentioning it.

Do you think that book is a good source to learn "traditional" OpenGL?


Traditional OpenGL is not useful except as a history lesson. It will give you bad practices when you then try and use a newer API (not even counting DX12/Vulkan; the bad practices will stick with you even if you try to just use DX11/modern OpenGL). WebGL is a pared down version of GLES, which is still not perfect, but a big step in the right direction.

I wish there was a better cross-platform intermediate graphics API; Vulkan has a lot of challenges. Metal is very close but it's Apple-specific. Dawn/WebGPU/wgpu seems to be a nice fit in the middle, but it's still in development.


So would that book be a good way to get into graphics programming? I see that it uses OpenGL 1.1


I suggest Anton's OpenGL 4[0] as a starter guide for modern GPU pipelines.

For a general graphics introduction I would recommend software renderer tutorials such as this JS one[1]. The problem that has made people split on whether to directly study modern OpenGL is that 1.x is much easier to configure because more parts of its pipeline are fixed-function. There are fewer lines of code involved and you have fewer episodes of "why doesn't it draw anything". Software rendering lets you get around that because you configure only exactly as much as you have built, and because you built it you understand it(to some depth). When you go to any current GPU API you have to grasp both what the hardware desires and the concepts you're looking for, and in practice the safest way to proceed is to very gradually build up and extend an example codebase so that you have a testing sandbox with easy to toggle modes for debugging, and then adapt that into the application.

[0] http://antongerdelan.net/opengl/

[1] https://kitsunegames.com/post/development/2016/07/11/canvas3...


Teaching OpenGL 1.1 is like starting a chemistry course by going over alchemy. Begin with modern ideas, not the attempts to find phlogiston.


I would not bother learning anything before OpenGL 3. The core stuff from 3 onwards is still reasonable for use today, and most changes build upon it rather than fundamentally changing the model, but the older stuff is quite different.


1.1 is 22 years old.


The best book that teaches "traditional" OpenGL is the official OpenGL programming guide (aka OpenGL Red Book) and the OpenGL superbible.


Yes, Eck's book is also a good intro to OpenGL. It is the rare book that is both readable and covers both OpenGL and WebGL. Of course, it is not as comprehensive as the Red book. But, in my opinion, that also makes it a more approachable introduction to OpenGL.


I've been following your Fast Paced Multiplayer articles[1] as I write my first networked game; it is really helpful, thanks!

[1] http://www.gabrielgambetta.com/client-server-game-architectu...


Thanks for your kind words, I'm glad you found it helpful :)


Thank you very much for this. I'm glad there still are people writing books like this one. When I was a teenager, I found a book by L. Ammeraal which was awesome reading. It taught how to build a simple 3D graphics renderer with hidden edges removal and other interesting features. Unfortunately, back then I was a Pascal fan, so it took me some significant effort to translate bits of the code from the book from C

Later, I found another book, can't remember the author, which described even more things, like z-buffering and so on. Very interesting and very useful.


http://www.opengl-tutorial.org/ is a pretty fantastic resource of learning this stuff.

Don't worry too much about opengl vs direct x vs vulkan. There are underlying principles that apply broadly to both.

Alternatively if you want a book that goes more in depth, but still allows you to take your first steps, opengl programming guide 8th+ edition is good.

Expect it to require some patience no matter what route you take. Graphics programming is finnicky.


Maybe it was "Computer Graphics: Principles and Practice", most commonly known as "the Foley Van-Dam"?


You're at Improbable. Tell us more about how you deal with scaling and dynamic region boundaries. How do you keep message traffic from bottlenecking the system? Can you really get a thousand avatars in a big room and not have the system choke? What would it take to port Second Life / Open Simulator to Spatial OS?

There are a ton of computer graphics intro books. Not so much on big-world architecture.


Maybe I'll write a book about Improbable some day - but more likely about the mythical origin story :) That said, at two different times I managed teams that made demos, tutorials and documentation, most recently https://twitter.com/gabrielgambetta/status/92135876311796121..., but there's people much more qualified than I am to write technical stuff about SpatialOS nowadays.

Region boundaries are a fascinating topic, see this for example: https://improbable.io/games/blog/distributed-physics-without...

But as Woody Harrelson would say, "let's keep it about Computer Graphics, people..." ;)


I'd like to see the book Animats mentioned as well. Perhaps you should encourage one of your colleagues to write it.


Just a heads up, it looks like your script that renders the math bits is failing to load intermittently, making the equations very difficult to read sometimes.

But: this looks really cool. I'm sending it to my brother who is a newbie programmer and wants to know about graphics.


Not sure if this is related to errors loading resources, but all the "Source code and live demo" links go to pages that seem to render the demo in javascript but don't show any code. Maybe the reader is intended to view source to see it?


Thanks for letting me know, I'll take a look. IIRC the script is hosted externally, maybe I should host a copy.

You're correct about the source code. Perhaps I should make it easier to see or download.


Thanks for writing this! I've been interested in computer graphics for a while and too many tutorial dive straight into the details without explaining key concepts. I'm eager to get started reading.


Small typo in 9th paragraph of the Introduction. Look forward to reading it


Hmmm, can't find it. Mind telling me what it is?


"While their sets of features have considerable overlap, they aren’t identical, so this book covers their specific strenghts" - it should be "strengths".


Ugh, thanks. Will fix.


Not the guy who mentioned it but:

>.....so this book covers their specific strenghts:

Reversed h and t in strengths.


No questions, but I'd like to thank you for a well written article that takes me back to when I was writing bzone style wireframe games as a kid.


Glad to hear you've found it interesting :)


thank you so much for writing this. this is one of my favorites on computer graphics. i love the simple and to the point approach. similar are the github.com/ssloy repos.

so, are you going to release a print version? (i am one of the few who still love them)

do you plan on adding more chapters after rasterization?


Thanks for your kind words :)

No definite plan for a print version, but it could be fun, if nothing else to have a copy on my own shelf! There's a few sections I need to complete first, though.

I do have plans to add a few more chapters covering more advanced topics, but again, nothing definite.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: