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

r i i r r camera Computer 3D synthetic tone model - PDF document

Logistics Checkpoint 2 Texture Mapping Still grading Note on grading Checkpoint 3 Due Monday Project Proposals All should have received e-mail feedback. Logistics Projects Grad students Approx 26-28 projects


  1. Logistics  Checkpoint 2 Texture Mapping  Still grading…  Note on grading  Checkpoint 3  Due Monday  Project Proposals  All should have received e-mail feedback. Logistics Projects  Grad students  Approx 26-28 projects  Listing of projects now on Web  Please send topic of grad report.  Presentation schedule  Presentations (15 min max)  Last 4 classes (week 9 + week 10 + finals week)  Sign up  Email me with 1 st , 2 nd , 3 rd choices  First come first served. 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) 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 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, models aren’t good enough? currently president of Pixar  Texture Mapping – use an image  Goal: Make Phong shading less plastic  Procedural Shading – program your own looking 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 2

  3. Texture Mapping Texture Mapping  Key to texture mapping is texture space (u,v) parameterization parameterization  3D geometry must be expressed as a function of 2 variables, u and v. object space (x o ,y o , z o )  Examples:  Planar projection  Spherical screen space (x,y)  Bi-cubic patch  Cylindrical Texture pipeline Texture pipeline example Akenine-Moller / Haines Akenine-Moller / Haines 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 3

  4. 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 Projector function Projector function – bicubic surfaces  Texture Mapping Applets http://www.cs.brown.edu/exploratories/ freeSoftware/catalogs/texture_mapping. html Watt 4

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

  6. Texture Mapping  Aliasing -because of interpolation and Texture perspective projection Mapping – Aliasing aliased image Watt anti-aliased image Texture Mapping - Anti-aliasing Texture mapping  Texture Map Aliasing Applet  Point sample at higher resolution (sometimes very difficult)  Nearest http://www.nbb.cornell.edu/neurobio/la  Pick the closest texel nd/OldStudentProjects/cs490-  Linear  Take an average of surrounding texels 96to97/anson/TextureMappingApplet/  Mip-Mapping  Multiple textures of the same image  Use low pass filter before sampling  Can sometimes use stochastic sampling to improve results Texture Mapping Mipmapping  Mipmaps  Pre-calculate your texture map at many resolutions (or layers)  Store all “texture layers” in a single image.  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. 6

  7. Texture Mapping Texture pipeline  Mipmaps  Break When we last left our hero Value transform function  Texture maps need not be just plain old RGB.  Texture == data associated with an object  Stored in a 2D array of texels  Value transform function  Transforms data into value usable by the illumination model at the shading point Value Transform functions Texture Mapping- Bump Mapping  Adds roughness to surfaces  Texel data interpretation:  Normal displacement – Bump Mapping  Quick way to add detail to  Transparency Mask – Alpha Mapping an object  Reflection – Environment Mapping  Polygon remains physically  Illumination – Light Mapping flat, but appears bumpy  Specular component – Gloss Mapping  Lighting intensities – Radiance Mapping Jim Blinn 7

  8. Texture Mapping- Bump Mapping Texture mapping – Bump Mapping  Perturbing surface normal  Texture map represents displacements from the normal  Use perturbed normal in illumination model Bump Mapping Theory Bump Mapping-Theory  If your eyes see light and dark  bumps  Flat surfaces reflect more light  Bumpy surfaces reflect less Bump Mapping Texture Mapping  Perlin Dnoise example  Bump Mapping [Perlin85] Normal += Dnoise (point) 8

  9. Alpha Mapping Texture Mapping- Environment mapping  Used to control the transparency.  Create an image, representing the reflection of the world onto an object  Example:  Use surrounding sphere or box, image is texture map indexed by direction of reflection ray  Poor-man’s ray tracing - cheaper 3dimpact.com Environment Mapping Texture Mapping- Environment 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 Texture Mapping Environment Mapping  Environment mapping spherical Cube map 9

  10. Texture mapping Light Mapping Reflection mapping  Texture map that describes illumination (light sources)to apply flipcode.com Gloss Mapping Gloss Mapping  The texture that controls the specular reflection color.  Modulates the the specular reflection and the environment map. ozone3d.net 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  Radiance in map used in global of the scene doesn’t match that of your illumination solution texture?  Technique used in Fiat Lux  A: let’s go to the video tape 10

  11. 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 passes. http://users.interfriends.net/maurid/B umpMapping.htm  Modern hardware supports up to 10 passes on a single frame. 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 11

  12. 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