Shaders


Noise shaders

These shaders use the RenderMan noise function to vary the color and displacement of surfaces. These shaders are very flexible, with controls for scaling noise, color

The first shader, colornoise, applies surface color.

The second shader, displacenoise, displaces the surface.

Parameters used in colornoise.sl and displacenoise.sl

Parameter

Data Type

Usage

Example

noisetype

float

The type of noise function used

0 = t wrap
1 = s wrap
2 = s,t wrap
3 = x,y,z (object space)

noisetype = 3

offsetX, offsetY, offsetZ

float

The offset in the noise lattice

offsetX = 0

scaleX, scaleY, scaleZ

float

The scale in the noise lattice

scaleX = 1

scaleRed, scaleBlue, scaleGreen

float

The scale for color channels. (Note: for displacenoise.sl, the sum of scaleRed, scaleGreen and scaleBlue should equal three).

scaleRed = 1, scaleBlue = 1, scaleGreen = 1

Additional parameters used in colornoise.sl

Parameter

Data Type

Usage

Example

shadingType

 

integer 0 to 5

 

The shading method code

0 = constant
1 = constant
2 = plastic
3 = matte
4 = glow (use on sphere)
5 = halo (use on sphere)

 

shadingType = 0

 

Ks, Kd, Ka

float

The usual meanings

Ks = 1

roughness

float

Roughness value for plastic shading method

roughness = 0.1

attenuation

float

For glow and halo methods

attenuation = 2

specularcolor

color

For plastic shading method

specularcolor = (1, 1, 1)

Additional parameters used in displacenoise.sl

Parameter

Data Type

Usage

Example

Km

float

Maximum displacement

Km = 1

 

 

View the colornoise shader source

View the displacenoise shader source

Download the noise shader package for Presenter 3D

 


HOME

NEW

LINKS

GALLERY

ARTICLES

PLUG-INS

RENDERMAN

Switch to Frame View




Copyright © 1997 by WebNation
All trademarks are the property of their respective holders