paper summaries
play

Paper Summaries Any takers? Texture Mapping Logistics One more - PDF document

Paper Summaries Any takers? Texture Mapping Logistics One more announcement Electronic Arts (EA) is coming to RIT. Job related news Looking for a few (actually more than a few) good Co-op orientation gaming programmers


  1. Paper Summaries • Any takers? Texture Mapping Logistics One more announcement • Electronic Arts (EA) is coming to RIT. • Job related news – Looking for a few (actually more than a few) good – Co-op orientation gaming programmers • Friday, Sept 16 th 12:00 – 1:30pm 70-1400 • Friday, Oct 14 th 1:00 – 2:30pm Eastman Aud. – EA Company Presentation – Career Fair • Tuesday, October 4 th • Wednesday, Sept 28 th • 6-7:30pm • Golisano auditorium • 11am – 4pm – Interviews • Gordon Field House • Wednesday, October 5 th (Career Center) – EA Job offer • SIGN UP IF INTERESTED!!! Assignments Projects • Approx 17 projects • Checkpoint 2 • Listing of projects now on Web – Due today. • Presentation schedule • Checkpoint 3 – Presentations (20 min max) – Due Thursday – Last 3 classes (week 10 + finals week) – Roundoff error! – Sign up • Checkpoint 4 / RenderMan • Email me with 1 st , 2 nd , 3 rd choices – To be given Thursday • First come first served. 1

  2. 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 image reproduction At a given point, gives relative reflected illumination in any (focuses direction with respect to incoming illumination coming from simulated any direction lighting) 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 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 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 2

  3. Texture Mapping Texture Mapping • A means to define surface characteristics of an object using an image • Mapping a 2D image onto a 3D surface • Coordinate spaces in texture mapping – Texture space (u, v) – Object space (x o ,y o ,z o ) – Screen space (x, y) Watt Texture Mapping Texture Mapping • Key to texture mapping is parameterization texture space (u,v) – 3D geometry must be expressed as a function parameterization of 2 variables, u and v. – Examples: object space (x o ,y o , z o ) • Planar projection • Spherical • Bi-cubic patch screen space (x,y) • Cylindrical Texture pipeline Texture pipeline example Akenine-Moller / Haines Akenine-Moller / Haines 3

  4. Projector function Projector function • Spherical Mapping • Converts 3D point in object space (x,y,z) to 2D point in texture parameter space (u,v) • Examples: – Spherical mapping – Cylindrical mapping – Planar mapping – Parametric surface mapping Projector function Projector function – Spherical Mapping • Cylindrical mapping Texture is like a rubber sheet stretched to fit model Projector function Projector function • Spherical mapping • Bi-cubic surfaces 4

  5. Projector function Projector function – bicubic surfaces • Texture Mapping Applets http://www.cs.brown.edu/exploratories/free Software/catalogs/texture_mapping.html Watt Corresponder function Texture Mapping - Direct Mapping • Converts from texture parameter space (u, v) to texel space. – Controls the way an image is applied – Examples: • Direct mapping • Use a portion of an image • Apply transforms • Out of range transforms Texture Mapping – Using a Texture Mapping – Applying Transformation Portion of the Image ⎛ ⎞ ⎛ ⎞ x u ⎜ ⎟ ⎜ ⎟ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎜ ⎟ ⎜ ⎟ y Projection Rotation Translatio n v = ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ z Matrix Matrix Matrix n ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠ ⎝ ⎠ 1 1 Foley/VanDam(745) 5

  6. Texture mapping Texture Mapping – out of range • Aliasing – Sampling – images are discrete, not continuous. – Resolution of sampled space (in this case texture map) is not fine enough Mirror clamp border Repeat (tile) (tile) Texture mapping • Aliasing- point sampling in middle of pixel - need more! Texture Mapping – Aliasing Watt 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 6

  7. Texture mapping Texture Mapping • Texture Map Aliasing Applet • Mipmaps – Pre-calculate your texture map at many resolutions (or http://www.nbb.cornell.edu/neurobio/land/ 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 – Mip == “multum in parvo” • Latin for “many things in a small space” – Native support in hardware. Mipmapping Texture Mapping • Mipmaps Texture pipeline When we last left our hero • Break 7

  8. Value transform function Value Transform functions • Texture maps need not be just plain old • Texel data interpretation: RGB. – Normal displacement – Bump Mapping • Texture == data associated with an object – Transparency Mask – Alpha Mapping – Reflection – Environment Mapping – Stored in a 2D array of texels – Illumination – Light Mapping • Value transform function – Specular component – Gloss Mapping – Transforms data into value usable by the illumination model at the shading point – Lighting intensities – Radiance Mapping Texture Mapping- Bump Mapping Texture Mapping- Bump Mapping • Perturbing surface normal � Adds roughness to surfaces • Texture map represents displacements from the � Quick way to add detail to an normal object • Use perturbed normal in illumination model � Polygon remains physically flat, but appears bumpy Jim Blinn Bump Mapping Theory Texture mapping – Bump Mapping • If your eyes see light and dark � bumps • Flat surfaces reflect more light • Bumpy surfaces reflect less 8

  9. Bump Mapping Bump Mapping-Theory • Perlin Dnoise example [Perlin85] Normal += Dnoise (point) Texture Mapping Alpha Mapping • Bump Mapping • Used to control the transparency. • Example: 3dimpact.com Texture Mapping- Environment mapping Texture Mapping- Environment mapping • Create an image, representing the reflection of the • Not associated with a particular object but with world onto an object an imaginary surface surrounding the scene • Use surrounding sphere or box, image is texture map – Specular Reflection – indexed by reflected ray indexed by direction of reflection ray – Diffuse - by surface normal • Poor-man’s ray tracing - cheaper – Transparency – refracted ray direction 9

  10. Environment Mapping Environment Mapping spherical Cube map Texture Mapping Texture mapping Reflection mapping • Environment mapping Light Mapping Gloss Mapping • Texture map that describes illumination • The texture that controls the specular (light sources)to apply reflection color. • Modulates the the specular reflection and the environment map. • Demo flipcode.com 10

  11. 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. – Q: What happens when lighting conditions of • Radiance in map used in global illumination the scene doesn’t match that of your texture? solution – A: let’s go to the video tape • Technique used in Fiat Lux Texture pipeline Layered Texture Mapping • Finally obtained data is applied in illumination equation. Layered Texture Mapping Multipass Texture Rendering • Applet • Multiple textures for multiple parts of illumination model rendered on multiple http://users.interfriends.net/maurid/Bump passes. Mapping.htm • Modern hardware supports up to 10 passes on a single frame. 11

  12. Multipass Texture Render Summary • Quake III Engine • Texturing Pipeline – Passes 1-4: accumulating bump map • Advantages of texture mapping – Pass 5: diffuse lighting – Easy way to add complexity to a scene – Pass 6: base texture – Hardware support – Pass 7: Specular • Issues: – Pass 8: emissive lighting – Aliasing – Pass 9: volumetric effects – Limited resolution (zoom in DOOM effect) – Pass 10: screen flashes – Static image Summary • In this lecture, we assumed that textures were pre-generated and saved in a file • Textures can also be generated on the fly using a function or procedure… – But that’s for next time… • Questions? 12

Recommend


More recommend