Paper Summaries Any takers? Texture Mapping Announcement Announcement SIGGRAPH animation screenings Electronic Arts on campus Every Monday 12:30pm -- 2pm Wednesday, Sept 27th (that’s 07-1315 tonight!!!) 6:00pm - 8pm Sponsored by RIT digital studio program Golisano Auditorium (College Imaging Arts and Sciences) and Rochester Chapter of SIGGRAPH. Logistics Projects Checkpoint 2 Approx 22 projects Listing of projects now on Web Due Today!!! Presentation schedule Checkpoint 3 Presentations (15 min max) Due Monday Last 3 classes (week 10 + finals week) Project Proposals Sign up All should have received e-mail feedback. Email me with 1 st , 2 nd , 3 rd choices First come first served. Please address issues (if any) 1
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 tone synthetic 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, 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 2
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 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 3
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
Projector function Projector function – bicubic surfaces Texture Mapping Applets http://www.cs.brown.edu/exploratories/ freeSoftware/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 Portion of the Image Texture Mapping – Applying Transformation x u y Projection Rotation Translatio n v = z Matrix Matrix Matrix n 1 1 Foley/VanDam(745) 5
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 Aliasing -because of interpolation and very difficult) perspective 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
Texture mapping Texture Mapping Mipmaps Texture Map Aliasing Applet Pre-calculate your texture map at many resolutions (or layers) http://www.nbb.cornell.edu/neurobio/la Store all “texture layers” in a single image. nd/OldStudentProjects/cs490- Use “appropriate” layer when performing rendering, interpolating between levels as 96to97/anson/TextureMappingApplet/ 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
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 Transparency Mask – Alpha Mapping object 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 Lighting intensities – Radiance Mapping illumination model at the shading point 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 normal an 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
Bump Mapping-Theory Bump Mapping 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 Not associated with a particular object but the world onto an object with an imaginary surface surrounding the Use surrounding sphere or box, image is texture scene map indexed by direction of reflection ray Specular Reflection – indexed by reflected ray Poor-man’s ray tracing - cheaper Diffuse - by surface normal Transparency – refracted ray direction 9
Environment Mapping Environment Mapping spherical Cube map Texture Mapping Texture mapping Environment mapping Reflection 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. flipcode.com 10
Gloss Mapping Texture Mapping Static Texture map image is taken under a single lighting condition Q: What happens when lighting conditions of the scene doesn’t match that of your texture? A: let’s go to the video tape ozone3d.net Texture pipeline Texture Mapping – Radiance Maps Provides approximated radiance values, not simply color info, as a texture. Radiance map not only for the distant scene, but in reflections from objects. Radiance in map used in global Finally obtained data is applied in illumination solution illumination equation. Technique used in Fiat Lux Layered Texture Mapping Layered Texture Mapping Applet http://users.interfriends.net/maurid/B umpMapping.htm 11
Multipass Texture Rendering Multipass Texture Render Quake III Engine Multiple textures for multiple parts of illumination model rendered on multiple Passes 1-4: accumulating bump map Pass 5: diffuse lighting passes. Pass 6: base texture Modern hardware supports up to 10 Pass 7: Specular passes on a single frame. Pass 8: emissive lighting Pass 9: volumetric effects Pass 10: screen flashes Summary Summary Texturing Pipeline In this lecture, we assumed that textures were pre-generated and saved Advantages of texture mapping in a file Easy way to add complexity to a scene Textures can also be generated on the Hardware support fly using a function or procedure… Issues: But that’s for next time… Aliasing Limited resolution (zoom in DOOM effect) Questions? Static image 12
Recommend
More recommend