Teapot RIB Wrangling











Project Overview

RIB wrangling was a new concept that involved creating a .rib file from scratch and using the .rib as a basis for the world, the models/lights/materials within it and as the foundation for the model of the teapot created.

The model created was developed based on a reference but the difference between this type of modeling and what I'm generally used to is the lack of orthographics. Since the entire model is coded you are getting your results as it renders rather than instantly in a front, side, back, top and perspective views. You orient your camera as needed inside of your world .rib file and rerender a scene to adjust the models from different angles.




Reference Photo



Coding the model took some serious orientation as it was less fluid and many times I had to reinput commands to get the required movement of geometry. You'll see this in the video of the modeling process.



#base AttributeBegin TransformBegin ReadArchive "materials/circledisplacement.rib" Attribute "identifier" "name" ["base_bottom"] Translate 0 1.74 0 Scale 2.2 1.4 2.2 Rotate 90 1 0 0 Sphere 1 -.64 1 360 TransformEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["base_middletop"] Translate 0 3.2 0 Scale 1.2 .6 1.3 Rotate 90 1 0 0 Hyperboloid 1 -.3 -.9 1 1 1 360 TransformEnd AttributeEnd AttributeBegin #paraboloid2 TransformBegin Attribute "identifier" "name" ["base_toptransition"] Translate 0 3.2 0 Scale 1.1 .6 1.1 Rotate -90 1 0 0 Paraboloid 1.4 .9 1.3 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["base_below_top_rim"] Translate 0 3.975 0 Scale 1.5 .2 1.5 Rotate -90 1 0 0 Cylinder 1 0 1 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["base_below_top_rim_barrier"] Translate 0 4.18 0 Scale 1.6 .2 1.6 Rotate -90 1 0 0 Disk 0 1 360 TransformEnd AttributeEnd #lid AttributeBegin TransformBegin Attribute "identifier" "name" ["lid_bottom"] Translate 0 4.2 0 Scale 1.6 .14 1.6 Rotate -90 1 0 0 Cylinder 1 0 1 360 TransformEnd AttributeEnd AttributeBegin #paraboloid2 TransformBegin Attribute "identifier" "name" ["lid_transition1"] Translate 0 4.75 0 Scale 1 .2 1 Rotate 90 1 0 0 Paraboloid 1.6 1.7 2 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["lid_1"] Translate 0 4.4 0 Scale 1 .45 1 Rotate 90 1 0 0 Torus .85 0.6 0 -55 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["lid_1_transition"] Translate 0 4.6 0 Scale 1 .35 1 Rotate 90 1 0 0 Torus 1 0.2 0 -55 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["lid_2"] Translate 0 4.65 0 Scale .75 .3 .75 Rotate 90 1 0 0 Torus .85 0.6 0 -55 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["lid_2_transition"] Translate 0 4.75 0 Scale .75 .35 .75 Rotate 90 1 0 0 Torus 1 0.2 0 -55 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["lid_3"] Translate 0 5.5 0 Scale 1.05 .45 1.05 Rotate 90 1 0 0 Paraboloid .8 .7 1.5 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["lid_3_transition"] Translate 0 5.18 0 Scale .31 .2 .31 Rotate 90 1 0 0 Torus 1 0.8 0 -50 360 TransformEnd AttributeEnd AttributeBegin TransformBegin #ReverseOrientation Attribute "identifier" "name" ["lid_rim_barrier"] Translate 0 5.31 0 Scale 1 .2 1 Rotate -90 1 0 0 Disk 0 .5 360 TransformEnd AttributeEnd #topper AttributeBegin TransformBegin Attribute "identifier" "name" ["topper_base"] Translate 0 5.3 0 Scale .3 .3 .3 Rotate 90 1 0 0 Torus .15 0.5 0 -60 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["topper_cylinder"] Translate 0 5.7 0 Scale .3 .3 .3 Rotate 90 1 0 0 Cylinder .5 0 1 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["topper_middle1"] Translate 0 5.6 0 Scale 1.05 .13 1.05 Rotate -90 1 0 0 Paraboloid .3 .2 1 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["topper_middle2"] Translate 0 5.72 0 Scale 1.6 .14 1.6 Rotate -90 1 0 0 Cylinder .2 0 .3 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["topper_barrier"] Translate 0 5.77 0 Scale 1 .2 1 Rotate -90 1 0 0 Disk 0 .34 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["topper_top1"] Translate 0 5.79 0 Scale 1 .9 1 Rotate 90 1 0 0 Torus .2 0.08 0 -55 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["topper_top2"] Translate 0 5.85 0 Scale .8 .8 .8 Rotate 90 1 0 0 Torus .2 0.08 0 -55 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["topper_top3"] Translate 0 5.91 0 Scale .6 .7 .6 Rotate 90 1 0 0 Torus .2 0.08 0 -55 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["topper_top4"] Translate 0 5.96 0 Scale .4 .6 .4 Rotate 90 1 0 0 Torus .2 0.08 0 -55 360 TransformEnd AttributeEnd #spout AttributeBegin TransformBegin Attribute "identifier" "name" ["spout_1"] Rotate -10 0 0 1 Translate .2 1.3 0 Scale 2.1 2.3 .3 Attribute "dice" "int roundcurve" [1] Basis "catmull-rom" 1 "catmull-rom" 1 Curves "cubic" [4] "nonperiodic" "P" [ 2 2 0 1 1.5 0 .7 .26 0 -4 1 0 ] "width" [0.1 .7] TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["spout_top"] Scale 1 .7 .8 Translate 3.1 6.13 0 Rotate -30 0 0 1 Rotate 90 1 0 0 Torus .3 0.003 0 360 360 TransformEnd AttributeEnd #feet AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_base1"] Translate 1.3 .24 1.6 Rotate 230 0 0 1 Rotate -100 0 1 0 Scale .6 1.8 .8 Sphere .2 -1 1 180 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_middle1"] Translate 1.2 1.2 1.6 Rotate 10 0 0 1 Rotate 180 0 1 0 Rotate 180 1 0 0 Scale .8 5 1 Sphere .2 -1 1 180 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_top1"] Translate 1.18 1.25 1.7 Rotate 10 0 0 1 Rotate 180 0 1 0 Rotate 270 1 0 0 Scale .2 .2 .1 Cone 2 1 360 TransformEnd AttributeEnd #foot2 AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_base2"] Translate -1.3 .24 1.6 Rotate -230 0 0 1 Rotate 100 0 1 0 Scale .6 1.8 .8 Sphere .2 -1 1 180 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_middle2"] Translate -1.2 1.2 1.6 Rotate -10 0 0 1 Rotate -180 0 1 0 Rotate 180 1 0 0 Scale .8 5 1 Sphere .2 -1 1 180 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_top2"] Translate -1.18 1.25 1.7 Rotate -10 0 0 1 Rotate -180 0 1 0 Rotate 270 1 0 0 Scale .2 .2 .1 Cone 2 1 360 TransformEnd AttributeEnd #foot3 AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_base3"] Translate -1.3 .24 -1.6 Rotate -230 0 0 1 Rotate 100 0 1 0 Scale .6 1.8 .8 Sphere .2 -1 1 180 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_middle3"] Translate -1.2 1.2 -1.6 Rotate -10 0 0 1 Rotate 180 0 1 0 Rotate 180 1 0 0 Scale .8 5 1 Sphere .2 -1 1 180 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_top3"] Translate -1.18 1.25 -1.7 Rotate -10 0 0 1 Rotate -180 0 1 0 Rotate 270 1 0 0 Scale .2 .2 .1 Cone 2 1 360 TransformEnd AttributeEnd #foot4 AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_base1"] Translate 1.3 .24 -1.6 Rotate 230 0 0 1 Rotate -100 0 1 0 Scale .6 1.8 .8 Sphere .2 -1 1 180 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_middle1"] Translate 1.2 1.2 -1.6 Rotate 10 0 0 1 Rotate 180 0 1 0 Rotate 180 1 0 0 Scale .8 5 1 Sphere .2 -1 1 180 TransformEnd AttributeEnd AttributeBegin TransformBegin Attribute "identifier" "name" ["foot_top1"] Translate 1.18 1.25 -1.7 Rotate 10 0 0 1 Rotate 180 0 1 0 Rotate 270 1 0 0 Scale .2 .2 .1 Cone 2 1 360 TransformEnd AttributeEnd #handle #base #AttributeBegin AttributeBegin TransformBegin Translate -3.15 1.85 0 Rotate -45 0 0 1 Scale 1.7 .1 .1 ReadArchive "geo/pcube.rib" TransformEnd AttributeEnd AttributeBegin TransformBegin Translate -2.5 .9 0 Rotate -90 0 0 1 Scale .8 .1 .1 ReadArchive "geo/pcube.rib" TransformEnd AttributeEnd AttributeBegin TransformBegin Translate -2.05 1 0 # Rotate -90 0 0 1 Scale .8 .3 .1 ReadArchive "geo/pcube.rib" TransformEnd AttributeEnd AttributeBegin TransformBegin Translate -3.04 3.17 0 Rotate -135 0 0 1 Scale 1 1 1 Torus 1 0.08 0 360 -224 TransformEnd AttributeEnd AttributeBegin TransformBegin Translate -1.1 3.3 0 Rotate -90 0 1 0 Scale 1 1 1 Cone .7 .4 360 TransformEnd AttributeEnd AttributeBegin TransformBegin Translate -1.8 3.3 0 # Rotate -90 0 0 1 Scale .45 .1 .1 ReadArchive "geo/pcube.rib" TransformEnd AttributeEnd #lidhinge AttributeBegin TransformBegin Translate -1.8 4.15 0 # Rotate -90 0 0 1 Scale .45 .2 .4 ReadArchive "geo/pcube.rib" TransformEnd AttributeEnd




#Grey Chrome Bxdf "PxrDisney" "PxrDisney1" "color baseColor" [0.8 0.8 0.8] "color emitColor" [0 0 0] "float subsurface" [0] "color subsurfaceColor" [0 0 0] "float metallic" [1] "float specular" [0.5] "float specularTint" [0] "float roughness" [0.1] "float anisotropic" [0] "float sheen" [0] "float sheenTint" [0.5] "float clearcoat" [0] "float clearcoatGloss" [1] "normal bumpNormal" [0 0 0] "float presence" [1] "int inputAOV" [0] #CircleDisplacement # The manifold can control the repetitions of displacement. Pattern "PxrManifold2D" "PxrManifold2D1" "float angle" [0] "float scaleS" [2.5] "float scaleT" [1] "float offsetS" [0]##Allows control of ''st'' "float offsetT" [0] "int invertT" [1] "string primvarS" [""] "string primvarT" [""] # "PxrManifold2D2:result" uses->|struct|manifold| # txmake -mode periodic ../tiffs/circletexture3.tif ../textures/circletextures.tex Pattern "PxrTexture" "PxrTexture1" "string filename" ["circletextures.tex"] "int firstChannel" [0] "int atlasStyle" [0] "int invertT" [1] "int filter" [1] "float blur" [0.0] "int lerp" [1] "color missingColor" [1. 0. 1.] "float missingAlpha" [1.0] "int linearize" [0] # Example manifold connection "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] "int clampInput" [1] "color bias" [.5 .5 .5] "color gain" [.5 .5 .5] "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" [.2] Surface "RMSDisplacement" "float disableDisplacement" [0] "float mask" [1] "float dispMode" [1] "float vectorEncoding" [1] "reference float displacementScalar" ["PxrToFloat1:resultF"] "vector displacementVector" [0 0 0] "float displacementAmount" [-0.09] "float displacementCenter" [0.5]


Challenges of the Project



The major issue involved with working directly in code when modeling was just being generally disoriented until adjusting your view. Once I was able to see what was happening in the code without a visual aid the process became much smoother and actually enjoyable. Another problem was connecting different components of the scene to one another in such a way that it reduces the clutter of the coding. Using the ReadArchive tag allowed me to represent code from another directory without having to actually write it out in the .rib file it needs to be placed in. This can be used for a variety of .rib files such as materials, lights, and geometry. Coding can still becoming very dense even with the ability to archive .rib files and use them as proxy information. Such as the model itself, I've posted the code for it below the process video, each component still needed to be laid out in such a way that I can find each piece within all the code. Just by giving each component a name identifier attribute, just as you would if working directly in Maya, it allows the coder to quickly find the components in the pile up. One of the trickiest parts of texturing the model was getting the displacement map positioned on the model and just getting the displacement map to work. Once I figured out how to create the .tex file, which was merely executing the "txmake -mode periodic ../tiffs/textureimage.tif ../textures/newtexturefile.tex", I was able to adjust the map on the geometry. A great deal of adjustment had to be made to the displacement map in Photoshop to get the desired result. The problem with coding on a displacement map is the lacking UV, or for renderman ST, editor. Thus, the great deal of adjust is required. Some adjusting with the "floatscaleS" granted some allowance to reducing the stretching the occured on the round object.

Final Displacement Map



Workflow

The workflow in this project was very linear just to keep everything regulated and to not get lost in my first .rib coding experience. This process was broken up as such:

1. familiarization with code

2. establish world .rib

3. lighting

4. modeling

5. shading/texturing

6. rendering

Each item ties into a previously completed task. Once the world is build the model can then be created, archived and placed into the world which is viewable with the lighting already established. The shading can be archived as it's own .rib and then placed on individual pieces of geometry or the whole model through further archive placement. Once the lighting, shading and modeling is complete you can render the scene with either a single frame or turntable animation built into Cutter.

The final renders recieved the standard Nuke treatment of a denoise and color correct node