The RenderMan Interface - Paul Bourke
The RenderMan Interface - Paul Bourke
The RenderMan Interface - Paul Bourke
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Convert an image in a standard picture file representing a latitude-longitude map<br />
whose name is picturename into an environment map whose name is texturename.<br />
<strong>The</strong> storage format of the texture file and the precision of stored texture channels are<br />
implementation-dependent.<br />
This image has longitude equal to 0 degrees at the left, and 360 degrees at the right.<br />
<strong>The</strong> latitude at the bottom is -90 degrees and at the top is 90 degrees. <strong>The</strong> bottom<br />
of the picture is at the south pole and the top the north pole. <strong>The</strong> direction in space<br />
corresponding to each of the points on the image is given by:<br />
x = cos(longitude) · cos(latitude)<br />
y = sin(longitude) · cos(latitude)<br />
z = sin(latitude)<br />
Notice that latitude-longitude environment maps are sensitive to the handedness of<br />
the coordinate system in which they will be accessed. Environment maps which<br />
are intended to be accessed in a right-handed coordinate system will, if displayed,<br />
appear as a mirror image of those intended to be accessed in a left-handed coordinate<br />
system.<br />
RIB BINDING<br />
MakeLatLongEnvironment picturename texturename filter swidth twidth ...parameterlist...<br />
<strong>The</strong> filter parameter should be one of ”box”, ”triangle”, ”catmull-rom”, ”b-spline”, ”gaussian”<br />
and ”sinc”. <strong>The</strong>se correspond to the predefined filter functions described with<br />
RiPixelFilter.<br />
EXAMPLE<br />
MakeLatLongEnvironment ”long.pic” ”long.tx” ”catmull-rom” 3 3<br />
SEE ALSO<br />
RiMakeCubeFaceEnvironment, environment() in the Shading Language<br />
RiMakeCubeFaceEnvironment ( char *px, char *nx, char *py, char *ny, char *pz, char *nz,<br />
char *texturename, RtFloat fov, RtFilterFunc filterfunc,<br />
RtFloat swidth, RtFloat twidth, ...parameterlist...)<br />
Convert six images in standard picture files representing six viewing directions into<br />
an environment map whose name is texturename. <strong>The</strong> image pz (nz) is the image as<br />
viewed in the positive (negative) z direction. <strong>The</strong> remaining images are those viewed<br />
along the positive and negative x and y directions. <strong>The</strong> storage format of the texture<br />
file and the precision of stored texture channels are implementation-dependent.<br />
Each image is normally produced by a rendering program by placing the eye at the<br />
center of the environment (usually the origin) and generating a picture in each of the<br />
six directions. <strong>The</strong>se pictures are the projection of the environment onto a set of cube<br />
faces. Each face is usually assumed to be unit distance from the eye point. Cube face<br />
environment maps should be generated with the following orientations:<br />
101