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.

RiSolidBegin( RtToken operation )<br />

RiSolidEnd ()<br />

SolidBegin the definition of a solid. operation may be one of the following tokens:<br />

”primitive”, ”intersection”, ”union”, ”difference”. Intersection and union operations<br />

form the set intersection and union of the specified solids. Difference operations<br />

require at least 2 parameter solids and subtract the last n-1 solids from the first<br />

(where n is the number of parameter solids).<br />

When the innermost solid block is a ”primitive” block, no other RiSolidBegin calls<br />

are legal. When the innermost solid block uses any other operation, no geometric<br />

primitives are legal.<br />

RiSolidEnd terminates the definition of the solid.<br />

RIB BINDING<br />

SolidBegin operation<br />

SolidEnd -<br />

EXAMPLE<br />

SolidBegin ”union”<br />

SEE ALSO<br />

RiInterior, RiTrimCurve<br />

A single solid sphere can be created using<br />

SolidBegin ( ”primitive” );<br />

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

RiSolidEnd ();<br />

Note that if the same sphere is defined outside of a RiSolidBegin-RiSolidEnd block, it is<br />

not treated as a volume-containing solid. A solid hemisphere can be created with<br />

SolidBegin ( ”primitive” );<br />

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

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

RiSolidEnd ();<br />

(Note that the -360 causes the surface normal of the disk to point towards negative z.)<br />

A composite solid is one formed using spatial set operations. <strong>The</strong> allowed set operations<br />

are ”intersection”, ”union”, and ”difference”. A spatial set operation has n operands, each of<br />

which is either a primitive solid defined using SolidBegin (”primitive”)-RiSolidEnd, or a<br />

composite solid that is the result of another set operation. For example, a closed cylinder<br />

would be subtracted from a sphere as follows:<br />

93

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

Saved successfully!

Ooh no, something went wrong!