380 likes | 529 Views
RenderMan - Scene Description - . Scene Description API. Language Bindings C programming language RenderMan Interface Bytestream Other programming languages C++, Lisp, Tcl, Java, … C RenderMan calls : RIB file. RiAttributeBegin(); RiTranslate(0.0, 14.0, -8.3);
E N D
Scene Description API • Language Bindings • C programming language • RenderMan Interface Bytestream • Other programming languages • C++, Lisp, Tcl, Java, … • C RenderMan calls : RIB file RiAttributeBegin(); RiTranslate(0.0, 14.0, -8.3); RiSurface(“plastic”, RI_NULL); RiSphere(1.0, -1.0, 1.0, 360.0, RI_NULL); RiAttributeEnd(); AttributeBegin Translate 0.0, 14.0, -8.3 Surface “plastic” Sphere 1.0, -1.0, 1.0, 360.0 AttributeEnd
Modeling Paradigm • RenderMan allows no froward references of any kind • RenderMan employs a strict hierarchical graphics state for transformation and object attributes • The RenderMan API is extensible by both renderer designders and renderer users
Structure of a Scene Description • Options global to the entire animation • Frame block • Image options • Camera options • World block • Attributes, lights, primitives • Changed options • Another world block • Next frame block
Blocks • WorldBegin, WorldEnd • FrameBegin, FrameEnd frameno • AttributeBegin, AttributeEnd • TransformBegin, TransformEnd • Stacking must always be balanced • AttributeBegin • TransformBegin • AttributeEnd • TransformEnd is not legal
Transformations • Rotate angle vx vy vz • Scale sx sy sz • Skew angle vx vy vz ax ay az • ConcatTransform matrix • Identity • Transform matrix • Identity + ConcatTransform
Image Description • Display filename fileformat imagetype parameterlist • Format xresolution yresolution pixelraspectratio • FrameAspectRatio ratio • Exposure gain gamma • Quantize imagetype one min max dither • PixelSamples nx ny • PixelFilter filtername xwidth ywidth • CropWindow xmin xmax ymin ymax
Camera Description & Render Control • Camera description • Projection type parameterlist • ScreenWindow xmin xmax ymin ymax • Clipping nearplane farplane • Render Control • Hider type parameterlist • Option type parameterlist • RiSynchronize(“abort”)
Primitive Attributes • Color attributes • Color color • Opacity color • Matte flag • Shaders • Surface shadername parameterlist • Displacement shadername paramterlist • Atmosphere shadername paramterlist
Lights • LightSource shadername handle parameterlist • AreaLightSource shadername handle paramterlist • Illuminate handle state
Parametric Patches • Basis ubasis ustep vbasis vstep • Patch type parameterlist • PatchMesh type nu uwrap nv vwrap parameterlist • Built-in basis • “bezier”, “bspline”, “catmull-rom”, “hermite” • Type • “bilinear”, “bicubic” • Wrap • “periodic”, “nonperiodic”
NURBS • NuPatch nucv uorder uknot umin umax nvcvs vorder vknot vmin vmax • TrimCurve nloops ncurves order knot min max n u v w
Polygons • Polygon • GeneralPolygon • PointsPolygons • PointsGeneralPolygons
Parametric Quadrics • Cone • Cylinder • Disk • Hyperboloid • Sphere • Paraboloid • Torus
Subdivision Meshes • SubdivisionMesh • "catmull-clark"
subdivision SubdivisionMesh "catmull-clark"[4 4 4 4 4 4] [0 2 3 1 4 6 7 5 5 1 3 4 2 0 7 6 6 4 3 2 1 5 7 0]["crease" "crease"] [5 1 5 1] [1 5 7 0 1 3 4 6 2 3] [2 2]"P" [ 25 -25 -25 25 25 -25 25 -25 25 25 25 25 -25 25 25 -25 25 -25 -25 -25 25 -25 -25 -25] SubdivisionMesh "catmull-clark"[4 4 4 4 4 4] [0 2 3 1 4 6 7 5 5 1 3 4 2 0 7 6 6 4 3 2 1 5 7 0]"P" [ 25 -25 -25 25 25 -25 25 -25 25 25 25 25-25 25 25 -25 25 -25 -25 -25 25 -25 -25 -25]
SubdivisionMesh "catmull-clark"[4 4 4 4 4 4 4 4 4] [0 4 5 1 1 5 6 2 2 6 7 3 4 8 9 5 5 9 10 6 6 10 11 7 8 12 13 9 9 13 14 10 10 14 15 11]["interpolateboundary"] [0 0] [0] [0]"P" [-60 60 0 -60 20 0 -60 -20 0 -60 -60 0 -20 60 0 -20 20 45 -20 -20 45 -20 -60 0 20 60 0 20 20 45 20 -20 45 20 -60 0 60 60 0 60 20 0 60 -20 0 60 -60 0] SubdivisionMesh "catmull-clark"[4 4 4 4 4 4] [0 2 3 1 4 6 7 5 5 1 3 4 2 0 7 6 6 4 3 2 1 5 7 0]["crease" "crease"] [5 1 5 1] [1 5 7 0 1 3 4 6 2 3] [10 10]"P" [ 25 -25 -25 25 25 -25 25 -25 25 25 25 25 -25 25 25 -25 25 -25 -25 -25 25 -25 -25 -25]
CSG • Constructive Solid Geometry • SolidBegin operation • SolidEnd • operation • “primitive”: leaf node • “union” • “difference” • “intersection”
Reference Geometry • Procedural Primitives • Delayed Read-Archive • Run Program • Dynamic Load
Lightweight Primitives • Point Clouds • Points parameterlist • Curves • Curves type nvertices wrap paramterlist • LOD
LOD example AttributeBegin Detail [-1 1 –1 1 –1 1] DetailRange [0 0 1 4] Procedural “DelayedReadArchive” [ “small.rib” ] [1 –1 –1 1 –1 1] DetailRange [1 4 256 400] Procedural“DelayedReadArchive” [ “medium.rib” ] [1 –1 –1 1 –1 1] DetailRange [256 400 1e38 1e38] Procedural “DelayedReadArchive” [ “big.rib” ] [1 –1 –1 1 –1 1] AttributeEnd
Blobby Implicit Surfaces • Modeling primitive • Blinn’s blobby surface • Nishimura’s metaball • Wyvill’s soft object • Raindrops (“A Bug’s life”) • blending