The RenderMan Interface - Paul Bourke
The RenderMan Interface - Paul Bourke
The RenderMan Interface - Paul Bourke
- 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.
RiAttributeBegin ()<br />
RiAttributeEnd ()<br />
Push and pop the current set of attributes. Pushing attributes also pushes the current<br />
transformation. Pushing and popping of attributes must be properly nested with<br />
respect to various begin-end constructs.<br />
RIB BINDING<br />
AttributeBegin -<br />
AttributeEnd -<br />
EXAMPLE<br />
RiAttributeBegin ();<br />
SEE ALSO<br />
RiFrameBegin, RiTransformBegin, RiWorldBegin<br />
<strong>The</strong> process of shading is described is detail in Part II: <strong>The</strong> <strong>RenderMan</strong> Shading Language.<br />
<strong>The</strong> complete list of attributes related to shading are in Table 4.6, Shading Attributes.<br />
<strong>The</strong> graphics state maintains a list of attributes related to shading. Associated with the<br />
shading state are a current color and a current opacity. <strong>The</strong> graphics state also contains a current<br />
surface shader, a current atmosphere shader, a current interior volume shader, and a current<br />
exterior volume shader.<br />
All geometric primitives use the current surface shader for computing the color (shading) of<br />
their surfaces and the current atmosphere shader for computing the attenuation of light towards<br />
the viewer. Primitives may also attach the current interior and exterior volume shaders<br />
to their interior and exterior, which is used to alter the colors of rays spawned by trace()<br />
calls in the shaders bound to the primitives (in a renderer that supports this optional feature).<br />
<strong>The</strong> graphics state also contains a current list of light sources that are used to illuminate<br />
the geometric primitive. Finally, there is a current area light source. Geometric primitives can<br />
be added to a list of primitives defining this light source.<br />
4.2.1 Color and opacity<br />
All geometric primitives inherit the current color and opacity from the graphics state, unless<br />
color or opacity are defined as part of the primitive. Colors are passed in arrays that are<br />
assumed to contain the number of color samples being used (see the section on Additional<br />
options).<br />
RiColor ( RtColor color )<br />
Set the current color to color. Normally there are three components in the color (red,<br />
green, and blue), but this may be changed with the colorsamples request.<br />
38