University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Procedural Approaches.

Slides:



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

Lecture 14 Illumination II – Global Models
Shadow Rendering Techniques A point is in the shadow of a light source if it can not be “seen” by the light source, i.e. the line segment that connects.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
Light Issues in Computer Graphics Presented by Saleema Amershi.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Advanced Rendering II.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Textures III, Procedural.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Shading, Advanced Rendering.
Christian Lauterbach COMP 770, 2/11/2009
Particle Systems 1 Adapted from: E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Alla Sheffer Advanced Rendering Week.
Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing
RAY TRACING.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munzner Advanced Rendering II,
CSCE 641: Computer Graphics Ray Tracing Jinxiang Chai.
Admission to CS 184 Enrollment priorities are 1. CS/EECS majors, 2. CS/EECS minors (this category includes applied math majors) 3. anyone else with a declared.
Ray Casting Ray-Surface Intersections Barycentric Coordinates Reflection and Transmission [Shirley, Ch.9] Ray Tracing Handouts Ray Casting Ray-Surface.
Ray Tracing Jerry Sui Adam Conner. Part I – Introduction to Ray Tracing Final Product.
1 7M836 Animation & Rendering Global illumination, ray tracing Arjan Kok
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
CSCE 641: Computer Graphics Ray Tracing Jinxiang Chai.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
Cornell CS465 Fall 2004 Lecture 3© 2004 Steve Marschner 1 Ray Tracing CS 465 Lecture 3.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Advanced Rendering University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
Today More raytracing stuff –Soft shadows and anti-aliasing More rendering methods –The text book is good on this –I’ll be using images from the CDROM.
12/05/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling Very brief intro to global illumination.
Reflections Specular reflection is the perfect reflection of light from a surface. The law a reflection states that the direction of the incoming ray and.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munzner Textures III Week 10,
-Global Illumination Techniques
Ray Tracing Sang Il Park SEjong University With lots of slides stolen from Jehee Lee, Doug James, Steve Seitz, Shree Nayar, Alexei Efros, Fredo Durand.
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
Particle Systems – Technique for Modeling a Class of Fuzzy Objects Craig Schroeder Computer Graphics I April 22, 2004.
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
1 Dr. Scott Schaefer Ray Tracing. 2/42 Ray Tracing Provides rendering method with  Refraction/Transparent surfaces  Reflective surfaces  Shadows.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Procedural Approaches.
Recursion and Data Structures in Computer Graphics Ray Tracing 1.
04/30/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling We are now all done with modeling, the standard hardware pipeline.
Basic Ray Tracing CMSC 435/634.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Textures II Week 9, Fri.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munzner Procedural II, Collision.
Monte-Carlo Ray Tracing and
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Ray Tracing II. HW1 Part A due October 10 Camera module Object module –Read from a file –Sphere and Light only Ray tracer module: –No shading. No reflection.
Bounding Volume Hierarchy. The space within the scene is divided into a grid. When a ray travels through a scene, it only passes a few boxes within the.
Lighting/Shading IV Advanced Rendering I Week 8, Mon Mar 3
Advanced topics Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2006/01/04 with slides by Brian Curless, Zoran Popovic, Mario Costa Sousa.
CSCE 441: Computer Graphics Ray Tracing
In the name of God Computer Graphics. Last Time Some techniques for modeling Today Global illumination and raytracing.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Textures III, Procedural.
Particle Systems Reference: Reeves W.: "Particle Systems -- A Technique for Modelling a Class of Fuzzy Objets", Computer Graphics, 17(3), pp ,
RENDERING : Global Illumination
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Basic Ray Tracing CMSC 435/634.
Procedural, Collision University of British Columbia
Distributed Ray Tracing
Ray Tracing Dr. Scott Schaefer.
© University of Wisconsin, CS559 Fall 2004
Lighting/Shading IV, Advanced Rendering I Week 7, Fri Mar 5
(c) 2002 University of Wisconsin
CSCE 441: Computer Graphics Ray Tracing
Procedural Approaches Curves Week 12, Fri 21 Nov 2003
CSC418 Computer Graphics Raytracing Shadows Global Illumination.
Presentation transcript:

University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Procedural Approaches Advanced Rendering Week 9, Mon Mar 7

2 News Homework 3 out today due Mon Mar 14

3 Review: Volumetric Texture define texture pattern over 3D domain - 3D space containing the object texture function can be digitized or procedural for each point on object compute texture from point location in space 3D function   x,y,z)

4 Procedural Textures generate “image” on the fly, instead of loading from disk often saves space allows arbitrary level of detail

5 Review: Perlin Noise: Procedural Textures function marble(point) x = point.x + turbulence(point); return marble_color(sin(x))

6 Review: Perlin Noise coherency: smooth not abrupt changes turbulence: multiple feature sizes

7 Review: Generating Coherent Noise just three main ideas nice interpolation use vector offsets to make grid irregular optimization sneaky use of 1D arrays instead of 2D/3D one

8 Procedural Approaches

9 Review: Procedural Modeling textures, geometry nonprocedural: explicitly stored in memory procedural approach compute something on the fly not load from disk often less memory cost visual richness adaptable precision noise, fractals, particle systems

10 Review: Language-Based Generation L-Systems F: forward, R: right, L: left Koch snowflake: F = FLFRRFLF Mariano’s Bush: F=FF-[-F+F+F]+[+F-F-F] angle 16

11 Review: Fractal Terrain 1D: midpoint displacement divide in half, randomly displace scale variance by half 2D: diamond-square generate new value at midpoint average corner values + random displacement scale variance by half each time

12 Fractal Terrain also can make using Perlin noise

13 Particle Systems

14 Particle Systems loosely defined modeling, or rendering, or animation key criteria collection of particles random element controls attributes position, velocity (speed and direction), color, lifetime, age, shape, size, transparency predefined stochastic limits: bounds, variance, type of distribution

15 Particle System Examples objects changing fluidly over time fire, steam, smoke, water objects fluid in form grass, hair, dust physical processes waterfalls, fireworks, explosions group dynamics: behavioral birds/bats flock, fish school, human crowd, dinosaur/elephant stampede

16 Particle Systems Demos general particle systems boids: bird-like objects

17 Particle Life Cycle generation randomly within “fuzzy” location initial attribute values: random or fixed dynamics attributes of each particle may vary over time color darker as particle cools off after explosion can also depend on other attributes position: previous particle position + velocity + time death age and lifetime for each particle (in frames) or if out of bounds, too dark to see, etc

18 Particle System Rendering expensive to render thousands of particles simplify: avoid hidden surface calculations each particle has small graphical primitive (blob) pixel color: sum of all particles mapping to it some effects easy temporal anti-aliasing (motion blur) normally expensive: supersampling over time position, velocity known for each particle just render as streak

19 Procedural Approaches Summary Perlin noise fractals L-systems particle systems not at all a complete list! big subject: entire classes on this alone

20 Advanced Rendering

21 Reading FCG Chapter 9: Ray Tracing only

22 Errata p 155 line 1: p(t)=e+td, not p(t)=o+td equation 5: 2 nd term 2d*(e-c), not 2d*(o-e) p 157 matrices: c x ->x c, c y ->y c, c z ->z c p 162 r = d – 2(d.n)n, not r = d + 2(d.n)n p 163 eqn 4 last term: n cos  not n cos  ’ eqn 5: no  term at end

23 Global Illumination Models simple shading methods simulate local illumination models no object-object interaction global illumination models more realism, more computation approaches ray tracing subsurface scattering radiosity

24 Simple Ray Tracing view dependent method cast a ray from viewer’s eye through each pixel compute intersection of ray with first object in scene cast ray from intersection point on object to light sources projection reference point pixel positions on projection plane

25 Recursive Ray Tracing ray tracing can handle reflection (chrome) refraction (glass) shadows spawn secondary rays reflection, refraction if another object is hit, recurse to find its color shadow cast ray from intersection point to light source, check if intersects another object projection reference point pixel positions on projection plane

26 Reflection mirror effects perfect specular reflection n

27 Refraction happens at interface between transparent object and surrounding medium e.g. glass/air boundary Snell’s Law light ray bends based on refractive indices c 1, c 2 n d t

28 Total Internal Reflection

29 Ray Tracing Algorithm Whitted, 1980 Image Plane Light Source Eye Refracted Ray Reflected Ray Shadow Rays

30 Basic Ray Tracing Algorithm RayTrace(r,scene) obj := FirstIntersection(r,scene) if (no obj) return BackgroundColor; else begin if ( Reflect(obj) ) then reflect_color := RayTrace(ReflectRay(r,obj)); else reflect_color := Black; if ( Transparent(obj) ) then refract_color := RayTrace(RefractRay(r,obj)); else refract_color := Black; return Shade(reflect_color,refract_color,obj); end;

31 Algorithm Termination Criteria termination criteria no intersection reach maximal depth number of bounces contribution of secondary ray attenuated below threshold each reflection/refraction attenuates ray

32 Ray - Object Intersections inner loop of ray-tracing must be extremely efficient solve a set of equations ray-sphere ray-triangle ray-polygon

33 Ray - Sphere Intersection ray: unit sphere: quadratic equation in t: p v

34 Optimized Ray-Tracing basic algorithm simple but very expensive optimize by reducing: number of rays traced number of ray-object intersection calculations methods bounding volumes: boxes, spheres spatial subdivision uniform BSP trees (not required reading)

35 Subsurface Scattering: Translucency light enters and leaves at different locations on the surface bounces around inside technical Academy Award, 2003 Jensen, Marschner, Hanrahan

36 Subsurface Scattering: Marble

37 Subsurface Scattering: Milk vs. Paint

38 Subsurface Scattering: Faces

39 Subsurface Scattering: Faces