MTOR/Slim - Mapping techniques
 

RenderMan permits texture-mapping, where an image (file texture) is mapped (fitted) to a surface or a part of it. In addition, RenderMan also makes use of computed maps to create shadows and reflections.
 

In this (last) class, we'll look at how to accomplish the following using MTOR/Slim:


Texture mapping

You typically use an 'ImageFile' Slim appearance to read in an image from disk and use it as a texture map in an R'man shader. Slim in addition also lets you derive texture-mapping coordinate information from a Maya utility shading node called 'place2dTexture'. So here's how to match Maya's texture-coordinates in RenderMan:


Shadows

Shadow maps are an efficient alternative to raytracing which is usually computationally expensive.

The idea is to create a light source (point, spot or directional) in Maya and attach a corresponding Slim shader to it, and turn on the shadow generation feature. Note that a spotlight or a directional light requires the computation of just a single shadowmap while a pointlight requires SIX maps.
 


Soft shadows

Here are the steps to achieve soft shadowing:


Reflections

Use reflection-mapping (and not environment-mapping) when you have a relatively planar, shiny object on which you want nearby objects to be reflected. Note that reflection maps are camera-dependent, so for an animating setup you need a map for each frame where there is relative movement.

Environments

Environment mapping is useful when you have a curved object (as close to spherical as possible) that needs the scene around it to be realistically reflected on it.
 

Alternately, you can create an environment map yourself from your own images and then have the EnvMap node make use of it. Once you create such a map [with a .env extension, to follow R'Man conventions], simply point MTOR to it using the file-browser in the EnvMap appearance. The neat thing about this is that the sources of the input images can be anything including photographs, other scanned material, digital art, processed imagery, rendered images, etc., etc. Eg. if you want glowing Maya objects to be reflected in your RenderMan renders, the thing to do is to place a Maya camera in the center of the object that will receive the reflections [hide that object itself], and render 6 images by orienting the Maya camera along +X, -X, +Y, -Y, +Z and -Z. These 6 images can now be used to create an R'Man 'cubical' environment map (see below).

There are two kinds of environment maps that RenderMan recognizes - a 'latlong' map and a 'cubical' map. The latlong map can be likened to a map projection where a spherical view of the world has been flattened or unwrapped on to a plane. It is a good choice for outdoor scenes. In contrast, a cubical environment map is stitched together from 6 views at the point of projection (front, back, left, right, top, bottom) and is great for indoor scenes where rooms are usually cubical.

Creating a 'latlong' map:

Creating a 'cubical' map: