Pumpkin Tea

This project was created using Pixar’s RenderMan and customized .rib files.

 
 

REFERENCE/INSPIRATION

Inspiration for teapot appearance.

(Image found on Internet)

 
 

FINAL THOUGHTS

The external .rib files (listed below) are normally generated automatically by applications such as Houdini and Maya. However, writing .rib files with a text editor focuses attention on the way that elements such as geometry, shading, lighting and, coordinate systems are presented to Pixar's RIB rendering system, and provides the user with more control.

 

RIB FILES

Main RIB

    Option "ribparse" "string varsubst" ["$"]
IfBegin "!defined(RMSTREE)"
    Option "user" "string RMSTREE" ["/opt/pixar/RenderManForMaya-21.6-maya2018"]
IfEnd
Option "searchpath" "shader"    ["../../maya/projects/RfM_osl:@"]
Option "searchpath" "rixplugin" ["${RMSTREE}/lib/shaders:../../maya/projects/RfM_ris:@"]
Option "searchpath" "texture"   ["../textures:@"]
Option "searchpath" "archive"   ["../archives:Cutter_Help/templates/Rib:custom_templates/Rib"]
#Option "statistics" "endofframe" [1]
  
Hider "raytrace" "int incremental" [1] "int minsamples" [0] "int maxsamples" [128] "float darkfalloff" [0.025]
Integrator "PxrPathTracer" "PxrPathTracer" "int maxPathLength" [10] "int allowCaustics" [0]
  
  
PixelVariance 0.05
#===============================================================
Format 640 360 1
Display "untitled" "it" "rgba"
Projection "perspective" "fov" [20]
  
Translate  1.5 -1 11
Rotate -17 1 0 0
Rotate  1497 0 1 0
Scale 1 1 -1
#DisplayFilter "PxrBackgroundDisplayFilter" "background" "color backgroundColor" [1 1 1]
#===============================================================
WorldBegin
    Bxdf "PxrSurface" "default"
        "color diffuseColor" [0.6 0.6 0.6]
        "float diffuseGain" [1.0]
        "int diffuseDoubleSided" [1]
  
    TransformBegin
        Scale 4 4 4
        ReadArchive "cutrAxes.rib"
    TransformEnd
#================================================
    AttributeBegin
        Rotate  25  0 1 0 # orbital
        Rotate -46 1 0 0 # elevation
        Translate 0 0 9  # distance
        Scale 2 2 -1
  
        Attribute "visibility" "int indirect" [0] "int transmission" [0]
        Attribute "visibility" "int camera" [0]
        Light "PxrRectLight" "PxrRectLightShape1"
                "float exposure" [4.5]
                "color lightColor" [1 0.986 0.937]
                "float coneAngle" [90]
                "int enableShadows" [1]
                "color shadowColor" [0 0 0]
    AttributeEnd
  
    AttributeBegin
        Rotate  -45  0 1 0 # orbital
        Rotate 135.202 1 0 0 # elevation
        Translate 0 0 9  # distance
        Scale 2 2 -1
  
        Attribute "visibility" "int indirect" [0] "int transmission" [0]
        Attribute "visibility" "int camera" [0]
        Light "PxrRectLight" "PxrRectLightShape2"
                "float exposure" [1.5]
                "color lightColor" [0.922 0.993 1]
                "float coneAngle" [90]
                "int enableShadows" [0]
                "color shadowColor" [0 0 0]
    AttributeEnd
  
#======================================
    AttributeBegin
        Attribute "identifier" "string name" ["teapot_body"]
        ReadArchive "materials/teapot_body_color.rib"
        ReadArchive "geo/teapot_body.rib"
    AttributeEnd
    AttributeBegin
        Attribute "identifier" "string name" ["teapot_spout"]
        ReadArchive "materials/spout_color.rib"
        ReadArchive "materials/spout_displacement.rib"
        ReadArchive "geo/teapot_spout.rib"
    AttributeEnd
    AttributeBegin
        Attribute "identifier" "string name" ["teapot_stem"]
        ReadArchive "materials/stem_color.rib"
        ReadArchive "geo/teapot_stem.rib"
    AttributeEnd
    AttributeBegin
        Attribute "identifier" "string name" ["teapot_leaf"]
        ReadArchive "materials/leaf_color.rib"
        ReadArchive "geo/teapot_leaf.rib"
    AttributeEnd
    AttributeBegin
        Attribute "identifier" "string name" ["teapot_handle"]
        ReadArchive "materials/handle_color.rib"
        ReadArchive "materials/handle_displacement.rib"
        ReadArchive "geo/teapot_handle.rib"
    AttributeEnd
    AttributeBegin
        Translate -0.649 0 3.457
        Rotate 0 205.812 0
        Attribute "identifier" "string name" ["cup1"]
        ReadArchive "materials/cup_color.rib"
        ReadArchive "geo/cup.rib"
    AttributeEnd
    AttributeBegin
        Attribute "identifier" "string name" ["cup_handle1"]
        ReadArchive "materials/handle_color.rib"
        ReadArchive "materials/handle_displacement.rib"
        ReadArchive "geo/cup_handle1.rib"
    AttributeEnd
    AttributeEnd
        AttributeBegin
        Translate -3.16 0 2.097
        Rotate 0 120.023 0
        Attribute "identifier" "string name" ["cup2"]
        ReadArchive "materials/cup_color.rib"
        ReadArchive "geo/cup.rib"
    AttributeEnd
    AttributeBegin
        Attribute "identifier" "string name" ["cup_handle2"]
        ReadArchive "materials/handle_color.rib"
        ReadArchive "materials/handle_displacement.rib"
        ReadArchive "geo/cup_handle2.rib"
    AttributeEnd
    AttributeBegin
        Attribute "identifier" "string name" ["table"]
        ReadArchive "materials/table_color.rib"
        ReadArchive "geo/table.rib"
    AttributeEnd
    AttributeBegin
        Attribute "identifier" "string name" ["table_runner"]
        ReadArchive "materials/table_runner_color.rib"
        ReadArchive "geo/table_runner.rib"
    AttributeEnd
    AttributeBegin
        Attribute "identifier" "string name" ["background"]
        ReadArchive "materials/background_color.rib"
        ReadArchive "geo/background.rib"
    AttributeEnd
WorldEnd
 

Teapot Body texture RIB

    Pattern "PxrManifold2D" "PxrManifold2D1"
        "float angle" [0]
        "float scaleS" [1]
        "float scaleT" [1]
        "float offsetS" [0]
        "float offsetT" [0]
        "int invertT" [1]
  
        # "PxrManifold2D1:result"
  
Pattern "PxrTexture" "PxrTexture1"
        "string filename" ["body_color.tex"]
        "int firstChannel" [0]
        "int atlasStyle" [0]
        "int invertT" [1]
        "int filter" [0]
        "color missingColor" [1. 0. 1.]
        "float missingAlpha" [1.0]
        "int linearize" [1]
        # Example manifold connection
        "reference struct manifold" ["PxrManifold2D1:result"]
        # "PxrTexture1:resultRGB"
  
Bxdf "PxrSurface" "PxrSurface1"
        "float diffuseGain" [1.0]
        "reference color diffuseColor" ["PxrTexture1:resultRGB"]
        "int diffuseDoubleSided" [1]
        "color specularFaceColor" [0.2 0.2 0.2]
        "float specularRoughness" [0.0]
        "int specularDoubleSided" [0]
        "float presence" [1]
 

Cup Body Texture RIB

    Pattern "PxrManifold2D" "PxrManifold2D1"
        "float angle" [0]
        "float scaleS" [1]
        "float scaleT" [1]
        "float offsetS" [0]
        "float offsetT" [0]
        "int invertT" [1]
  
        # "PxrManifold2D1:result"
  
Pattern "PxrTexture" "PxrTexture1"
        "string filename" ["cup_color.tex"]
        "int firstChannel" [0]
        "int atlasStyle" [0]
        "int invertT" [1]
        "int filter" [0]
        "color missingColor" [1. 0. 1.]
        "float missingAlpha" [1.0]
        "int linearize" [1]
        # Example manifold connection
        "reference struct manifold" ["PxrManifold2D1:result"]
        # "PxrTexture1:resultRGB"
  
Bxdf "PxrSurface" "PxrSurface1"
        "float diffuseGain" [1.0]
        "reference color diffuseColor" ["PxrTexture1:resultRGB"]
        "int diffuseDoubleSided" [1]
        "color specularFaceColor" [0.2 0.2 0.2]
        "float specularRoughness" [0.0]
        "int specularDoubleSided" [0]
        "float presence" [1]
 

Handle Texture RIB

    Pattern "PxrManifold2D" "PxrManifold2D1"
        "float angle" [0]
        "float scaleS" [1]
        "float scaleT" [1]
        "float offsetS" [0]
        "float offsetT" [0]
        "int invertT" [1]
  
        # "PxrManifold2D1:result"
  
Pattern "PxrTexture" "PxrTexture1"
        "string filename" ["handle_color.tex"]
        "int firstChannel" [0]
        "int atlasStyle" [0]
        "int invertT" [1]
        "int filter" [0]
        "color missingColor" [1. 0. 1.]
        "float missingAlpha" [1.0]
        "int linearize" [1]
        # Example manifold connection
        "reference struct manifold" ["PxrManifold2D1:result"]
        # "PxrTexture1:resultRGB"
  
Bxdf "PxrSurface" "PxrSurface1"
        "float diffuseGain" [1.0]
        "reference color diffuseColor" ["PxrTexture1:resultRGB"]
        "int diffuseDoubleSided" [1]
        "color specularFaceColor" [0.2 0.2 0.2]
        "float specularRoughness" [0.0]
        "int specularDoubleSided" [0]
        "float presence" [1]
 

Handle Displacement RIB

Pattern "PxrManifold2D" "PxrManifold2D1"
        "float angle" [0]
        "float scaleS" [1]
        "float scaleT" [1]
        "float offsetS" [0]
        "float offsetT" [0]
        "int invertT" [1]
        # "PxrManifold2D2:result"    uses->|struct|manifold| 
  
Pattern "PxrTexture" "PxrTexture1"
        "string filename" ["handle_displacement.tex"]
        "reference struct manifold" ["PxrManifold2D1:result"]
        # "PxrTexture1:resultRGB"    uses->|color|vector|normal|point| 
  
# Remapping the output to -0.5 to 0.5 ensures the displacement 
# remains "centered" around the original surface position.
Pattern "PxrRemap" "PxrRemap1"
        "reference color inputRGB" ["PxrTexture1:resultRGB"]
        "float inputMin" [0.0]
        "float inputMax" [1.0]
        "float outputMin" [-0.5]
        "float outputMax" [ 0.5]
        "int clampOutput" [0]
        # "PxrRemap1:resultRGB"    uses->|color|vector|normal|point| 
        
# Generally we use "mode" 3 or 4
Pattern "PxrToFloat" "PxrToFloat1"
        "reference color input" ["PxrRemap1:resultRGB"]
        "int mode" [4] # r, g, b, luminance or average
        # "PxrToFloat1:resultF"    uses->|float| 
        
Attribute "trace" "int displacements" [1]
Attribute "displacementbound" "string coordinatesystem" ["shader"] "float sphere" [0.2]
Displace "PxrDisplace" "PxrDisplace1"
        "int enabled" [1]
        "float dispAmount" [0.1]
        "reference float dispScalar" ["PxrToFloat1:resultF"]
 

Spout Texture RIB

    Pattern "PxrManifold2D" "PxrManifold2D1"
        "float angle" [0]
        "float scaleS" [1]
        "float scaleT" [1]
        "float offsetS" [0]
        "float offsetT" [0]
        "int invertT" [1]
  
        # "PxrManifold2D1:result"
  
Pattern "PxrTexture" "PxrTexture1"
        "string filename" ["spout_color.tex"]
        "int firstChannel" [0]
        "int atlasStyle" [0]
        "int invertT" [1]
        "int filter" [0]
        "color missingColor" [1. 0. 1.]
        "float missingAlpha" [1.0]
        "int linearize" [1]
        # Example manifold connection
        "reference struct manifold" ["PxrManifold2D1:result"]
        # "PxrTexture1:resultRGB"
  
Bxdf "PxrSurface" "PxrSurface1"
        "float diffuseGain" [1.0]
        "reference color diffuseColor" ["PxrTexture1:resultRGB"]
        "int diffuseDoubleSided" [1]
        "color specularFaceColor" [0.2 0.2 0.2]
        "float specularRoughness" [0.0]
        "int specularDoubleSided" [0]
        "float presence" [1]
 

Spout Displacement RIB

Pattern "PxrManifold2D" "PxrManifold2D1"
        "float angle" [0]
        "float scaleS" [1]
        "float scaleT" [1]
        "float offsetS" [0]
        "float offsetT" [0]
        "int invertT" [1]
        # "PxrManifold2D2:result"    uses->|struct|manifold| 
  
Pattern "PxrTexture" "PxrTexture1"
        "string filename" ["spout_displacement.tex"]
        "reference struct manifold" ["PxrManifold2D1:result"]
        # "PxrTexture1:resultRGB"    uses->|color|vector|normal|point| 
  
# Remapping the output to -0.5 to 0.5 ensures the displacement 
# remains "centered" around the original surface position.
Pattern "PxrRemap" "PxrRemap1"
        "reference color inputRGB" ["PxrTexture1:resultRGB"]
        "float inputMin" [0.0]
        "float inputMax" [1.0]
        "float outputMin" [-0.5]
        "float outputMax" [ 0.5]
        "int clampOutput" [0]
        # "PxrRemap1:resultRGB"    uses->|color|vector|normal|point| 
        
# Generally we use "mode" 3 or 4
Pattern "PxrToFloat" "PxrToFloat1"
        "reference color input" ["PxrRemap1:resultRGB"]
        "int mode" [4] # r, g, b, luminance or average
        # "PxrToFloat1:resultF"    uses->|float| 
        
Attribute "trace" "int displacements" [1]
Attribute "displacementbound" "string coordinatesystem" ["shader"] "float sphere" [0.2]
Displace "PxrDisplace" "PxrDisplace1"
        "int enabled" [1]
        "float dispAmount" [0.1]
        "reference float dispScalar" ["PxrToFloat1:resultF"]
 

Stem Texture RIB

    Pattern "PxrManifold2D" "PxrManifold2D1"
        "float angle" [0]
        "float scaleS" [1]
        "float scaleT" [1]
        "float offsetS" [0]
        "float offsetT" [0]
        "int invertT" [1]
  
        # "PxrManifold2D1:result"
  
Pattern "PxrTexture" "PxrTexture1"
        "string filename" ["stem_color.tex"]
        "int firstChannel" [0]
        "int atlasStyle" [0]
        "int invertT" [1]
        "int filter" [0]
        "color missingColor" [1. 0. 1.]
        "float missingAlpha" [1.0]
        "int linearize" [1]
        # Example manifold connection
        "reference struct manifold" ["PxrManifold2D1:result"]
        # "PxrTexture1:resultRGB"
  
Bxdf "PxrSurface" "PxrSurface1"
        "float diffuseGain" [1.0]
        "reference color diffuseColor" ["PxrTexture1:resultRGB"]
        "int diffuseDoubleSided" [1]
        "color specularFaceColor" [0.2 0.2 0.2]
        "float specularRoughness" [0.0]
        "int specularDoubleSided" [0]
        "float presence" [1]
 

Leaf Texture RIB

    Pattern "PxrManifold2D" "PxrManifold2D1"
        "float angle" [0]
        "float scaleS" [1]
        "float scaleT" [1]
        "float offsetS" [0]
        "float offsetT" [0]
        "int invertT" [1]
  
        # "PxrManifold2D1:result"
  
Pattern "PxrTexture" "PxrTexture1"
        "string filename" ["leaf_color.tex"]
        "int firstChannel" [0]
        "int atlasStyle" [0]
        "int invertT" [1]
        "int filter" [0]
        "color missingColor" [1. 0. 1.]
        "float missingAlpha" [1.0]
        "int linearize" [1]
        # Example manifold connection
        "reference struct manifold" ["PxrManifold2D1:result"]
        # "PxrTexture1:resultRGB"
  
Bxdf "PxrSurface" "PxrSurface1"
        "float diffuseGain" [1.0]
        "reference color diffuseColor" ["PxrTexture1:resultRGB"]
        "int diffuseDoubleSided" [1]
        "color specularFaceColor" [0.2 0.2 0.2]
        "float specularRoughness" [0.0]
        "int specularDoubleSided" [0]
        "float presence" [1]
 

Table Runner Texture and Displacement RIB

    Pattern "PxrManifold2D" "PxrManifold2D1"
        "float angle" [0]
        "float scaleS" [1]
        "float scaleT" [1]
        "float offsetS" [0]
        "float offsetT" [0]
        "int invertT" [1]
  
        # "PxrManifold2D1:result"
  
Pattern "PxrTexture" "PxrTexture1"
        "string filename" ["table_runner_color.tex"]
        "int firstChannel" [0]
        "int atlasStyle" [0]
        "int invertT" [1]
        "int filter" [0]
        "color missingColor" [1. 0. 1.]
        "float missingAlpha" [1.0]
        "int linearize" [1]
        # Example manifold connection
        "reference struct manifold" ["PxrManifold2D1:result"]
        # "PxrTexture1:resultRGB"
  
Bxdf "PxrSurface" "PxrSurface1"
        "float diffuseGain" [1.0]
        "reference color diffuseColor" ["PxrTexture1:resultRGB"]
        "int diffuseDoubleSided" [1]
  
Pattern "PxrMayaCloth" "PxrMayaCloth1"
        "color gapColor" [0. 0. 0.]
        "color uColor" [1. 1. 1.]
        "color vColor" [.5 .5 .5]
        "float uWidth" [.95]
        "float vWidth" [.95]
        "float uWave" [1]
        "float vWave" [1]
        "float randomness" [0.]
        "float widthSpread" [0.]
        "float brightSpread" [0.]
        "float invert" [0]
        "float alphaIsLuminance" [0]
        "color defaultColor" [.5 .5 .5]
        "color colorGain" [1. 1. 1.]
        "color colorOffset" [0. 0. 0.]
        "float alphaGain" [1]
        "float alphaOffset" [0]
        "float filter" [0]
        "float filterOffset" [0]
        # Examples manifold connection
        #"reference struct manifold" ["PxrManifold2D1:result"]
        #"reference struct manifold" ["PxrManifold3D1:result"]
  
        # "PxrMayaCloth1:outColor"    uses->|color|vector|normal|point|pattern| 
        # "PxrMayaCloth1:outAlpha"    uses->|float|pattern| 
 

Table Texture RIB

Hello, World!

    Pattern "PxrManifold2D" "PxrManifold2D1"
        "float angle" [0]
        "float scaleS" [1]
        "float scaleT" [1]
        "float offsetS" [0]
        "float offsetT" [0]
        "int invertT" [1]
  
        # "PxrManifold2D1:result"
  
Pattern "PxrTexture" "PxrTexture1"
        "string filename" ["table.tex"]
        "int firstChannel" [0]
        "int atlasStyle" [0]
        "int invertT" [1]
        "int filter" [0]
        "color missingColor" [1. 0. 1.]
        "float missingAlpha" [1.0]
        "int linearize" [1]
        # Example manifold connection
        "reference struct manifold" ["PxrManifold2D1:result"]
        # "PxrTexture1:resultRGB"
  
Bxdf "PxrSurface" "PxrSurface1"
        "float diffuseGain" [1.0]
        "reference color diffuseColor" ["PxrTexture1:resultRGB"]
        "int diffuseDoubleSided" [1]