26.01.2015 Views

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Image Forward Axis Up Axis Right Axis<br />

px +X +Y -Z<br />

nx -X +Y +Z<br />

px +Y -Z +X<br />

nx -Y +Z +X<br />

px +Z +Y +X<br />

nx -Z +Y -X<br />

Notice that cube face environment maps are sensitive to the handedness of the coordinate<br />

system in which they will be accessed. Environment maps which are intended<br />

to be accessed in a right-handed coordinate system will, if displayed, appear as a<br />

mirror image of those intended to be accessed in a left-handed coordinate system.<br />

<strong>The</strong> fov is the full horizontal field of view used to generate these images. A value<br />

of 90 degrees will cause the cube face edges to meet exactly. Using a slightly larger<br />

value will cause the cube faces to intersect. Having a slight overlap helps remove<br />

artifacts along the seams where the different pictures are joined.<br />

RIB BINDING<br />

MakeCubeFaceEnvironment px nx py ny pz nz texturename fov filter swidth twidth<br />

...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 />

RiMakeCubeFaceEnvironment(”foo.x”, ”foo.nx”, ”foo.y”, ”foo.ny”,<br />

”foo.z”, ”foo.nz”, ”foo.env”, 95.0,<br />

RiTriangleFilter, 2.0, 2.0, RI NULL);<br />

SEE ALSO<br />

RiMakeLatLongEnvironment, environment() in the Shading Language<br />

7.1.3 Making shadow maps<br />

Shadow maps are depth buffer images from a particular view. <strong>The</strong>y are generally used in<br />

light source shaders to cast shadows onto objects. A shadow map is accessed by point in<br />

the camera coordinate system corresponding to that view. This point must be computed<br />

in the shader. A shadow map texture can be accessed using the shadow function of the<br />

Shading Language. <strong>The</strong> shadow function requires the name of a texture file containing the<br />

texture.<br />

RiMakeShadow ( char *picturename, char *texturename, ...parameterlist...)<br />

102

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!