RenderMan Introduction CS 551/645 Fall 2000. Evaluate Me! Please visit the SEAS main website and use the ‘Course Evaluations’ button to rate this class.

Slides:



Advertisements
Similar presentations
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Advertisements

Graphics Pipeline.
3D Graphics Rendering and Terrain Modeling
 Engineering Graphics & Introductory Design 3D Graphics and Rendering REU Modeling Course – June 13 th 2014.
CS 4363/6353 INTRODUCTION TO COMPUTER GRAPHICS. WHAT YOU’LL SEE Interactive 3D computer graphics Real-time 2D, but mostly 3D OpenGL C/C++ (if you don’t.
1Notes  Assignment 1 is out, due October 12  Inverse Kinematics  Evaluating Catmull-Rom splines for motion curves  Wednesday: may be late (will get.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
(conventional Cartesian reference system)
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
SWE 423: Multimedia Systems Chapter 4: Graphics and Images.
Introduction to OpenGL. What is OpenGL OpenGL is a low-level software interface to graphics hardware No commands for performing windowing tasks or obtaining.
Shading Languages By Markus Kummerer. Markus Kummerer 2 / 19 State of the Art Shading.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 RenderMan & Its Shading Language.
1cs426-winter-2008 Notes  RenderMan resources up on the website  We will be using Pixie this term Check on the website soon (installed on CS linux.
Programmable Shading May 21, Motivation Recall what are done in the graphics pipeline: –Front End: Transformations (Modeling, Viewing, and Projection)
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
RenderMan (Shading Language: Concepts)
COMP 261 Lecture 14 3D Graphics 2 of 2. Doing better than 3x3? Translation, scaling, rotation are different. Awkward to combine them. Use homogeneous.
COMP SCI 352 Computer Graphics and Animation. Computer Graphics2 My name is … My name is … How to find me How to find me Course Policies Course Policies.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
UniS CS297 Graphics with Java and OpenGL Introduction.
Java: Chapter 1 Computer Systems Computer Programming II.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Texture Mapping.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
Computer Graphics. Requirements Prerequisites Prerequisites CS 255 : Data Structures CS 255 : Data Structures Math 253 Math 253 Experience with C Programming.
Simulating the Physics of Pool using RenerMan ● Shaders and Texture Mapping ● Spherical Texture Maps ● Rotating the Balls ● Lighting ● Physics Equations.
A Crash Course in HLSL Matt Christian.
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 5 Working with Images Starting Out with Games & Graphics in.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
MIT EECS 6.837, Durand and Teller 1 The Rendering Pipeline Local Illumination Models MIT EECS Lecture 4, September 17 th 2002.
Computer Science Term 1, 2006 Tutorial 5 The Final Exam.
1 Introduction to Computer Graphics SEN Introduction to OpenGL Graphics Applications.
به نام خدا تنظیم کننده : فرانه حدادی استاد : مهندس زمانیان تابستان 92.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Lecture 6: 3D graphics Concepts 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271 
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
Kansas State University Department of Computing and Information Sciences CIS 736: Advanced Computer Graphics Monday, 24 April 2006 Shaun Budhram (Slides.
RenderMan Jae Woo Kim Doctoral Student, Institute for Computer Graphics The George Washington University.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
CS380: Computer Graphics Distributed Ray Tracing TA Course URL:
RenderMan (Introduction). Objective Understanding of graphics algorithms  Rendering pipeline Understanding of Technical Director’s role Learning the.
2009 GRAPHICS : PROJECT 1 BASED ON DX9 BASICS. Documented by Dongjoon Kim SNU CS Ph.D Course Student Contact : NOTE.
Rendering & Compositing Jeremy Huddleston Companion Maya/Renderman/Shake Data:
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Advanced rendering techniques 4/2/02. Rendering for animation The big difference: real time vs. off-line Real time: sacrifice quality for performance.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
CS 551/645 Introduction to Computer Graphics Fall 2000.
Mohammed AM Dwikat CIS Department Digital Image.
Introduction to Computer Graphics
Computer Graphics.
Photorealistic Rendering vs. Interactive 3D Graphics
Visualization Shading
Programmable Pipelines
3D Graphics Rendering PPT By Ricardo Veguilla.
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Rendering & Compositing
UMBC Graphics for Games
Joshua Barczak* CMSC 435 UMBC
(c) 2002 University of Wisconsin, CS 559
Computer Graphics 4Practical Lesson
Programmable Shading May 15, 2006.
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Presentation transcript:

RenderMan Introduction CS 551/645 Fall 2000

Evaluate Me! Please visit the SEAS main website and use the ‘Course Evaluations’ button to rate this class.

Administrivia RenderMan assignment due 9:00 a.m. on December 5 th, one week from today Extra Credit assignment due 7:00 p.m. on December 11 th –I have handouts to help explain the ray tracing algorithm. Grab one after class.

Remember BMRT.org download is closed until Friday – has older Windows versionwww.rhino3d.com – has recent Linux versionwww.tucows.com –My account on Small Hall has recent SGI version

Renderman Sites state.edu/~smay/RManNotes/rmannotes.htmlhttp:// state.edu/~smay/RManNotes/rmannotes.html ookindex.htmlhttp://minerva.ca.scad.edu/faculty/kesson/CA301/b ookindex.html

RenderMan Defines an interface between scene design and scene rendering –RenderMan Interface (Ri) is the formal spec –BMRT and Pixar’s PRMan (aka RenderMan) are two implementations of rendering software that accept the RenderMan Interface input files (RIB)

RenderMan Standards High-level object primitives –Polygon, Quadric Surfaces, Parametric Surfaces Hierarchical graphics state Model and viewing transformations Programmable shading language Anti-aliasing Texture Maps Robust definition of image size and depth

RenderMan I/O Inputs –RenderMan Interface Bytestream (RIB) files Scene description –Shaders Programs that describe shading (lighting and coloring) algorithms –Maps Images, shadow regions, etc. Outputs –Maps For use as inputs in future rendering stages –Images The final product of the rendering

RIB Files You can write these by hand (ASCII or binary) You can have them generated using C++ code and RenderMan C++ libraries Maya plugin - MTOR Roll your own RIB writer

Sample RIB File ##RenderMan RIB version 3.03 Display "RenderMan" "framebuffer" "rgb" Format LightSource "distantlight" 1 Translate WorldBegin Surface "metal" Color [ ] Polygon "P" [ ] WorldEnd

Shaders Write from scratch Obtained from software app, Slim or ShadeTree Must be compiled to object code

Sample Shader surface metal (float Ka=1, Ks=1, roughness=.1) { normal Nf; vector V; Nf = faceforward(normalize(N), I) ; V = normalize(-I) ; Oi = Os; Ci = Os * Cs * ( Ka*ambient() + Ks*specular(Nf,V,roughness) ); } /* metal */

Shaders Examples There are a million shaders on the web It is amazing to see the complex effects generated with simple functional descriptions Shader writing is the bread and butter of special effects houses (the fur on Stuart Little, for example)

Shaders Many extra shaders are included with the BMRT distribution Look in the shaders directory Read the.sl shaders and follow the structure of the input parameters when using Remember, RenderMan graphics state stores variables about camera position, light positions, etc.

How To Generate this:

.rib Code # bulb.rib # Author: Scott Iverson # Date: 6/9/95 # Display "bulb.tiff" "file" "rgb" Projection "perspective" "fov" 25 Format Rotate Rotate Rotate Translate Comments Output to file (TIFF) Perspective, 25 deg FOV Image Size Camera Rotation (NOOP) Angle, X, Y, Z Move Camera

.rib Code WorldBegin Light 1 is ambient with intensity.4 LightSource "ambientlight 1 "intensity".4 Light 2 is distant with intensity.6 and direction (-.3, -.2, 1) LightSource "distantlight" 2 "intensity".6 "from" [0 0 0] "to" [ ] AttributeBegin is like GL_PUSH AttributeBegin Rotate –90 degrees about x-axis Rotate Use interpolation to determine shading of pixels that fall between sampled points. Could be “constant” ShadingInterpolation "smooth"

.rib Code # base Apply the material “metal” to all future geometry Surface "metal“ Apply the color “blue” to all future geometry Color Again, push to isolate the upcoming changes AttributeBegin Change the “handedness” of the coordinate system. Because we’re about to draw a quadric surface, the handedness effects the normal direction Orientation "rh“ Create a quadric surface, a disk Disk Pop the state (the handedness) AttributeEnd

.rib Code The Blue color remains and we draw a cylinder Cylinder We move up a little (to the top of the cylinder) Translate We change to another surface shader Surface "matte” We change to color “yellow” Color We draw a hyperboloid around base of bulb Hyperboloid

.rib Code Translate Surface "metal" Color Translate Torus Translate Torus Translate Torus Translate Torus Translate Torus Translate Translate Move up a little Change the surface shader Change the color to be more red Draw the torii for the threads

.rib Code # the glass part Change the shader Surface "plastic" "roughness".4 Change the color to “white” Color Here is the truncated call to generate the bulb surface PatchMesh "bicubic" 13 "nowrap" 7 "nowrap" "P" [ …] Pop Stack AttributeEnd End of scene description WorldEnd

Things to remember The default coordinate system is left-handed Camera initially at origin looking along positive-z All camera movements are defined before the “World Begin” command Think backwards about camera movement. You’re moving the world, not the camera Object transformations accumulate (note the torus sequence) but for each object, the transformations are applied last -> first

C++ Library Straightforward relationship to.rib file we just reviewed Uses –include/ri.h (for Rt data types and function headers) –lib/libribout.a (for function code)

C++ Library One weird thing about RenderMan Interface –Shaders accept parameter list arguments token-value pairs Terminated by RI_NULL –Explicit type casting RtToken, RtPointer –Pass by address

parameter list Define the name of the texture map file Char *mytmap = “ grid.tiff ” Create a new token name and define its type tmap will now be of type uniform string RiDeclare ( “ tmap ”, ” uniform string ” ); Use the shader, mytexture.sl, for the future geometry Provide the input parameter, mytmap, for the location of the texture map RiSurface ( ” mytexture ”, (RtToken) ” tmap ”, (RtPointer) &mytmap, RI_NULL);

What you need to do Create RiLookat() –Arguments: eyePoint(xyz), lookatpoint(xyz), upvector(xyz) –Once this is created, remove the explicit rotate and translate commands I have in the code

What you need to do Create an environment map –Use the command in the class handout Apply the environment map to the surface of the teapot –Any surface shader that accepts a texture argument will work (shinymetal, for example)

What you need to do Apply a marble or wood shader to the pedestal –It should look good

What you need to do Apply the images you used to generate the environment map to texture map the walls of the room –If you wish, you can apply another kind of shader to the floor of the room (even though this would result in an unrealistic reflection on the teapot)

Applying Texture Maps Again, a shader like paintedplastic will accept a texturemap argument –Just use it as an RiSurface before rendering the walls of the room –Make sure each wall gets a different texture However, polygons do not have simple ways to adjust texture coordinates and texture may wrap or tile Alternative: BILINEAR patch

RiPatch RiPatch (“bilinear”, RI_P, (RtPointer) corners, RI_ST, (RtPointer) textcoords, RI_NULL); –RtPoint corners[4]; –static struct {RtFloat x,y} textcoords [4];

What you need to do Put 3 lights in the scene –1 point, 1 directional, 1 spot Forget about the shadows –I’ll send out with instructions for those who are still interested