Prev: A First Texture Next: Operator Modules

3. Value Modules

Most of the modules in the "Values" category have a single output port and no input ports. They output various quantities which are needed for creating procedures.

Number

This module outputs a fixed numeric value. Double-click the module to set the number.

Color

This module outputs a fixed color. Double-click the module to set the color.

X, Y, and Z

These modules output the X, Y, and Z coordinates respectively of the point for which the texture or material properties are being calculated. In 2D textures, Z is always equal to 0.

Time

This module outputs the time (in seconds from the beginning of the animation) at which the texture or material properties are being calculated. This allows you to create animated textures which change with time.

View Angle

This module (which is only available in Textures, not Materials) outputs the angle at which the surface is being viewed. You can use it to make textures whose appearance changes depending on what direction you look at them from.

More precisely, the module outputs the cosine of the angle between the viewing direction and the surface normal. This equals 1 when the viewing the front side of the surface head on, 0 when viewing it at a glancing angle, and -1 when viewing the back side head on. Alternatively, if you don't want to distinguish between the front and back sides of the surface, double-click the module and select the "Output Absolute Value" option. The output will then always be positive, whether you are looking at the front or back side.

Parameter

This module (which is only available in Textures, not Materials) represents a texture parameter. This is a quantity that varies in an arbitrary, user-defined way over the surface of an object. Double-click this module to set the name of the parameter, as well as its minimum, maximum, and default values. If you add a Parameter module to a procedural texture and then assign that texture to a vertex based object (such as a triangle mesh or spline mesh), you can use the "Texture Parameters..." command in the object editor to set the value of the parameter at each vertex of the mesh. This allows you to create textures whose properties vary in a precisely defined way over the surface of an object.

Comment

This module has no inputs or outputs. It is just a way to put a comment into the procedure, perhaps explaining how it works or describing what particular parameters do. It has no effect on the procedure.

Prev: A First Texture Next: Operator Modules