CG programming for non-programmers, lesson 9

Thanks to J. Peterson for point out the lack of error messages in his comment yesterday. When your program stops running, I wasn’t providing any way for you to see where the error is.

For this ninth lesson, I’ve kept everything the same except that I’ve added some behind-the-scenes infrastructure. Now when your program stops running, there is an explanatory message along the top, and an arrow that shows you which line of your program is causing the problem.

Let me know if this works for you. I would love to get constructive feedback.

You can see this lesson by CLICKING HERE.

CG programming for non-programmers, lesson 8

For the eighth lesson, we are going to learn how to make edges.

It turns out that there is a shader function called step(a,b) that does this, where a and b are the two arguments to the function.

The step function returns either 0.0 or 1.0, depending on which of its two arguments is larger.

You can use the step function to make colors change suddenly. In other words, to make edges.

And if we can make edges now, then soon we will be able to make shapes, which will be really cool!

You can see this lesson by CLICKING HERE.

CG programming for non-programmers, lesson 6

For the sixth lesson, we are going to start creating variables.

This will make our shader program much easier to read, because we will be able to do things step by step, since we can store intermediate results along the way.

To do this we will use float variables. These are a very simple kind of variable, because they can only store one number at a time.

You can see this lesson by CLICKING HERE.

CG programming for non programmers: lesson 1

I’m going to try the bottom-up approach. This is likely to be more fun for people who are more interested in creating beautiful images, and less compelling for people who want to create people and creatures that move and animate.

You can see the first lesson, which is very easy, by CLICKING HERE.

This lesson is really just to get you used to the idea of editing text in a computer program to change the appearance of something.

Teaching computer graphics programming to non-programmers

I know a number of artists who don’t program computers, yet use computer graphics tools such as Unity or Maya or Photoshop. Several of them have expressed interest in going deeper. Rather than seeing the computer as a black box, they want to understand how things really work.

In order to do that, you need to learn to program. But where to begin? I am thinking of putting a series of lessons on-line on this blog, aimed at people who use computer graphics tools, and don’t already know how to program, but would be interested in learning to program if it could give them a greater insight into how all this stuff works.

The major question I’m wrestling with is whether to start from the bottom up, with things like procedural shaders that you program at every pixel, or from the top down, with things like animated characters that you move around.

Each approach has advantages and disadvantages. I think it may come down to the particular learner. People who are motivated by creating things that look visually beautiful would be more drawn to the procedural shader approach. People who are motivated by creating animated things that come to life would be more interested in the animated character approach.

Maybe I will figure out a way to do both.