brdf f r i i r r camera computer 3d synthetic tone model
play

BRDF f ( , , , ) r i i r r camera Computer 3D - PDF document

Paper Summaries Any takers? Texture Mapping Assignments Projects Checkpoint 2 Approx 18 projects Graded getting points back Listing of projects now on Web Checkpoint 3 Presentation schedule Due


  1. Paper Summaries • Any takers? Texture Mapping Assignments Projects • Checkpoint 2 • Approx 18 projects – Graded – getting points back • Listing of projects now on Web • Checkpoint 3 • Presentation schedule – Due Wednesday – Presentations (15 min max) – Note about the value 1.0 – Last 3 classes (week 10 + finals week) – Roundoff error! – Sign up • Email me with 1 st , 2 nd , 3 rd choices • Checkpoint 4 / RenderMan • First come first served. – To be given Wednesday Remember this? Computer Graphics as Virtual Photography real camera photo Photographic Photography: scene (captures processing print light) • Bi-directional Reflectance Function processing = φ θ φ θ BRDF f ( , , , ) r i i r r camera Computer 3D synthetic tone model Graphics: models reproduction image At a given point, gives relative reflected illumination in any (focuses direction with respect to incoming illumination coming from simulated any direction lighting) 1

  2. Illumination Models Phong Model • Illumination model - function or algorithm used to describe the reflective characteristics of a given surface. • More accurately, function or algorithm used to approximate the BRDF. ∑ ∑ = + • + • k ( ) ( S N) ( R V) L V k L k L k L e a a d i i s i i i i ambient diffuse specular Question Texture Mapping • What if Phong (or other) Illumination • Developed in 1974 by Ed Catmull, currently models aren’t good enough? president of Pixar – Texture Mapping – use an image • Goal: Make Phong shading less plastic looking – Procedural Shading – program your own Texture Mapping Texture Mapping - Uses • A means to define surface characteristics of • Surface color - most common an object using an image • Normal vector perturbations (bump mapping) • Mapping a 2D image onto a 3D surface • Reflection • Coordinate spaces in texture mapping – illumination – Texture space (u, v) • specular – Object space (x o ,y o ,z o ) • diffuse – Screen space (x, y) • transparency – environment mapping 2

  3. Texture Mapping Texture Mapping • Key to texture mapping is parameterization – 3D geometry must be expressed as a function of 2 variables, u and v. – Examples: • Planar • Spherical • Bi-cubic patch • Cylindrical Watt Texture Mapping Texture Mapping • Spherical Mapping texture space (u,v) parameterization object space (x o ,y o , z o ) projection screen space (x,y) Texture Mapping What is a texture? • Bi-cubic surfaces • Two Types: – Image file – Mathematically/procedurally generated • Contents: – Made up of texels – Photos shot straight on – E.g., wood grain, marble, patterns 3

  4. Texture mapping Direct Mapping • Simplest form of mapping Photographic Textures • Texture coordinates equal polygon coordinates. (u = x and v = y ) • How to fill? Polygon filling – Same scanline algorithm as CGI – color data pulled from texture array Texture mapping Texture Mapping - Direct Mapping Photographic Textures Texture Mapping - Direct Mapping Texture Mapping - Affine Mapping • Problems: • Stretching and shrinking of the texture is based on the premise of sampling. – Causes texture to be clipped, or entire polygon not filled. • Texture coordinates become necessary • Solution: – Arbitrary mapping of texture coordinates to polygon coordinates – Need an algorithm that stretches & shrinks texture over a polygon. Affine mapping comes • Additional calculations required to the rescue. – dxdy , dudy , dvdy all need to be calculated for each edge. dudx , dvdx for each scanline. 4

  5. Texture Mapping Texture Mapping – Affine Mapping Texture is like a rubber sheet stretched to fit model Watt Texture Mapping - Affine Mapping Texture Mapping – Affine Mapping (Warping) ⎛ ⎞ ⎛ ⎞ x u ⎜ ⎟ ⎜ ⎟ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎜ ⎟ ⎜ ⎟ y Projection Rotation Translatio n v = ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ z Matrix Matrix Matrix n ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎝ ⎠ 1 1 • But this can have different problems due to sampling: – Small textures on large models/polygons tend to become blocky. – Large textures on small models/polygons tend to become grainy. Foley/VanDam(745) Texture Mapping Texture Mapping • Texture Mapping Applets • There are other mappings as well – e.g., cylindrical http://www.cs.brown.edu/exploratories/free – Any mapping from 3D -> 2D will do Software/catalogs/texture_mapping.html Projective Texture 5

  6. Texture Mapping- Bump Mapping Texture mapping – Bump Mapping � Adds roughness to surfaces � Quick way to add detail to an object � Polygon remains physically flat, but appears bumpy Jim Blinn Bump Mapping Theory Bump Mapping Theory • If your eyes see light and dark � bumps • Surfaces angled upward tend to be • Flat surfaces reflect more light brightly lit • Bumpy surfaces reflect less • Downward inclined surfaces tend to be darker Texture Mapping- Bump Mapping Bump Mapping-Theory • Perturbing surface normal • Texture map represents displacements from the normal • Use perturbed normal in illumination model 6

  7. Bump Mapping Texture Mapping • Perlin Dnoise example • Bump Mapping [Perlin85] Normal += Dnoise (point) Bump Mapping Texture Mapping- Environment mapping • Applet • Create an image, representing the reflection of the world onto an object http://users.interfriends.net/maurid/Bump • Use surrounding sphere or box, image is texture map Mapping.htm indexed by direction of reflection ray • Poor-man’s ray tracing - cheaper • Can also be used to do illumination (image-based lighting) Environment Mapping Texture Mapping- Illumination mapping • Not associated with a particular object but with an imaginary surface surrounding the scene – Specular Reflection – indexed by reflected ray – Diffuse - by surface normal – Transparency – refracted ray direction 7

  8. Texture Mapping Texture mapping • Environment mapping Reflection mapping Texture Mapping Texture mapping • Advantages of texture mapping • Aliasing – Easy way to add complexity to a scene – Sampling – images are discrete, not continuous. – Hardware support – Resolution of sampled space (in this case texture map) is not fine enough • Issues: – Aliasing - because of holes or overlaps – Limited resolution (zoom in DOOM effect) – Static image Texture mapping • Aliasing- point sampling in middle of pixel - need more! Texture Mapping – Aliasing Watt 8

  9. Texture Mapping Texture Mapping - Anti-aliasing • Point sample at higher resolution (sometimes very • Aliasing -because of interpolation and perspective difficult) projection – Nearest • Pick the closest texel – Linear • Take an average of surrounding texels – Mip-Mapping • Multiple textures of the same image • Use low pass filter before sampling aliased image anti-aliased image • Can sometimes use stochastic sampling to improve results Texture mapping Texture Mapping • Texture Map Aliasing Applet • Mipmaps – Pre-calculate your texture map at many http://www.nbb.cornell.edu/neurobio/land/ resolutions (or layers) OldStudentProjects/cs490- – Store all “texture layers” in a single image. 96to97/anson/TextureMappingApplet/ – Use “appropriate” layer when performing rendering, interpolating between levels as required: Texture Mapping Texture Mapping • Mipmaps • Mipmaps - dimensions 9

  10. Texture Mapping Texture Mapping – Radiance Maps • Static • Provides approximated radiance values, not simply color info, as a texture. – Texture map image is taken under a single lighting condition • Radiance map not only for the distant scene, but in reflections from objects. – What happens when lighting conditions of the • Radiance in map used in global illumination scene doesn’t match that of your texture? solution • Technique used in Fiat Lux Recent Texture Research Recent Texture Research • 2001 Proceedings • 2003 Proceedings – Illumination & Texture Photorealism: Texture – GraphCut Textures Mapping Progressive Meshes – Wang Tiles – Procedural Modeling: Feature Based Cellular – Synthesis of Progressively Variant Textures on Texturing Arbitrary Surfaces – Point-Based: Surface Splatting – View Dependent Displacement Mapping 10

Recommend


More recommend