Attributes and Rendering
Setting Attributes
The following functions are used to set, get, and remove attributes on
objects in c_shape_edit. Attributes are general values (integer, real,
strings, objects, etc.).
setAttr( Object, AttrName, Value )
-
Returns
-
<none>
-
Object
-
<any> Object to set attribute on.
-
AttrName
-
<string> Attribute name.
-
Value
-
<any> Attribute value.
setSharedAttr( Object, AttrName, Value )
-
Returns
-
<none>
-
Object
-
<any> Object to set attribute on.
-
AttrName
-
<string> Attribute name.
-
Value
-
<any> Attribute value.
string_attr( Value )
-
Returns
-
<string_attr_obj>
-
Value
-
<any> Attribute value (a string).
total_copy_obj( Object )
-
Returns
-
<Object>
-
<any> A Geometry Object.
getAttr( Object, AttrName )
-
Returns
-
<any> Attribute value.
-
Object
-
<any> Object to get attribute from.
-
AttrName
-
<string> Attribute name.
remAttr( Object, AttrName )
-
Returns
-
<none>
-
Object
-
<any> Object to remove attribute from.
-
AttrName
-
<string> Name of attribute to remove.
SetColor is a convenience function for setting the "color" attribute.
See Predefined Colors for a
list of predefined color names.
setColor( Object, Color )
-
Returns
-
<none>
-
Object
-
<any> Object to set attribute on.
-
Color
-
<color | string > Color object or color name (string).
SetSq is a convenience function for setting the "surface_quality"
attribute. See Predefined Surface
Qualities for a list of predefined surface quality names.
setSq( Object, Sq )
-
Returns
-
<none>
-
Object
-
<any> Object to set attribute on.
-
Sq
-
<surfaceQuality | string> Surface quality object or surface quality name (string).
SetTexture is a convenience function for setting the "texture"
attribute. See Available Texture Files
for a list of available texture file names.
setTexture( Object, Texture )
-
Returns
-
<none>
-
Object
-
<any> Object to set attribute on.
-
Texture
-
<filename> Texture file name (string).
Rendering Objects
color( Red, Green, Blue )
-
Returns
-
<color> A color object.
-
Red
-
<number:0-255> Red component.
-
Green
-
<number:0-255> Green component.
-
Blue
-
<number:0-255> Blue component.
lightSource( Location, Intensity, Radius
)
-
Returns
-
<lightSource> An object representing a light source.
-
Location
-
<point> The location of the light source in space.
-
Intensity
-
<number:0-1> The intensity of the light source.
-
Radius
-
<number> Radius of the light source. This is currently used only by
the ray tracer program and has no bearing on the render program.
In ray, this is used for creating penumbras. If the penumbras are
too wide, then ray will find the shading to be different for each
pixel. This causes the thresher to super-sample each pixel, and the image
will run extremely slowly.
surfaceQuality( RIndex, Specular, Diffuse,
Transmit, Reflect, GExp, GDiff )
-
Returns
-
<surfaceQuality> Create an object with the given parameters.
-
RIndex
-
<number> Index of refraction.
-
Specular
-
<number:0-1> Specular reflection component for Phong shading model.
-
Diffuse
-
<number:0-1> Diffuse reflection component for Phong shading model.
-
Transmit
-
<number:0-1> Light passing through the object (the refraction component).
-
Reflect
-
<number:0-1> Light reflecting off the object (reflection component).
-
GExp
-
<number> Glossy exponent. For Phong shading model, this specifies the
specular exponent.
-
GDiff
-
<number> Glossy diffusion. The amount reflections are to be spread out.
Produces effects like brushed metal or frosted glass. For a unit length
reflection or refraction ray, it sets the radius which the end of the ray
may be perturbed by. The numbers are typically small -- less than 0.1.
C_Shape_Edit User's Manual Home Page
Alpha_1 User's Manual.
Copyright © 1998, University of Utah
a1-web@gr.cs.utah.edu