paper summaries
play

Paper Summaries Any takers? Procedural Shading Announcement - PDF document

Paper Summaries Any takers? Procedural Shading Announcement Logistics Checkpoint 2 SIGGRAPH animation screenings Due last Thursday!!! Every Monday Checkpoint 3 12:30pm -- 2pm Due Today 07-1315 Checkpoint 4


  1. Paper Summaries  Any takers? Procedural Shading Announcement Logistics  Checkpoint 2  SIGGRAPH animation screenings  Due last Thursday!!!  Every Monday  Checkpoint 3  12:30pm -- 2pm  Due Today  07-1315  Checkpoint 4  To be given today  Project Proposals  Sponsored by RIT digital studio program (College Imaging Arts and Sciences) and  All should have received e-mail feedback.  Please address issues (if any) Rochester Chapter of SIGGRAPH. Projects The plan for today  Approx 22 projects  Procedural Shading  Listing of projects now on Web  A short history  Presentation schedule  Cook’s Shade Trees  Presentations (15 min max)  Last 3 classes (week 10 + finals week)  Ken Perlin: PSE and Noise  Sign up  Shader Languages  Email me with 1 st , 2 nd , 3 rd choices  First come first served.  Example  Checkpoint 4 1

  2. Remember this? In the beginning…  There was Phong…  …and Phong was good  Bi-directional Reflectance Function  As long as everything in your world was plastic! BRDF f ( , , , ) = � � � �  Physics purists said… r i i r r  Not close enough to reality At a given point, gives relative reflected illumination in any  Cook / Torrance direction with respect to incoming illumination coming from any direction In the beginning… So then came…  Practical 3Ders said  Texture Mapping  Too hard to use  Strauss model  Developed in 1974 by Ed Catmull, currently  …too isotropic president of Pixar  Ward model…  Goal: Make Phong shading less plastic looking  Not complex enough…  And texture maps were good…  Blah..blah…blah But… What if…  We could roll your own illumination  They were static models with…  They were fixed in resolution  Flexibility  Too much aliasing.  Resolution independence  Took up too much space  Compactness  Parameterizable  Enter the Procedural Shader  Blah…blah…blah… 2

  3. Shade Trees [Cook84] Procedural Shading Shading (and/or texture) determined by a  First procedural shading system function  Allowed use of different shading model for each surface as well as light sources and atmospheric Advantages Blah…Blah…Blah… considerations, i.e., light and atmosphere trees  Compact  Programming=>  Traditional shading techniques could be combined debugging  Resolution  Handled complexity and simplicity in same image Independent  Unpredictable results  Color and transparency  Textures  Unlimited Extent  Time vs. space  Reflection mapping tradeoff (can take a  Parameterizable ->  Displacement mapping long time) class of textures  Solid texturing Shade Trees [Cook84] Procedural Shading – Shade Trees  Shading calculated by combining basic functional  Basic operations include operations using appearance parameters  Vector operations (normalize, dot product / cross  Operations are organized in a tree (directed acyclic product) graph).  Arithmetic operations  Nodes – Operations  Interpolation / “mix”  Uses zero or more appearance parameters as input  stochastic functions  Produces one or more appearance parameters as output  Children – operands – basic geometric info: normals,  Variables (points in eye or world) location, etc.  Expandable dynamically  Result of shade tree evaluation is a color  Basis for Renderman Shading Language  Evaluating equivalent to parsing tree (post order - compiler design) Procedural Shading – Shade Procedural Shading – Shade Trees Trees  Shade trees - Phong model + ambient diffuse specular k a k d S N k s R V k e ∑ ∑ = + • + • k L ( V ) k L k L ( S N) k L ( R V) e a a d i i s i i i i ambient diffuse specular [Cook84] 3

  4. Procedural Shading – Shade Trees Procedural Shading – Shade Trees Shade trees - example code: for “metal” shade tree  Shade Trees - example…copper Built into language Surface Command – designates shade tree for object (overrides default values) [Cook84] [Cook84] Procedural Shading – Shade Trees Procedural Shading – Shade Trees  Are parameterizable  Shade trees – “mix” uses one of inputs to interpolate  Have access to “important” attributes of the between the other two point in question  Hooks into the 3d world  Normals, viewer vector, light vectors  Can be functionally combined  Output of one shade tree can be input to another by attaching as a branch  Nothing more that a parse tree for a function  Functional Programming (LISP) [Cook84] Perlin’s Pixel Stream Procedural Shading – Shade Trees Editor (PSE)  Effectively using shade trees is more of an  Attempt to create a language around functional art than a science. shade generation  C like language  Included control structures  Originally designed to work on pixels of an image as a postprocessor  Input image -> PSE (filter) -> output image  Input image has variable list: surface identifiers, point – location, normal, etc. [Cook84] 4

  5. Procedural Shading – Perlin’s PSE Procedural Shading – Perlin’s PSE  Any space function can be thought of as  Example Variable related to input image; others point, normal representing a solid material if surface == 1  If evaluated at visible surface points, get sculpture! color = [1 0 0] * max(0.1, dot(normal,[1 0 0])  Shape and texture independent color normal else  Small code! color = [0 0 0.1]  PSE programs are evaluated in 3D space to produce such solid textures Produces diffusely shaded red object lit from positive x  Hooks into the 3d world direction on a dark blue background.  Knowledge of x,y,z coordinates  Knowledge of important “vectors” at surface Procedural Shading – Perlin’s PSE Procedural Shading – Perlin Noise  But the biggest contribution from the PSE  Observation: was  Most things in the world have some sort of  THE NOISE random or stochastic component to them For, tom orrow, he knew, all the W ho girls  A procedural shading system requires the and boys W ould wake bright and early. They'd use of randomness (“noise”) for realism. rush for their toys! And then! Oh, the noise! Oh, the noise!  Need more than simple random number Oh, the Noise! Noise! Noise! Noise! That's one thing he hated! The NOISE! generator. NOISE! NOISE! NOISE! How the Grinch Stole Christm as Procedural Shading – Perlin Noise Procedural Shading – Perlin Noise  What is noise  Perlin on noise:  Random signal with rich frequency distribution  “Noise appears random but it is not. If it were really random, then you’d get a different result each time  Types of noise: you call it. Instead it is “pseudo-random” – it gives  White – uniform frequency the appearance of randomness”  Pink – filtered  “Noise is a mapping from R n → R – you input an n-  Gaussian – based on Gaussian distribution dimensional point with real coordinates and it gives  None appropriate for shader use you a real value. Currently, the most common uses is for n=1, 2, and 3. The first is used for animation, the second for cheap texture hacks, and the third for less-cheap texture hacks.” 5

  6. Procedural Shading-Perlin Noise Procedural Shading-Noise Properties  Repeatable  Controllable random number generator  Known range [-1, 1]  Emphasized importance of stochastic functions in texture design  Band limited / scalable  Very efficient in time and space  Doesn’t exhibit obvious periodicities  Implemented as a basic operation in the  Statistically invariant under translation MMX chipset and other graphics hardware  Statistically invariant under rotation  Won Ken an Academy Award Procedural Shading-Perlin Noise Procedural Shading-Perlin Noise  “Controlled” Noise function  Noise frequency and detail  White noise = noise at all frequencies  Control the frequency of the noise used  e.g. noise (2x) will contain twice as much frequency (detail) as noise(x) Procedural Shading-Perlin Noise Procedural Shading-Perlin Noise  3D lattice (3D array) with 4 pseudorandom real  Perlin Noise numbers per point in the array  Returns a scalar value between -1 and 1  for each point (x 0 ,y 0 ,z 0 ) we assign a set of 4  takes a 3d vector as an argument pseudorandom numbers (a, b, c, d).  float noise3 (float [3] vec)  Compute d’ = d - (ax 0 +by 0 +cz 0 )  noise (x,y,z)  if (x, y, z) is on the lattice, noise (x,y,z) = d  if (x,y,z) is NOT on the lattice, the values of (a,b,c,d) are interpolated from the (a,b,c,d) values of neighboring lattice points. Then noise(x,y,z) = ax + bx +cz +d’ using the interpolated (a,b,c,d) 6

Recommend


More recommend