Pixar's Ratatouille: Shading Food
The challenge of shading food for Ratatouille was to achieve a stylized look for the world of Ratatouille, yet is still readable and recognizable as something appealing to eat. We, as humans, have a built-in sensory system to know what looks edible to our eyes and stomach. Finding that acceptable (and tasty) appearence was the main focus. To achieve this, we used subtle illumination techniques that became a general approach for a variety of objects. Here we will study a brief technical overview, followed by descriptions of different concepts, techniques and systems to achieve the look.
Our food shading was based on skin and scatter computations, which have had internal improvements in speed and look since The Incredibles. The shaders were mainly a small variation on our in-house skin. We took full advantage of this technology base, since there is a breadth of research and precedents in the industry [Jensen, Marschner, Levoy, Hanrahan 2001] [Jenson, Buhler 2002].
Skin has always posed a challenge, since there is a familiarity to what the surface qualities should be. Food had similar problems when interpreting into cg, as well as sharing properties of translucency and a living organic feel (or post-life, in the case of food).
For most shaders, we wanted to expediently feed the models into our pipeline quickly. We accomplished this by taking advantage of Slim, which offered a great level of flexibility. By creating networks that could input a variety of shading elements into our templates (procedural noises, textures, etc.), then using scatter on the results, we add an additional level of visual complexity to our otherwise “typical”, slim shaders.
For items which do not fit into this system easily (such as bread and wine), it became a “special case” shader that was refined on an individual development project basis.
Art & Reference - Finding The Stylization
Our challenge, working closely with art direction, was to make the food appealing but not entirely “real”, which could distract or stand out from the film. We did not apply any real world photographs as textures, but photos were often adapted, modified and painted over. [It was very easy to obtain plenty of reference, and there were many trips to the grocery store by Production]. Extensive photo references were used; including food prepared, cooked and lit for our own documentation. Consulting with chefs and watching them at work, enabled to document and control the whole process from raw food to meal. Part of the stylistic choice was described as the “doll house” look. This look is created by scaling up features larger than they would usually be in relation to the overall size, while maintaining realistic properties of the surface.
For our own documentation. Consulting with chefs and watching them at work, enabled to document and control the whole process from raw food to meal. Part of the stylistic choice was described as the “doll house” look. This look is created by scaling up features larger than they would usually be in relation to
Working with art and direction, we narrowed in on the factors that made it appealing. The key issues came down to three important qualities:
The softness was an indication of light passing through the medium; things that do not exhibit internal light bounce tend to look hard and plastic. Saturation was an indication of freshness; deep rich colors signify quality food. Reflections (and specular) has a relationship to moisture; a characteristic that most edible and appealing food contains.
Using Scatter to Capture Translucency
The subsurface scattering system used on Ratatouille was an extension of the system developed for The Incredibles. Both use an IIR filter to blur sampled data through a voxel grid. For The Incredibles, different scatter lengths were used for the red, green, and blue channels, which allowed for the characteristic warm glow of backlit skin, while maintaining conservation of energy.
For Ratatouille, an exaggerated subsurface scattering look was required which the Incredibles approach did not accommodate. As the red scatter distance was pushed further, green and blue would dominate in areas where the red had been pushed out. This caused an undesirable "waxy" look. A different application of the technology was needed.
Rather than using different scatter lengths for each channel, the Ratatouille system scattered the irradiance uniformly, tinting the result both before, and after, scattering. This allowed for more artistic control in visualizing the light absorption, rather than differing scatter lengths per wavelength -more appropriate for the looks we sought to achieve.
Implementing the Look
Once we found our general translucent look, the next step was to apply this to a variety of materials. We had objects to shade such as crusty bread, raw fish, cooked meats, fruits, vegetables, cheeses and sauces. There were several techniques and implementation details we discovered along the way.
Since there were often large ridges, dents and holes achieved through displacement, it was important to use the displaced position in our scatter grids, especially for the diffuse softening element. The result being we could push the intensity of displacements: furthermore, as they were captured inside the scatter grid, they were softened at render time.
Controlling the “wetness look” became our next concern. We controlled a lot of our surface shine via reflection. Our surface roughness values were set up for sharp specular highlights, so they had a small contribution to the total illumination. Relying on reflection, instead of specular, to achieve wetness became a desirable part of the look. Trying to artificially increase our specular highlight would intensify color shaping, which would provide too much tinting, leading to a rubbery or plastic feel. Since reflections were more malleable and controllable by lighting, it gave us a lot of flexibility. However, this did make it more difficult, at review time, to evaluate our food shaders in still frames. Often we had to render test turntables, movement of light and reflections across the surface; to establish wherter there was sufficient highlight response. It was sometimes less apparent depending on the angle.
Creating the shaders for each object then became a very artistic approach. The art packet was evaluated by the TD and often implemented by one individual, without an additional texture painter. This led to the richness of scatter and illuminations being balanced by one individual, helping facilitate better control of the materials. Translucency was an abstract element to define as a painted texture (especially in relationship to standard rgb surface color), and it became easier to use hand-painted control signals (float matte channels) in combination with a TD painted vertex, varying data to control subsurface illumination.
We also often used procedural and tiling textures over custom-painted textures per model. This allowed us to create interesting and complex patterns quickly, for reuse via slim. It became important to share these elements since we had many objects going from raw to cooked, or cooked to rotten. It would be prohibitively expensive to redo the work each time. The realization that the general shaders were the same across models (for example, with a grape and a tomato) and adapting a similiar shader for both, became part of our technique for dealing with the volume of models.
Shading Grapes - the basic model
A bunch of grapes is a good case study for our components of contributing illumination. For the shader we used tinting of scatter (with warmth) and lightly-patterned surface diffuse color, allowing more translucency to dominate over the diffuse. Each grape was offset individually from the bunch by a random color shift in hue and value. We also used a subtle diffuse blur and a sharp reflection. With this, the elements were in place for lighting to create an appealing image.
Cheese, Meats and Plated Food – adding complexity
Our cheese shaders were helped by strong scattering light, in addition to having the displacement component in the scatter grid to accentuate ridges and holes. An intense diffuse blur amount was used for cheeses and meats to increase the fleshy look. Pushing the diffuse blur, to the point where details were lost, was actually beneficial for a waxy cheese look.
Techniques, such as paint integrated with procedural shading and painted vertex varying data to control subsurface contribution, helped provide additional control in the shaders. Another key technique was using cellular textures, based on voronoi patterns to capture small details when added as a multiplier to scattering amount. This broke up the light transimission look, giving the effect of subcutaneous details, such as straition inside meat.
The different material properties in one model (like this steak dish below) required multiple scattering grids to avoid bleeding of irradiance across discreet food types. It was undesirable to have reddish steak as part of your light potato shader. The exception to this came when shading a rotten garbage pile, where this bleed became a positive side effect for blending the shaders, such as a fake bounce irradiance.
Another key to complexity was adding flecks of spices to our cooked dishes. Taking these flecks out of the diffuse blur was important, or else you would have blurry details rather than the desired parsley or pepper speck look. An oily or buttery coating for all cooked foods, was another level of detail. If the objects were cooked together, they would have a consistent coating. It was important to create that as a thin transparent layer on top of the shaders.
Methodologies: Rotten vs. Fresh, Raw to Cooked
After working on food for some time, we realized the method of starting with raw foods first was an easier approach to shading. It was more difficult to go from cooked to raw, or rotten to fresh. A lot of detail in the cooked versions were helped by modeling simulation softening and adding displacement. Often we reused the same shaders, with some small modifications; such as adding brushed details, cooking browning, or having our cooked colors move closer together toward a warm brownish hue.
The bread was an example of a special case project that fell outside the general approach, requiring a new technique. It still used scattering to create a soft look, but took it one step further into visualizing this softness through the formation of air bubbles inside the density of the bread.
To create this airy effect we used a multi-step approach. The bread interior was a volumetric hypertexture (Perlin and Hoffert, 1989) defined using a procedural density function. The density function was made up of several layers of procedural voronoi noise.
In addition, the important features -such as the position of the crust and position of the torn off face- were encoded in point clouds, which the shader used to modify the density function. The entire density function was also deformed using a texture map. The texture map was applied to the density field using a planar projection. Before evaluating the density function, the x and y positions of the current point were replaced by the value obtained from the texture map. This allowed us to compress air bubbles which were closer to the crust, then give a slight twist to the pattern of air bubbles, as often seen in real bread.
We see and eat food everyday, so the challenge was to find this emotional impact of positive associations. Creating shaders in a realistic way, but still fitting into our film stylization, helped us do this. By hitting the key subtleties of appealing illumination -saturation, softness, and reflection- we achieved our goals for shading.
Pixar's RenderMan Studio
Keep in mind that the same subsurface scattering techniques used for the food in Ratatouille are available in Pixar's RenderMan Studio, allowing any Maya artist to create VFX with Pixar's technology. Read More ...