
Casual Introduction to Low-Level Graphics Programming - deafcalculus
http://stephaniehurlburt.com/blog/2016/10/28/casual-introduction-to-low-level-graphics-programming
======
nightcracker
I disagree with the introduction of the article. Low-level graphics
programming is incredibly math intensive, and a solid understanding of
trigonometry, linear algebra and discrete math is __required__ to be succesful
in it. When I say discrete math, I mean fundamental understanding of how data
is represented, and how you can interpret data as you please. E.g. using
textures to store depth maps or even sound data, IEEE754 floats, etc.

There are many areas of design and 3d graphics that do not involve math, but
to claim that low-level graphics programming doesn't involve a lot of math is
disingenuous and harmful.

~~~
noobermin
I think they meant _most_ graphics programmers who don't go deeper than the
API know much math, unfortunately. It fits her narrative, say "most graphics
programmers don't need math" but then goes to demonstrate how much geometry is
relevant to low-level graphics.

------
mrspeaker
Excellent introductory post! There's so much to digest when you start playing
around with things like OpenGL that you quickly get lost in the details...
just memorizing things ("now for some reason I have to type "bindBuffer").
It's hard to build up a mental model for WHY you're doing all the steps. This
gives a great bigger picture overview! (though, the next step is still the
ocean of nitty-gritty details ;)

------
m_fayer
As someone who's only used high-level UI stacks (DOM, WPF, Android view
system, etc.), I would love to read a great article that's a "Casual
Introduction to Low-Level Graphics Programming", these are basics that I've
been meaning to add to my quiver for a long time. Unfortunately, this less-
than-coherent article is not it.

~~~
santaclaus
This is a really fun way to build your own (raterization based) renderer step-
by-step:
[https://github.com/ssloy/tinyrenderer/wiki](https://github.com/ssloy/tinyrenderer/wiki)

------
noobermin
>Vectors have more values, 3 is common. Very useful for things like position
or color.

>If two vectors overlap, the dot product is 1. If they are perpedicular (90
degree angle), the dot product is 0. (Note: just for vectors that only
represent a direction and have length 1, you can think about varying vector
lengths later)

Something is terrible incongruent (pun intended) here. How can three numbers
have a length, much less length of one? I think here, the _mathematical_
introduction that a vector is just an arrow is better here. It just so happens
you can express the arrow as a set of numbers, which I admit is not obvious at
first unless you've taken algebra 2. But the jump from "3 numbers" to length
is confusing too.

The truth is people conflate vectors with arrays, but if you want to think
deeper than anyone who does computer graphics needs to, you don't need
coordinates or any group of numbers to express vectors.

~~~
delinka
I'm not seeing any indication of three numbers relating to length. I see a gap
in information, not a leap from "3 numbers" to "length."

What's missing is the definition of a vector: an item with direction and
magnitude/length. Using the distance formula, you can determine the length of
the vector. So if your vector is <5,4,3>, plug that and the origin <0,0,0>
into the distance formula to get a length of 5 * sqrt(2) (approximately 7.071)

Further, you can 'normalize' the vector so that the direction is the same but
the magnitude is 1. To normalize, divide each component by the length:
[http://www.wolframalpha.com/input/?i=%3C5%2F(5sqrt(2))%2C4%2...](http://www.wolframalpha.com/input/?i=%3C5%2F\(5sqrt\(2\)\)%2C4%2F\(5sqrt\(2\)\)%2C3%2F\(5sqrt\(2\)\)%3E)

~~~
noobermin
That's my point...there is a gap in information.

------
melling
I've got a list of computer graphics resources on Github:

[https://github.com/melling/ComputerGraphics/blob/master/READ...](https://github.com/melling/ComputerGraphics/blob/master/README.org)

------
pandaman
It's bad. One one hand it gives something more or less true in a "casual"
manner but on the other it's also intermixed with complete BS. E.g. wtf
specular does not depend on view direction? It's called specular for a reason.

While I have no problem with people simplifying things for introduction to
laymen, I think introducing falsehoods like this will do more harm than good.

~~~
psyc
It's just a typo. They wrote "normal" twice instead of "camera/eye". With that
one-word correction, it's Blinn-Phong.

~~~
pandaman
It could be a typo but how are people who is this supposed to target will
know? It's not like somebody who was just given a bizarre explanation for dot
product (and Lambert's lighting model along with that) will see through it.

------
generic_user
While its true that you probably do not need to be very good at math to do
basic graphics, you do need 'some' math. You need to be able to understand the
basic algorithms of the graphics pipeline to use them correctly and
experiment. The best source for a detailed and 'gentile' intro is still one of
the introduction to computer graphic books. You can sit with a pad of paper
and work through some of the formulas on paper until you understand what they
do.

One of my favorites, because it does not use any particular language and the
math derivations are detailed and easy to fallow.

Fundamentals of Computer Graphics - Shirley
[https://www.amazon.com/Fundamentals-Computer-Graphics-
Peter-...](https://www.amazon.com/Fundamentals-Computer-Graphics-Peter-
Shirley/dp/1568814690)

------
jlarocco
Maybe my expectations are too high, but that's just a collection of random
comments loosely related to graphics. It's a terrible introduction, and it
doesn't give any concrete information on how to get started.

My advice for people interested in graphics would be to jump in and get
started with a tutorial on the web and then get a book or two to learn more.
My recommendations would be:

Introduction To Ray Tracing - It focuses on ray tracing, but many of the
topics (vectors, matrices, shading, view transforms, etc.) are applicable
regardless of the actual rendering method, and it does a good job explaining
all of it.

[https://www.amazon.com/Introduction-Tracing-Kaufmann-
Compute...](https://www.amazon.com/Introduction-Tracing-Kaufmann-Computer-
Graphics-ebook/dp/B003VWBY18/ref=mt_kindle?_encoding=UTF8&me=)

Real Time Rendering - This also covers all the math, but focuses on rendering
at a higher level and covers more ground.

[https://www.amazon.com/Real-Time-Rendering-Third-Tomas-
Akeni...](https://www.amazon.com/Real-Time-Rendering-Third-Tomas-Akenine-
Moller/dp/1568814240/ref=sr_1_1?ie=UTF8&qid=1477765570&sr=8-1&keywords=real+time+rendering)

Finally, Computer Graphics: Principles and Practice - This is a great general
reference for more specific topics. It's like Real Time Rendering expanded to
cover more topics and going into more depth. Not a beginner reference, but
great to have when you need more information on something.

[https://www.amazon.com/Computer-Graphics-Principles-
Practice...](https://www.amazon.com/Computer-Graphics-Principles-
Practice-3rd/dp/0321399528/ref=dp_ob_title_bk)

------
elpocko
Graphics programming introduction, followed by fashion advice for software
developers. Heh.

------
aj7
Does this person know anything about graphics, or is this some sort of
creative writing or reportorial exercise?

How can one introduce vectors without the word "direction"?

How can one so thoroughly screw up the introduction to illumination?

~~~
psyc
When you write an article, and John Carmack responds with a correction, you're
probably not actually doing too badly.

~~~
monkeyshelli
For the curious
[https://twitter.com/ID_AA_Carmack/status/792158370186670080](https://twitter.com/ID_AA_Carmack/status/792158370186670080)

------
posterboy
js;dr: the page doesn't render without javascript.

~~~
douche
I'm really not a fan of this Medium-ization of programming blogs. I find this
much harder to read than something more crude and basic, like, e.g.
[http://lazyfoo.net/tutorials/SDL/index.php](http://lazyfoo.net/tutorials/SDL/index.php)
\- static html, no JS (aside from the obligatory analytics, Adwords, and
social widget throw-ins), high-contrast, no-nonsense.

~~~
BoorishBears
Man lazyfoo, that takes me back...

I remember extending what I learned in the series of tutorials into a tiny
Windows/Android cross platform demo a few years ago to get familiar with NDK

