The Aha moment, part 6

To me one of the oddest things about all this is that a lot of people think about the noise function, and nobody really thinks about where shaders come from.

I am glad that I came up with the noise function, and it’s incredibly useful. I use it every day.

But my real contribution to the field from that time was introducing procedural shaders. When I presented that work during a session at Siggraph 1984, some people from Pixar were in the audience.

After the Pixar folks saw what a full shader language could do, they pivoted from Shade Trees (essentially a fixed expression parser) to what eventually became Renderman — a fully functional shader language that became an industry standard.

But the ripples spread even wider than that.

More tomorrow.

The Aha moment, part 5

Back then everything was expensive — not only computation, but also computer memory. So when I wanted to look at just a rectangle within an image, it wasn’t so easy, because in order to save space, images were all run length encoded.

So to get to the right set of pixels within each scan line of an image, I needed to do some work. First I had to find the right place in the run length encoding where my rectangle started, then I needed to chop something up in the middle, all of which was kind of a pain.

I remember staring at my screen and wishing that I could just put an “if statement” at every pixel. I could then just check each pixel to see whether it was inside the rectangle. That would be so much easier.

And that’s the moment when it hit me: If I could write a custom computer program that would run at every pixel that would be part of the content of the image — not just as part of the underlying system — then I could have as many if statements as I wanted. And I could also have loops, and variables, and procedures, and all of the other power that you get from a programming language.

That was the Aha moment — the moment when I invented the concept of a shader language, although I didn’t call it that — I called it a pixel editor. Of all of the things I’ve contributed to the field of computer graphics, coming up with what we now call shaders was by far the most important.

I spent the next month or two implementing my own interpreted language on top of Fortran, specifically to run at every pixel. It had many of the features we now associate with shader languages, like having vectors and matrices built right into the language, as well as lots of built in operations between vectors and matrices.

I then spent several happy months wearing my artist’s hat, creating the world’s first procedural shader based images (I’ve pasted one of them below). And in the years since then, shaders have become a mainstay of computer graphics, and have led to the rise of multi-billion dollar companies.

But it all started in that single moment, when I realized that I wanted to write an “if statement” at every pixel.

The Aha moment, part 4

Once I had the noise function, I started using it to try to create the artistic visions I had in my head. I wrote various texture programs in Fortran (that was the only language that ran on our computers at MAGI), and experimented with different combinations of textures and shading. I was like a kid with a shiny new toy.

There was only one problem — computers were very slow back then. Because of that, it took a long time to render a single image.

So I developed a plan. Instead of rendering the entire image, I would just render a little rectangular piece of the image. I discovered how big a rectangle I could render and still get a turnaround time of only 20 seconds. While I was waiting for the image to come up, I would make changes to try the next thing.

And that’s what led to the Aha moment.

More tomorrow.

The Aha moment, part 3

That was the point where I started looking for ways to create organic looking materials. I knew what I wanted — techniques that would stop things from looking like they came out of a computer.

Just using random numbers didn’t work. If you make everything a random color, you just get speckled noise, which isn’t really what most natural materials look like.

So I started looking for ways to create coherent noise. I started looking at things like the bumpy surface of dried paint on walls, the shapes of sand dunes, the texture of avocadoes. All of those things consist of random bumps, but the bumps are all pretty much the same size.

I started to look for ways to make something that looked like that, because if I could create bumps of one size, then I could mix bumps at different scale to create many sorts of textures. Kind of like mixing different musical notes to make chords.

And that led me to create the 3D noise function. But that wasn’t the Aha moment.

More tomorrow.

The Aha moment, part 2

TRON came out in the summer of 1982. I loved a lot about that movie, and it was a privilege to work on it at MAGI, but I didn’t like the fact that its aesthetic was limited by technology.

Rather than the rich visual palate that we associate with classic animation such as Disney’s Fantasia, TRON had a stripped down look that was largely dictated by the state of the art. In order to produce the required amount of high resolution CGI footage in 1981-82, the filmmakers needed to make some tough decisions.

The surfaces in the animated portions of TRON generally looked bare and untextured, and shapes were highly simplified. This worked thematically because the story took place within the somewhat abstracted world of computer software. But it was definitely a case of necessity being the mother of invention.

So after TRON wrapped, I took it as a personal challenge to try to push things in a more organic direction. I had seen Fantasia as a teenager, and the fantastical visions from that classic film had always stayed with me. In fact, the inspiring visuals of Fantasia had been a large part of my decision to take a job in the field of CGI.

More tomorrow.

The Aha moment, part 1

I was having lunch with my cousin the other day, and he asked me whether I ever had an “Aha moment”. Of course I had — everybody has.

But that got me wondering which was my most significant Aha moment. And I realized that I had one in particular that changed my life. In fact, it has arguably touched the lives of many millions of people.

If you know my work, you probably think you know what I’m talking about. But you would probably be wrong.

More tomorrow.

Music from the gods

I was fortunate this evening to attend a musical gathering which was largely by and for a small group of talented musicians and performing artists.

I realized that when watching and listening to these supremely talented people, one can perceive no observable effort. The performance is so natural, and comes from a place so deep within them, that it is as though they are channeling music from the gods.

I felt blessed simply to be in that room.

Darwin and Lincoln

Charles Darwin and Abraham Lincoln were born on exactly the same day — exactly two hundred and fifteen years ago today. I find the intellectual connection between the two men fascinating.

Darwin’s concept of evolution and natural selection helped to create the intellectual climate within which Lincoln was able to bring about emancipation. For one thing, evolution helped people to understand that just as species can evolve over time, so can societies.

But even more important, the knowledge that all humans have a common ancestry supported the moral argument against slavery. When you understand the theory of evolution, you understand that the concept of “racial superiority” is no more than a self-indulgent (though highly dangerous) fantasy.

Let us all celebrate this double birthday!

Last shot of The Fabelmans

I recently watched Steven Spielberg’s cinematic roman a clef The Fabelmans. I can say with confidence not only that it is a masterpiece, but also, in particular, that the final camera shot is pure genius.

It may be my favorite camera shot in the entire history of movies. When else has a director managed to turn a single camera shot into a key character in the film?