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.

SolidBegin ( ”difference” );<br />

SolidBegin ( ”primitive” );<br />

RiSphere ( 1.0, -1.0, 1.0, 360.0, RI NULL);<br />

RiSolidEnd ();<br />

SolidBegin ( ”primitive” );<br />

RiDisk( 2.0, 0.5, 360.0, RI NULL);<br />

RiCylinder( 0.5, -2.0, 2.0, 360.0, RI NULL);<br />

RiDisk( -2.0, 0.5, -360.0, RI NULL);<br />

RiSolidEnd ();<br />

RiSolidEnd ();<br />

When performing a difference the sense of the orientation of the surfaces being subtracted<br />

is automatically reversed.<br />

Attributes may be changed freely inside solids. Each section of a solid’s surface can have<br />

a different surface shader and color. For consistency a single solid should have a single<br />

interior and exterior volume shader.<br />

If the Solid Modeling optional capability is not supported by a particular implementation, all<br />

primitives are rendered as a collection of surfaces, and the spatial set operators are ignored.<br />

5.10 Retained Geometry<br />

A single geometric primitive or a list of geometric primitives may be retained by enclosing<br />

them with RiObjectBegin and RiObjectEnd. <strong>The</strong> <strong>RenderMan</strong> <strong>Interface</strong> allocates and returns<br />

an RtObjectHandle for each retained object defined in this way. This handle can subsequently<br />

be used to reference the object when creating instances with RiObjectInstance.<br />

Objects are not rendered when they are defined within an RiObjectBegin-RiObjectEnd<br />

block; only an internal definition is created.<br />

Transformations, and even Motion blocks, may be used inside an Object block, though<br />

they obviously imply a relative transformation to the coordinate system active when the<br />

Object is instanced. All of an object’s attributes are inherited at the time it is instanced, not<br />

at the time at which it is created. So, for example, shader assignments or other attributes<br />

are not allowed within an Object block. <strong>The</strong> only exception is RiBasis, which may set the<br />

interpolation basis matrix used for RiPatch, RiPatchMesh, or RiCurves primitives that<br />

are within the Object block.<br />

RtObjectHandle<br />

RiObjectBegin ()<br />

RiObjectEnd ()<br />

RiObjectBegin starts the definition of an object and return a handle for later use with<br />

RiObjectInstance. If the handle returned is NULL, an object could not be created.<br />

RiObjectEnd ends the definition of the current object.<br />

RIB BINDING<br />

94

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

Saved successfully!

Ooh no, something went wrong!