RenderMan (Introduction). Objective. Understanding of graphics algorithms Rendering pipeline Understanding of Technical Director’s role Learning the Shading Language Notion of Shader. Lecture Outline. Computer graphical Image Synthesis RenderMan – A Brief History Using BMRT The RIB File
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
Objective • Understanding of graphics algorithms • Rendering pipeline • Understanding of Technical Director’s role • Learning the Shading Language • Notion of Shader
Lecture Outline • Computer graphical Image Synthesis • RenderMan – A Brief History • Using BMRT • The RIB File • The Shading Language • Writing a Shader
The RenderMan History • Proposed by Pixar in 1989 • Its design is based on • Lucasfilm’s REYES (Renders Everything You Ever Saw) in 1981 (Pixar is originally the computer division of Lucasfilm) • Robert Cook’s Shade Trees [COOK84] • Since then RenderMan is referred as the industry standard of high-quality graphics production
What is RenderMan? • An open specification – anybody can implement the standard • Pixar RenderMan, BMRT, RenderDotC • A scenefile description for 3D rendering like PostScript is for 2D • Programmable shading language • C Programming Interface • Can be a standalone program or called from RIB.
What is RenderMan • Separation of Modeling and Rendering • RenderMan serves as the interface. • Scene = Shape + Shading • Two “languages” • Geometry(Shape) - set of C subroutines • Shading - a C-like language • Geometry code can be run directly, or output to RIB file • Shading code is compiled to byte-code • The power of RenderMan is in the shading part
RenderMan Interface • RenderMan Interface Bytestream (RIB): Geometry • The scene description language (.rib) can be created by a C program, generated by the modeler, or typed manually • The scene description file defined the geometry and some rendering parameters • Shading Language (SL): Shading • A skillful programmer develops the shader (.sl), a C-like program, to control how a surface is shaded. It is then complied to intermediate code (.slo) • The intermediate shader code is interpreted to control the shading process • The .rib and .slo are fed to the renderer for rendering
BMRT (Blue Moon Rendering Toolkit) • A free implementation of the RenderMan standard • A public-domain implementation of Pixar Photorealistic RenderMan (PRMan). • Three main components: • Rendrib: the renderer • Rgl: quick rendering for preview • Slc: shading language compiler • Download • Pixar Renderman BMRT Render 2.6.rar
How to Install BMRT • Unpack the BMRT Distribution • Choose a directory into which BMRT will be installed (e.g. “c:\BMRT2.6”) • Set BMRT Environment Variables • Variable: PATH Value:[…];C:\BMRT2.6\bin (i.e., add C:\BMRT2.6\bin to the end of the current PATH value.) • Variable: BMRTHOMEValue: C:\BMRT2.6\ • Variable: SHADERS Value: C:\BMRT2.6\shaders
How to Install BMRT • Testing BMRT • Command cmd • C:\> cd BMRT2.6\examples C:\BMRT2.6\examples\> • Test rgl • C:\BMRT2.6\examples\> c:\BMRT2.6\bin\rgl teapots.rib hit the esc key or q to close the window after it finishes rendering. • C:\BMRT2.6\examples\> c:\BMRT2.6\bin\rgl limbo.rib • Test slc • C:\BMRT2.6\shaders\> c:\BMRT2.6\bin\slc funkyglass.sl • C:\BMRT2.6\shaders\> c:\BMRT2.6\bin\slc screen_aa.sl • C:\BMRT2.6\shaders\> c:\BMRT2.6\bin\slc screen.sl • Test rendrib • C:\BMRT2.6\examples\> c:\BMRT2.6\bin\rendrib -d 16 shadtest.rib • The -d option to rendrib will display the results directly to the screen • press the w key while over the window to write out a TIFF file • the esc key or q will quit and close the window • Testiv • C:\BMRT2.6\examples\> c:\BMRT2.6\bin\iv balls1.tif
Using BMRT • Rendrib – the command line renderer • Rendrib [flags] <filename> • -d • Forces display to screen • Put a number afterward and it will render in multiple passes • -v – verbose. Tells you more about what is happening while you render. • -stats – displays some statistics after rendering about CPU usage, etc. • Slc – the shading language compiler • Slc [flags] <filename> • -dso compile to machine code • -o name output to specified name
A Simple Scene #min.rib - a minimal scene Display "min.tiff" "file" "rgb" Projection "perspective" WorldBegin Translate 0 0 2 Sphere 1 -1 1 360 WorldEnd • Making RIB • # : comment (주석) • Display • Create a file “min.tiff” • Color information “rgb” • “file” write to “file” • “framebuffer” on the screen • Projection • “perspective” projection • WorldBegin / WorldEnd • WorldBegin prepare to draw • WorldEnd the scene is finished • Transformation / Modeling • Translation z 축으로 2만큼 이동 • Sphere radius: 1, zmin: -1, zmax: 1, theta: 360
Transformation # beginend.rib Display "beginend.tiff" "file" "rgb" Projection "perspective" WorldBegin # move everything back 2 units Translate 0 0 2 TransformBegin # Everything that follows is one unit left Translate -1 0 0 Sphere 1 -1 1 360 TransformEnd TransformBegin # Everything that follows is one unit right Translate 1 0 0 Sphere 1 -1 1 360 TransformEnd WorldEnd • Transformation • Translate x y z • Scale x y z • Rotate angle x y z • TransformBegin • TransformEnd
Color # Display "beginend.tiff" "file" "rgb" Projection "perspective" WorldBegin Translate 0 0 2 Color [ 1 0 0 ] AttributeBegin Translate -1 0 0 Color [ 1 1 0 ] Sphere 1 -1 1 360 AttributeEnd #This resets the colour back to red AttributeBegin Translate 1 0 0 Sphere 1 -1 1 360 AttributeEnd WorldEnd • Color Color [ red green blue ] 0~1 • AttributeBegin : 속성 설정 시작 • AttributeEnd : 속성 설정 종료
Shading Language • Many types of shaders are possible: • Light source shaders • Surface shaders • Atmosphere shaders • Volume shaders…etc. • We will discuss only the surface shaders.
Standard Shaders • Standard Shaders • Constant • Matte • Metal • Plastic • Painted plastic • Displacement