Making A Coordinate Viewer

To Create Accurate Renders and Projections from MTOR Coordinate Systems.


 Introduction - Creating a Coordinate Viewer


The usefulness of a Coordinate Viewer is explained in the example, "Projecting Textures with magicLights."

In this example, the objective is to create a Coordinate Viewer. Using the viewer it is possible to accurately render an image of a surface, and then project that image back onto the surface with a magicLight shader (usually after painting detail into the image with a paint program).


1 - Create a Mtor Coordinate System


Create a Mtor Coordinate System and a direct light. Turn off the light.

(For more info about using coordinate systems refer to MTOR Coordinate Systems under the Shader Concepts section.)


Notice that the blue direction vector of the coordinate system and the directional light point in different directions.


2 - Position the Coordinate System


Move the Coordinate System directly in front of the direct light arrows, and then rotate it 180 on the Y-axis, so that the coordinate systems Z-axis is pointing in the same direction as the light.

The directional arrows and blue direction vector must point the same way. 

 
 

This forward placement will allow one to see the coordinate system while looking through the light. This will make scaling the coordinate system easier later.


3 - Parent the Coordinate System


Parent the Coordinate System under the direct light, and enable "show shapes" in the outliner or hypergraph.


The mtorCoordSysShape node is important. It will be used to render the image and project an image back. Its name has been changed from "mtorCoordSysShape" to "view" since it's a little easier to type into magicLights and the Render Globals.


4 - Look Through the Light


Select the direct light (which is  "directionalLight1" in this case). Now look through the direct light, by selecting "Look Through Selected" in the "Panels" menu. 

   The direct light defaults, happily, to an orthographic camera and allows tumbling for easier positioning. If positioning  gets difficult when tumbling, try moving the light group from another window. 
   (Hint: Try selecting the target  object and pressing "f" to get the direct light to point at the object.) 
   The coordinate system (green square) frames what will be rendered. Select it and scale it to fit the target selection.


5 - Summary


This is a good way to make a viewer to position coordinate systems accurately, from any angle. In this example, the direct light is used for interactive viewing, to position the coordinate system into place. The coordinate system is then used to create the image and project it back onto the object.

The shape node of the coordinate system can be used as a camera, capturing whatever the coordinate system frames as seen from the directional light (as seen in Step #4), at any specified resolution. See Creating Images for Projection for a detailed outline of that process.


 

Pixar Animation Studios
(510) 752-3000 (voice)   (510) 752-3151 (fax)
Copyright © 1996- Pixar. All rights reserved.
RenderMan® is a registered trademark of Pixar.