Wednesday 19 February 2014

The Simple RIB

this is our simple renderman RIB file with our simple shader. The shader will have procedural pattern plug into it to produce the appearance of our shader and the growth of the frost. all of this will be done through python.

Our RIB FILE
    
Display "" "framebuffer" "rgba"
Format 250 250 1
Projection "perspective" "fov" 40

 
Translate  0 0 3
Rotate -30 1 0 0
Rotate 0   0 1 0
Scale 1 1 -1

WorldBegin
    LightSource "pointlight" 1 "intensity" 30 "from" [2 2 2]
    TransformBegin
        Surface "FrostBase"
        AttributeBegin
       
               
        AttributeEnd
        Color 0.078 0.120 0.160
        Sphere 1 -1 1 360
    TransformEnd
WorldEnd




Our Base Shader

surface FrostBase(float Kd = 0.8,
                   frost = 0.5)
                  
{
normal  n = normalize(N),
        nf = faceforward(n, I);
float   hump = 0;
color   surfcolor = Cs;
 

color  diffusecolor = Kd * diffuse(nf);
Oi = Os;
Ci = Oi * surfcolor * diffusecolor;
}










No comments:

Post a Comment