Paper Summaries Logistics One More Announcement Assignments Projects

Total Page:16

File Type:pdf, Size:1020Kb

Paper Summaries Logistics One More Announcement Assignments Projects Paper Summaries • Any takers? Texture Mapping Logistics One more announcement • Job related news • Electronic Arts (EA) is coming to RIT. – Co-op orientation – Looking for a few (actually more than a few) good gaming programmers • Friday, Sept 16th 12:00 – 1:30pm 70-1400 • Friday, Oct 14th 1:00 – 2:30pm Eastman Aud. – EA Company Presentation – Career Fair • Tuesday, October 4th • Wednesday, Sept 28th • 6-7:30pm • 11am – 4pm • Golisano auditorium • Gordon Field House – Interviews th – EA Job offer • Wednesday, October 5 (Career Center) • SIGN UP IF INTERESTED!!! Assignments Projects • Checkpoint 2 • Approx 17 projects – Due today. • Listing of projects now on Web • Checkpoint 3 • Presentation schedule – Due Thursday – Presentations (20 min max) – Roundoff error! – Last 3 classes (week 10 + finals week) – Sign up • Checkpoint 4 / RenderMan • Email me with 1st , 2nd , 3rd choices – To be given Thursday • First come first served. 1 Computer Graphics as Virtual Photography Remember this? real camera photo Photographic Photography: scene (captures processing print light) • Bi-directional Reflectance Function processing BRDF = fr (φi ,θi ,φr ,θ r ) Computer 3D camera tone synthetic Graphics: models model reproduction image At a given point, gives relative reflected illumination in any (focuses simulated direction with respect to incoming illumination coming from lighting) any direction 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. = + • + • ke L(V ) ka La kd ∑i Li (Si N) ks ∑i Li (Ri V) ambient diffuse specular Question Texture Mapping • What if Phong (or other) Illumination models aren’t good enough? • Developed in 1974 by Ed Catmull, currently – Texture Mapping – use an image president of Pixar – Procedural Shading – program your own • Goal: Make Phong shading less plastic 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 (xo,yo,zo) – 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 (xo,yo, zo) •Planar projection • Spherical • Bi-cubic patch screen space (x,y) • Cylindrical Texture pipeline Texture pipeline example Akenine-Moller / Haines Akenine-Moller / Haines 3 Projector function Projector function • Converts 3D point in object space (x,y,z) to • Spherical Mapping 2D point in texture parameter space (u,v) •Examples: – Spherical mapping – Cylindrical mapping – Planar mapping – Parametric surface mapping Projector function – Spherical Mapping Projector function • Cylindrical mapping Texture is like a rubber sheet stretched to fit model Projector function Projector function • Spherical mapping • Bi-cubic surfaces 4 Projector function – bicubic surfaces Projector function • 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 ⎞⎛Translation⎞⎜v ⎟ ⎜ ⎟ = ⎜ ⎟⎜ ⎟⎜ ⎟⎜ ⎟ z ⎝ Matrix ⎠⎝ Matrix ⎠⎝ Matrix ⎠ n ⎜ ⎟ ⎜ ⎟ ⎝1 ⎠ ⎝1 ⎠ Foley/VanDam(745) 5 Texture Mapping – out of range Texture mapping • Aliasing – Sampling – images are discrete, not continuous. – Resolution of sampled space (in this case texture map) is not fine enough Repeat Mirror clamp border (tile) (tile) Texture mapping • Aliasing- point sampling in middle of pixel - need more! Texture Mapping – Aliasing Watt Texture Mapping Texture Mapping - Anti-aliasing • Aliasing -because of interpolation and perspective • Point sample at higher resolution (sometimes very projection difficult) – 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 • Texture Map Aliasing Applet •Mipmaps http://www.nbb.cornell.edu/neurobio/land/ – Pre-calculate your texture map at many 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 – 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 object – Transparency Mask – Alpha Mapping – Stored in a 2D array of texels – Reflection – Environment Mapping • Value transform function – Illumination – Light Mapping – Transforms data into value usable by the – Specular component – Gloss Mapping 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 Texture mapping – Bump Mapping Bump Mapping Theory • 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 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 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. •Demo flipcode.com 10 Texture Mapping Texture Mapping – Radiance Maps • Static • Provides approximated radiance values, not – Texture map image is taken under a single simply color info, as a texture. 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 http://users.interfriends.net/maurid/Bump illumination model rendered on multiple Mapping.htm passes. • Modern hardware supports up to 10 passes on a single frame. 11 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.
Recommended publications
  • Vzorová Prezentace Dcgi
    Textures Jiří Bittner, Vlastimil Havran Textures . Motivation - What are textures good for? MPG 13 . Texture mapping principles . Using textures in rendering . Summary 2 Textures Add Details 3 Cheap Way of Increasing Visual Quality 4 Textures - Introduction . Surface macrostructure . Sub tasks: - Texture definition: image, function, … - Texture mapping • positioning the texture on object (assigning texture coordinates) - Texture rendering • what is influenced by texture (modulating color, reflection, shape) 5 Typical Use of (2D) Texture . Texture coordinates (u,v) in range [0-1]2 u brick wall texel color v (x,y,z) (u,v) texture spatial parametric image coordinates coordinates coordinates 6 Texture Data Source . Image - Data matrix - Possibly compressed . Procedural - Simple functions (checkerboard, hatching) - Noise functions - Specific models (marvle, wood, car paint) 8 Texture Dimension . 2D – images . 1D – transfer function (e.g. color of heightfield) . 3D – material from which model is manufactured (wood, marble, …) - Hypertexture – 3D model of partly transparent materials (smoke, hair, fire) . +Time – animated textures 9 Texture Data . Scalar values - weight, intensity, … . Vectors - color - spectral color 10 Textures . Motivation - What are textures good for? MPG 13 . Texture mapping principles . Using textures in rendering . Summary 11 Texture Mapping Principle Texture application Planar Mapping texture 2D image to 3D surface (Inverse) texture mapping T: [u v] –> Color M: [x y z] –> [u v] M ◦ T: [x y z] –> [u v] –> Color 12 Texture Mapping – Basic Principles . Inverse mapping . Geometric mapping using proxy surface . Environment mapping 13 Inverse Texture Mapping – Simple Shapes . sphere, toroid, cube, cone, cylinder T(u,v) (M ◦ T) (x,y,z) v z v y u u x z z [x, y, z] r r h y β α y x x [u,v]=[0,0.5] [u,v]=[0,0] 14 Texture Mapping using Proxy Surface .
    [Show full text]
  • Digital Lighting and Rendering
    [digital] LIGHTING & RENDERING Third Edition Jeremy Birn Digital Lighting and Rendering, Third Edition Jeremy Birn New Riders www.newriders.com To report errors, please send a note to [email protected] New Riders is an imprint of Peachpit, a division of Pearson Education. Copyright © 2014 Jeremy Birn Senior Editor: Karyn Johnson Developmental Editor: Corbin Collins Copyeditor: Rebecca Rider Technical Editor: Shawn Nelson Production Editor: David VanNess Proofreader: Emily K. Wolman Composition: Maureen Forys, Happenstance Type-O-Rama Indexer: Jack Lewis Interior design: Maureen Forys, Happenstance Type-O-Rama Cover design: Charlene Charles-Will Notice of Rights All rights reserved. No part of this book may be reproduced or transmitted in any form by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. For information on getting permission for reprints and excerpts, contact [email protected]. Notice of Liability The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of the book, neither the author nor Peachpit shall have any liability to any person or entity with respect to any loss or dam- age caused or alleged to be caused directly or indirectly by the instructions contained in this book or by the computer software and hardware products described in it. Trademarks Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Peachpit was aware of a trademark claim, the designations appear as requested by the owner of the trademark.
    [Show full text]
  • Texturing Prof Emmanuel
    Computer Graphics (CS 563) Lecture 2: Advanced Computer Graphics Part 2: Texturing Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Texturing: The Quest for Realism Texturing: Glue n‐dimensional images onto geometrical objects Purpose: more realism, and this is a cheap way to do it Bump mapping Also environment mapping, other effects + = Texture coordinates (0,1) (1,1) (u1,v1) (u2,v2) (0,0) (1,0) (u ,v ) (u,v) in [0,1] 0 0 What if (u,v) >1.0 or <0.0 ? To repeat textures, use just the fractional part Example: 5.3 ‐> 0.3 Repeat, mirror, clamp, border: (2,2) (-1,-1) Projector Function Different ways to project texture onto objects L‐R: spherical, cylinderical, planar and natural Natural? Some shapes have defined mappings (e.g. parametric curved surfaces Hot Research Topic: Parametrization Parametrization in Practice Texture creation and parametrization is an art form Option: Unfold the surface Parametrization in Practice Option: Create a Texture Atlas Break large mesh into smaller pieces Texturing Hardware Note: Textures also accessible from vertex shader on new hardware Texture Magnification 48 x 48 image projected (stretched) onto 320 x 320 pixels Left: Nearest neighbor filter Middle: Bilinear filter (average of 4 nearest texels) Right: Cubic filter (weighted avg. of 5 nearest texels) Texture magnification What does the theory say? sinc(x) is not feasible in real time Box filter (nearest‐neighbor) is Poor quality Texture magnification Tent filter is feasible! Linear interpolation Looks
    [Show full text]
  • Texture Mapping Effects
    CS 543 Computer Graphics Texture Mapping Effects by Cliff Lindsay “Top Ten List” Courtesy of David Letterman’s Late Show and CBS Talk Format List of Texture Mapping Effects from Good to Spectacular (my biased opinion): Highlights: . Define Each Effect . Describe Each Effect Briefly: Theory and Practice. Talk about how each effect extends the idea of general Texture Mapping (previous talk) including Pros and Cons. Demos of selected Texture Mapping Effects 1 Texture Mapping Effect #10 Light Mapping Main idea: Static diffuse lighting contribution for a surface can be captured in a texture and blended with another texture representing surface detail. Highlights: . Eliminate lighting calculation overhead . Light maps are low resolution . Light maps can be applied to multiple textures * = [Images courtesy of flipcode.com] Light Mapping Below is a night scene of a castle. No lighting calculation is being performed at all in the scene. Left: No Light Map applied Right: Light Map applied [Images courtesy of www.gamasutra.com] 2 Texture Mapping Effect #9 Non-Photorealistic Rendering Main idea: Recreating an environment that is focused on depicting a style or communicating a motif as effectively as possible. This is in contrast to Photorealistic which tries to create as real a scene as possible. High lights of NPR: . Toon Shading . Artistic styles (ink, water color, etc.) . Perceptual rendering [Robo Model with and without Toon Shading, Image courtesy of Michael Arias] Non-Photorealistic Rendering Non-Photorealistic Rendering Simple Example: Black
    [Show full text]
  • Shadow Maps, Shadow Volumes & Normal Maps, Bump Mapping
    Computer Graphics (CS 543) Lecture 10b: Soft Shadows (Maps and Volumes), Normal and Bump Mapping Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Shadow Buffer Theory Observation: Along each path from light Only closest object is lit Other objects on that path in shadow Shadow Buffer Method Position a camera at light source. uses second depth buffer called the shadow map Shadow buffer stores closest object on each path (Stores point B) Put camera here Lit In shadow Shadow Map Illustrated Point va stored in element a of shadow map: lit! Point vb NOT in element b of shadow map: In shadow Not limited to planes Shadow Map: Depth Comparison Recall: OpenGL Depth Buffer (Z Buffer) Depth: While drawing objects, depth buffer stores distance of each polygon from viewer Why? If multiple polygons overlap a pixel, only closest one polygon is drawn Depth Z = 0.5 1.0 1.0 1.0 1.0 Z = 0.3 1.0 0.3 0.3 1.0 0.5 0.3 0.3 1.0 0.5 0.5 1.0 1.0 eye Shadow Map Approach Rendering in two stages: Generate/load shadow Map Render the scene Loading Shadow Map Initialize each element to 1.0 Position a camera at light source Rasterize each face in scene updating closest object Shadow map (buffer) tracks smallest depth on each path Put camera here Shadow Map (Rendering Scene) Render scene using camera as usual While rendering a pixel find: pseudo-depth D from light source to P Index location [i][j] in shadow buffer, to be tested Value d[i][j] stored in shadow buffer If d[i][j] < D (other object on this path closer to
    [Show full text]
  • Texture Mapping  Still Grading…
    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 Please send topic of grad report. Listing of projects now on Web Presentation schedule Presentations (15 min max) Last 4 classes (week 9 + week 10 + finals week) Sign up st nd rd Email me with 1 , 2 , 3 choices First come first served. Computer Graphics as Virtual Photography Remember this? real camera photo Photographic Photography: scene (captures processing print light) Bi-directional Reflectance Function processing BRDF = fr ("i ,!i ,"r ,! r ) Computer 3D camera tone synthetic Graphics: models model reproduction image At a given point, gives relative reflected illumination in any (focuses simulated direction with respect to incoming illumination coming from lighting) any direction 1 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. = + • + • ke L(V ) ka La kd ∑i Li (Si N) ks ∑i Li (Ri V) ambient diffuse specular Question Texture Mapping What if Phong (or other) Illumination models aren’t good enough? Developed in 1974 by Ed Catmull, currently president of Pixar Texture Mapping – use an image Procedural Shading – program your own Goal: Make Phong shading less plastic 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 (xo,yo,zo) Screen space (x, y) Watt 2 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.
    [Show full text]
  • Week 9 - Wednesday  What Did We Talk About Last Time?  Textures
    Week 9 - Wednesday What did we talk about last time? Textures . Volume textures . Cube maps . Texture caching and compression . Procedural texturing . Texture animation . Material mapping . Alpha mapping Bump mapping refers to a wide range of techniques designed to increase small scale detail Most bump mapping is implemented per-pixel in the pixel shader 3D effects of bump mapping are greater than textures alone, but less than full geometry Macro-geometry is made up of vertices and triangles . Limbs and head of a body Micro-geometry are characteristics shaded in the pixel shader, often with texture maps . Smoothness (specular color and m parameter) based on microscopic smoothness of a material Meso-geometry is the stuff in between that is too complex for macro- geometry but large enough to change over several pixels . Wrinkles . Folds . Seams Bump mapping techniques are primarily concerned with mesoscale effects James Blinn proposed the offset vector bump map or offset map . Stores bu and bv values at each texel, giving the amount that the normal should be changed at that point Another method is a heightfield, a grayscale image that gives the varying heights of a surface . Normal changes can be computed from the heightfield The results are the same, but these kinds of deformations are usually stored in normal maps . Normal maps give the full 3-component normal change Normal maps can be in world space (uncommon) . Only usable if the object never moves Or object space . Requires the object only to undergo rigid body transforms
    [Show full text]
  • Yafaray User's Guide by Is Licensed Under a Creative Commons Attribution-Share Alike 3.0 Unported License
    The YafaRay User's Guide by www.yafaray.org is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. Permissions beyond the scope of this license may be available at www.yafaray.org. Downloads for various platforms are available on our Downloads Page. Please open a thread in the forum section if you have any question about the YafaRay installation. Installation notes. Table of Contents: • User Prerequisites. • General Workflow. • Windows Installer Notes. • OSX Installation Notes for YafaRay 0.1.1. • Debian packages for Ubuntu. User Prerequisites. It is good to have some previous knowledge about Blender before taking on YafaRay. It will be particularly useful to know about Blender's interface arrangement, Blender lighting features, Blender texturing workflow and general scene handling. Some background on basic lighting & shading techniques will be very helpful to get good results with YafaRay as well. General Workflow • YafaRay works with any Blender official release from blender.org, as long as the binaries used are compiled with the same version of python than YafaRay. • YafaRay uses a python-coded settings interface to set up most of lighting and shading parameters and all rendering settings. Once YafaRay is correctly installed, the settings interface can be launched by an item automatically added in the Blender Render menu, called YafaRay Export. Divide your 3Dwindows and click on the menu item. • To launch rendering, you must use the RENDER buttons located in the settings interface. A separated window will pop up displaying the render progress as it was 1 with the old versions. In this separated interface you can view and save your images.
    [Show full text]
  • Bump Mapping, Parallax, Relief, Alpha, Specular Mapping
    Computer Graphics (CS 543) Lecture 10: Bump Mapping, Parallax, Relief, Alpha, Specular Mapping Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Bump Mapping Bump mapping: examples Bump mapping by Blinn in 1978 Inexpensive way of simulating wrinkles and bumps on geometry Too expensive to model these geometrically Instead let a texture modify the normal at each pixel, and then use this normal to compute lighting = geometry + Bump mapped geometry Bump map Stores heights: can derive normals Use normals of bumpy geometry Bump mapping: Blinn’s method Idea: Distort the surface normal at point to be rendered Option a: Modify normal n along u, v axes to give n’ In texture map, store how much to perturb n (bu and bv) Using bumpmap Look up bu and bv n’ = n + buT + bvB (T and B are tangent and bi-tangent vectors) Note: N’ is not normalized Bump map code similar to normal map code. Just compute, use n’ instead of n Bump mapping: Blinn’s method Option b: Store values of u, v as a heightfield Slope of consecutive columns determines how much changes n along u Slope of consecutive rows determines how much changes n along v Option c (Angel textbook): Encode using differential equations Bump Mapping Vs Normal Mapping Bump mapping Normal mapping (Normals n=(nx , ny , nz) stored as Coordinates of normal (relative to local distortion of face orientation. tangent space) are encoded in Same bump map can be color channels tiled/repeated and reused for Normals stored combines many faces) face orientation + plus
    [Show full text]
  • Environment Mapping (Reflections and Refractions)
    Computer Graphics (CS 543) Lecture 9 (Part 1): Environment Mapping (Reflections and Refractions) Prof Emmanuel Agu (Adapted from slides by Ed Angel) Computer Science Dept. Worcester Polytechnic Institute (WPI) Environment Mapping Used to create appearance of reflective and refractive surfaces without ray tracing which requires global calculations Types of Environment Maps Assumes environment infinitely far away Options: Store “object’s environment as a) Sphere around object (sphere map) b) Cube around object (cube map) N V R OpenGL supports cube maps and sphere maps Cube Map Stores “environment” around objects as 6 sides of a cube (1 texture) Forming Cube Map Use 6 cameras directions from scene center each with a 90 degree angle of view 6 Reflection Mapping eye n y r x z Need to compute reflection vector, r Use r by for lookup OpenGL hardware supports cube maps, makes lookup easier Indexing into Cube Map •Compute R = 2(N∙V)N‐V •Object at origin V •Use largest magnitude component R of R to determine face of cube •Other 2 components give texture coordinates 8 Example R = (‐4, 3, ‐1) Same as R = (‐1, 0.75, ‐0.25) Use face x = ‐1 and y = 0.75, z = ‐0.25 Not quite right since cube defined by x, y, z = ±1 rather than [0, 1] range needed for texture coordinates Remap by s = ½ + ½ y, t = ½ + ½ z Hence, s =0.875, t = 0.375 Declaring Cube Maps in OpenGL glTextureMap2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, level, rows, columns, border, GL_RGBA, GL_UNSIGNED_BYTE, image1) Repeat similar for other 5images (sides) Make 1texture object from 6 images Parameters apply to all six images.
    [Show full text]
  • Real ­ Time Rendering
    Real - Time Rendering Lighting / Shading Michal Červeňanský Juraj Starinský Overview Light Sources Lighting Shading Texturing Alpha Mapping Gloss Mapping Light Mapping Rough Surface 10.03.2010 2 Light Sources Directional light Point light Spot light Colour, intensity 10.03.2010 3 Lighting model Phong model Colour, Intensity Ambient, Diffuse, Specular + + = 10.03.2010 4 Lighting model - ambient Constant colour Light form other surfaces + 10.03.2010 5 Lighting model - diffuse = ⋅ = φ Lambert©s law idiff n l cos + Photons are scattered equally = ⋅ ⊗ i diff (n l)mdiff sdiff 10.03.2010 6 Lighting model - specular The highlight simulation r = −l + 2(n⋅l)n = ⋅ mshi = ρ mshi ispec (r v) (cos ) = ⋅ mshi ⊗ i spec max(0,(r v) )mspec sspec 10.03.2010 7 Lighting model (2) Half vector Speed-up i = iamb + idiff + ispec 10.03.2010 8 Shading Flat, Gouraud, Phong Per - primitive, vertex, fragment 10.03.2010 9 Shading (2) Tessellation is important 10.03.2010 10 Texturing Light Sources Lighting Shading Texturing − Texture mapping − Texture settings − Texture filtering Alpha Mapping Environment Mapping Gloss Mapping 10.03.2010 ... 11 Texture mapping 1D, 2D, 3D, Cube Texture transformations Texture projections (spherical, cylindrical, planar, natural) 10.03.2010 12 Texture settings Wrap modes (repeat, mirror, clamp, border) Compression (DXT, S3C, ¼) Multi-texturing 10.03.2010 13 Texture filtering Nearest Linear ± (tri/bi)linear interpolation Bi-cubic ± ATI or shaders Nearest Linear Catmul-Rom CubicBSpline 10.03.2010 14 Texture filtering (2) Mipmapping ± minification − Down sampled textures to half − Memory requirements 133% − d = log2(sqrt(A)) − Trilinear filtering (interpolation) 10.03.2010 15 Texture filtering (3) Anisotropic − < 16 samples − Vertical, horizontal 10.03.2010 16 Alpha mapping Billboards Transp.
    [Show full text]
  • Texture Mapping Effects
    CS 563 Advanced Topics in Computer Graphics Texture Mapping Effects by Cliff Lindsay “Top Ten List” Courtesy of David Letterman’s Late Show and CBS Talk Format List of Texture Mapping Effects from Good to Spectacular (my biased opinion): Highlights: Define Each Effect Describe Each Effect Briefly: Theory and Practice. Talk about how each effect extends the idea of general Texture Mapping (previous talk) including Pros and Cons. Demos of selected Texture Mapping Effects Texture Mapping Effect #10 Light Mapping Main idea: Static diffuse lighting contribution for a surface can be captured in a texture and blended with another texture representing surface detail. High lights: Eliminate lighting calculation overhead Light maps are low resolution Light maps can be applied to multiple textures * = [Images courtesy of flipcode.com] Light Mapping Below is a night scene of a castle. No lighting calculation is being performed at all in the scene. Left: No Light Map applied Right: Light Map applied [Images courtesy of www.gamasutra.com] Texture Mapping Effect #9 Non-Photorealistic Rendering Main idea: Recreating an environment that is focused on depicting a style or communicates a motif as effectively as possible. This is in contrast to Photorealistic which tries to create as real a scene as possible. High lights of NPR: Toon Shading Artistic styles (ink, water color, etc.) Perceptual rendering [Robo Model with and without Toon Shading, Image courtesy of Michael Arias] Non-Photorealistic Rendering Non-Photorealistic Rendering Simple Example:
    [Show full text]