top of page

From Dots to Rendering

Screen Shot 2021-04-01 at 11.13.44 PM.png

Welcome to a collection of (I hope) gentle lessons in 3D graphics.  I was a teacher (kindergarten, junior high school) and then had a 32 year career in computers.  The last 26 years were at ATI/AMD working on 3D drivers for Mac systems.  I developed this curriculum first for my kids and then for interns and internal training at AMD.  There are already so many good resources on the web that cover this material.  I used lots of them :-). I especially recommend: Scratchapixel (https://www.scratchapixel.com), the "Ray Tracing in a Weekend" series (https://raytracing.github.io/) and Khan Academy (https://www.khanacademy.org).

 

What I offer, is an especially accessible tour of this material.  Because math does not come easy to me, I spell out every step, and am constantly amazed about simple math discoveries.  Each lesson comes with a .pdf of hand written notes and the code to add a new feature.  I've included a "Delta" file of just the new code to add, as well as the full, working Python in two formats:  a) one that uses PyGame and is interactive and animated, and b) one that is standalone and just outputs r,g,b values for a .ppm (Portable Pixmap) image file.  This later style can be used with on-line Python IDE (Integrated Development Environment).  https://www.online-python.com​ works if you set WIN_WIDTH  = 400, WIN_HEIGHT = 400

​​

These lessons all build up software renderers and ray tracers, so they do not use the underlying GPU accelerated graphics.  My interest is in teaching algorithms and the fun of programming.  Once you understand these lessons, you will know a lot about what GPU's do under the hood, but the software versions themselves won't be fast.

​

I am most familiar with 'C' programming and have ported this code from 'C' to Python.  I use Python mostly as if it were 'C', including using commented out curly braces for indented code blocks: #{, #}.  The notes in the .pdf files are in 'C', but you will see it looks almost identical to my Python code, and will become easy for you to translate back and forth.​​

​

One additional note:  a few of the lessons show how to read in an image data file to use as a texture.  The image files are included in the "Resources:" section, and just need to have their suffixes changed from ".txt" to ".ppm" (Portable Pixmap format).  Similarly some lessons show how to read in ".obj" data which define 3D objects.  Just rename the suffix of these files from ".txt" to ".obj".

​

​If you stumble upon these lessons, I hope they are useful to you and help give you confidence in your own journey,

                             Cheers,

                                              chrisb

                                             

bottom of page