Issue link: https://digital.copcomm.com/i/77744
CG Animation n n n n The Scottish landscape provided a living back- ground for much of the action in the fi lm. To coat the rocks and earth with moss and clover (above), put foliage on the trees (at right, top), and grow grass (at right, bottom), technical director Inigo Quilez painted the landscape with code. where we wanted things to grow. Th ese weren't polygons; they were mathematical descriptions: Th is is the center, these are the sides, end of story. Th e code would use that to generate detail inside. We generated bush- es out of nowhere." Quilez didn't use typical plant-growing rules to produce the grass, moss, and other vegetation. "Th e problem with L-systems and other old-school techniques is that you have to encode the rules," he says. "If you want to change something, you have to change the rules, which isn't intuitive. When we wanted to change something, we' and make the change." d go into the code Master Gardener To grow the moss, Quilez would use the ori- entation of the surface. If the normals pointed down or horizontally, which suggested more water and less sun, the moss would have more clover. If the normals pointed up or vertically, which suggested more sun and less humidity, no clover would grow. "So, the clover followed the shape of the tree or rock," he says. "We used these little tricks to make everything organic. If you just drop fl owers everywhere, it doesn't look natural. You need driven randomness." All the code executed at render time. Th ere were no physical versions of these plants, no fi les, no point clouds. As Quilez refi ned the look of the vegetation, he'd render the elements to screen for review, and then delete the render. He didn't save images to disk. If a director or art director asked for a diff erent look—wilder grass, perhaps—he' compile the code and render it again. "Everything happened in the CPU when d change a number, then we rendered the frames for the fi nal shots," Quilez says. "If we had stored all this detail on disk, we would have had terabytes of data. We just had formulas and generated the shapes at render time." Th at meant, though, that animators could not see the shapes until the code rendered. "Luckily, it was quite quick," Quilez says. "We could have the ground plane with grass growing on it within 20 or 30 seconds using 10 CPUs." Even so, about halfway through produc- tion, the crew developed a real-time preview version in OpenGL for the animators and layout artists. "We did a one-to-one match between RenderMan and OpenGL," Quilez says. "Of course, the quality wasn't the same, but every blade of grass was there in the real- time tool." Although lighting artists didn't have feed- back until after rendering, that didn't seem to be a problem, according to Quilez. "Th ey didn't have to worry too much because it was quite predictable," he says. "We didn't use raytracing or deep shadows for the grass. In- June/July 2012 13

