1 / 12

Monday, April 2, 2001 Rich Pickler Department of Computing and Information Sciences, KSU Readings:

Lecture 20. Introduction to Renderman. Monday, April 2, 2001 Rich Pickler Department of Computing and Information Sciences, KSU Readings: Chapter 7, Advanced RenderMan. Lecture Outline. Readings: Advance RenderMan, Chapter 7 Suggested Exercises: Stretching RenderMan – A Brief History

chaim
Download Presentation

Monday, April 2, 2001 Rich Pickler Department of Computing and Information Sciences, KSU Readings:

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.

E N D

Presentation Transcript


  1. Lecture 20 Introduction to Renderman Monday, April 2, 2001 Rich Pickler Department of Computing and Information Sciences, KSU Readings: Chapter 7, Advanced RenderMan

  2. Lecture Outline • Readings: Advance RenderMan, Chapter 7 • Suggested Exercises: Stretching • RenderMan – A Brief History • Using BMRT • The RIB File • The Shading Language • Writing a Shader • Invaluable Resources

  3. RenderMan – A Brief History Began at ILM research department, later Pixar 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 Directly Linked DSO Can be a standalone program or called from RIB.

  4. Using BMRT • A free implementation of the RenderMan standard • Available at www.exluna.com/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

  5. The RIB File • Structure • State Machine similar to OpenGL • C-linkage

  6. Types, Variables, Spaces • Available types

  7. Types, Variables, Spaces • Variables global to all shaders • Ultimate Goal: Ci, Oi

  8. Types, Variables, Spaces • Spaces • Specified as a cast to variables • point blah = point “shader” (.5 .5 .5); • Or using the transform functions: transform, vtransform, ntransform • point transform( string toSpaceName; point p_current);

  9. Writing a Shader (cont’d) • Simple Sample: Phong shader surface phong( float Ka = 1, Kd =1, Ks = 0.5; float roughness = 0.1; color specularcolor = 1; ) { normal Nf = faceforward( normalize(N), I ); vector V = -normalize(I); color C = 0; illuminance( P ) { vector R = 2*normalize(N)* (normalize(N) . normalize( L )) - normalize( L ); C += Ka*Cs + Kd*Cs*( normalize(N) . normalize(L) ) + Ks*specularcolor* pow(( R . V ), 10); } Ci = C*Cs; }

  10. Writing a Shader (cont’d) • Attaching to the RIB file *********** AttributeBegin Translate 0 -1.5 0 Rotate 20 0 0 1 Color [ 0.8 0.0 0.0 ] Surface "phong" "Ka" [.1] "Kd" [.8] "Ks" [1] "roughness" [0.1] "specularcolor" [1 1 1] Basis "bezier" 3 "bezier" 3 PatchMesh "bicubic" 13 "nonperiodic" 10 "nonperiodic" "P" [1.5 0 0 1.5 0.828427 0 0.828427 1.5 0 0 1.5 0 -0.828427 1.5 0 -1.5 0.828427 0 -1.5 0 0 -1.5 -0.828427 0 -0.828427 -1.5 0 0 -1.5 0 0.828427 -1.5 0 1.5 -0.828427 0 1.5 0 0 1.5 0 0.075 1.5 0.828427 0.075 0.828427 1.5 0.075 0 1.5 0.075 -0.828427 1.5 0.075 -1.5 0.828427 0.075 -1.5 0 0.075 -1.5 -0.828427 0.075 -0.828427 -1.5 0.075 0 -1.5 0.075 0.828427 -1.5 0.075 1.5 -0.828427 0.075 1.5 0 0.075 2 0 0.3 2 1.10457 0.3 1.10457 2 0.3 0 2 0.3 -1.10457 **************

  11. Writing a Shader (cont’d) • Other Shader types • Displacement Shaders – describe how surfaces wrinkle or bump. • Light Shaders – describe the directions, amounts and colors of illumination and distributed by a light source in the scene. • Volume Shaders – describe how light is affected as it passes through a participating medium such as smoke or haze. • Advanced Topics • Anti-Aliasing – calculus! • Lens flares • Smoke, Clouds • Cartoon Shaders • Lighting models

  12. Lecture Outline • Readings: Advance RenderMan, Chapter 7 • Suggested Exercises: Stretching • RenderMan – A Brief History • Using BMRT • The RIB File • The Shading Language • Writing a Shader • Invaluable Resources • BMRT homepage – www.exluna.com/bmrt • Renderman Newsgroup – comp.graphics.rendering.renderman • www.renderman.org • The Renderman Interface Specification. Available at www.pixar.com

More Related