A note on process
In case anyone’s curious, I thought I’d let you know sort of what my process is when I’m working on Kludge.
Most importantly, I keep my eyes open when I’m out and about. I live in Dallas, so we’ve got a fairly decent variety in our skyline. I take photos when I can, and look at pictures of interesting buildings online. There is sort of a vocabulary of city architecture — some buildings have alternating stripes of material (what I call “buffers” in the script), some buildings have windows that wrap around, some have blank walls without windows, some are monolithic and flat on their facades, and others have all kinds of details extruding out from their surfaces. My job is to take those basic architectural ideas, and make a system that is capable of creating them on the fly, for any mixture of features.
It doesn’t always work.
The first step is always to model out the structure by hand. Everything you do in Maya has a corresponding command in MEL. In theory, if you can do it manually, you can do it in a script. I’ll work out a list of steps that are involved in creating a particular bit of geometry, and write out a sort of “pseudo-code” that summarizes the process. Then I figure out what MEL commands will give me the desired result. Usually this involves a lot of guess-and-check and many trips to the technical documentation. MEL is good at a lot of things, but it can be incredibly difficult to find a scripted solution that mimics human creative judgment. “select the faces that are facing outward from the building” is great if you’re talking to a modeler, but translating that into code can be tricky.
At the core of Kludge there is the default building — the only building that is guaranteed to work perfectly every time. Whenever I add a new feature, I work with this default building at default settings until I make it work correctly. The “ideal test case” is something I come back to throughout the testing process — every time I make a major change, the first thing I check is to see whether the default setup still works as expected.
After that, I try out a handful of other configurations. If all goes well, then I proceed to do everything I can to break the system. Most of the time, this is not difficult. Usually, I try to “user-proof” the system to the best of my imagination, but the truth is, there are more ways to break Kludge than there is time for me to fix them. All I can really do is try to make the system as flexible as possible.
A lot of the functionality of Kludge will eventually involve randomization, and I really can’t ensure that every combination of features will look good, or even work at all. But I guess that’s really the power of working procedurally — if you don’t like the result, in a couple minutes, you can have an entirely different building. There’s no reason not to try a bunch of different things and only keep what works.