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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

channels (usually an RGB color) can be accessed using the texture function of the Shading<br />

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

RiMakeTexture ( char *picturename, char *texturename, RtToken swrap, RtToken twrap,<br />

RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth, ...parameterlist...)<br />

Convert an image in a standard picture file whose name is picturename into a texture<br />

file whose name is texturename. All channels of the picture file will be converted (in<br />

order) to texture channels. <strong>The</strong> storage format of the texture file and the precision of<br />

stored texture channels are implementation-dependent.<br />

<strong>The</strong> picture file used as input is not changed or otherwise affected by RiMakeTexture.<br />

RIB BINDING<br />

MakeTexture picturename texturename swrap twrap 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 in<br />

RiPixelFilter.<br />

EXAMPLE<br />

RiMakeTexture(”globe.pic”, ”globe.tx”, ”periodic”, ”clamp”,<br />

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

SEE ALSO<br />

RiTextureCoordinates, texture() in the Shading Language<br />

7.1.2 Making environment maps<br />

Environment maps are images representing the color of an environment in a particular<br />

direction. An environment map is accessed using a direction vector; this vector is often<br />

the direction of a mirror reflection and hence environment maps are often referred to as<br />

reflection maps. However, any direction can be computed by a user-defined shader. An<br />

environment map image consists of one or more channels. A single channel or a group of<br />

n channels (usually an RGB color) can be accessed using the environment function in the<br />

Shading Language. Environment maps can be input in two formats. <strong>The</strong> first is as a single<br />

latitude-longitude image. Environment maps in this form are fairly easy to create using a<br />

paint system. <strong>The</strong> second format is a set of six cube face projections. Environment maps in<br />

this form are naturally created by the rendering program.<br />

RiMakeLatLongEnvironment ( char *picturename, char *texturename,<br />

RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth, ...parameterlist...)<br />

100

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

Saved successfully!

Ooh no, something went wrong!