Prev: A Sample Material Next: Appendix: Image Maps

11. Postscript: Isn't There a Better Way?

We have now created examples of both procedural textures and procedural materials. As you have seen, it can take a fair amount of work. Even something as simple as our stripes texture becomes distinctly non-trivial to implement once you start worrying about antialiasing. You may have started wondering whether all this work is really necessary.

Here is the exact same stripes texture, implemented with the Art of Illusion Procedure Editor:

It took about one minute to wire together. There is no need to worry about antialiasing, as this is taken care of automatically. You can easily modify this texture in the same ways that our Stripes plugin permits, but also in many others. For example, you can make all the white stripes transparent simply by drawing a link between the output of the Greater Than module and the procedure's Transparency input. Or you can turn the straight stripes into wavy ones by replacing X by X+sin(Y). Or you can turn the simple pattern of red and white stripes into a much more complex pattern of color bands by replacing the Blend module with a custom color function. There is no need to recompile your procedure and rerun the program: simply make changes to the procedure, and the results of your changes are displayed almost instantly.

If you have not yet learned to use the Procedure Editor, I highly recommend that you do so. It is powerful enough to use for the vast majority of the textures and materials you are likely to want to create, yet requires only a tiny fraction as much work. Even if you are certain that you want to implement a procedure with the plugin API, the graphical editor makes a powerful tool for prototyping new ideas.

Prev: A Sample Material Next: Appendix: Image Maps