Environment Mapping.

Slides:



Advertisements
Similar presentations
Parameterized Environment Maps
Advertisements

Lecture 8 Transparency, Mirroring
Technische Universität München Computer Graphics SS 2014 Graphics Effects Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung.
Virtual Realism TEXTURE MAPPING. The Quest for Visual Realism.
Normal Map Compression with ATI 3Dc™ Jonathan Zarge ATI Research Inc.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Environment Mapping CSE 781 – Roger Crawfis
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 6, 2014 TEXTURE MAPPING TEXTURES BUMP MAPPING ENVIRONMENT MAPPING PROCEDURAL TEXTURING.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
Advanced Texture and Lighting
Texture Mapping CPSC /24/03 Abhijeet Ghosh.
Image-Based Lighting : Computational Photography Alexei Efros, CMU, Fall 2005 © Eirik Holmøyvik …with a lot of slides donated by Paul Debevec.
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
Environmental Maps Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
Environmental Mapping CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Direct Volume Rendering w/Shading via Three- Dimensional Textures.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
Environment Mapping. Examples Fall Motivation Silver candlestick No appropriate texture for it “ environment ” map Simulates the results of ray-tracing.
Reflections Specular reflection is the perfect reflection of light from a surface. The law a reflection states that the direction of the incoming ray and.
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Textures and shadows  Generation  Mipmap  Texture coordinates,
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
Texture Mapping Applications 2. Parallax Mapping with Slope  parallax mapping assumes that the surface is a single plane  a better approximation  surface.
CS 638, Fall 2001 Today Project Stage 0.5 Environment mapping Light Mapping.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Image-Based Lighting © Eirik Holmøyvik …with a lot of slides donated by Paul Debevec CS194: Image Manipulation & Computational Photography Alexei Efros,
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
11/5/2002 (c) University of Wisconsin, CS 559 Last Time Local Shading –Diffuse term –Specular term –All together –OpenGL brief overview.
CSCE 441: Computer Graphics Ray Tracing
Module 06 –environment mapping Module 06 – environment mapping Module 06 Advanced mapping techniques: Environment mapping.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
MP3.. Start at the very beginning. Almost. Either start from nothing yourself, or use the empty template for this MP. Run through the provided files are.
Texture Coordinates CS418 Computer Graphics John C. Hart.
CS 376 Introduction to Computer Graphics 04 / 13 / 2007 Instructor: Michael Eckmann.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics Lecture 26 Mathematics of Lighting and Shading Part II Taqdees A. Siddiqi
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Texturing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Chapter 5. Lighting Computer Graphics (spring, 2009) School of Computer Science University of Seoul.
Geometrical Optics.

Environment Maps Ed Angel Professor Emeritus of Computer Science
Shaders, part 2 alexandri zavodny.
Introduction to Computer Graphics with WebGL
- Introduction - Graphics Pipeline
Texture Mapping.
Computer Graphics Texture Mapping
Image-based Lighting Computational Photography
donated by Paul Debevec
3D Graphics Rendering PPT By Ricardo Veguilla.
The Graphics Rendering Pipeline
So Far We have assumed that we know: The point The surface normal
Chapter 14 Shading Models.
Reflections from Bumpy Surfaces
CSC461: Lecture 23 Shading Computation
Michael Tanaya , Hua ming Chen
© University of Wisconsin, CS559 Fall 2004
Lighting.
Chapter IX Bump Mapping
Chapter XVI Texturing toward Global Illumination
Lesson 14 Key Concepts and Notes
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Introduction to Ray Tracing
Texture Mapping Jung Lee.
Presentation transcript:

Environment Mapping

Examples Fall 2013

Motivation Silver candlestick No appropriate texture for it “environment” map Simulates the results of ray-tracing without going through expensive ray-tracing computation Fall 2013

Reflection Mapping (wikipedia) Standard Environment Mapping in which a single texture contains the image of the surrounding as reflected on a mirror ball Cubic Environment Mapping in which the environment is unfolded onto the six faces of a cube and stored therefore as six square textures. A typical drawback of these techniques is the absence of self reflections: you cannot see any part of the reflected object inside the reflection itself. Fall 2013

What’s available in OpenGL SphereMap Cubemap Fall 2013

Cube Map Encode the environment with a cube map Fall 2013

Overview1/2 The texture is a set of six 2D images representing the faces of a cube. These targets must be consistent, complete, and have equal width and height. The texture coordinate (s,t,r) can be generated with (1) reflection map, or (2) normal map The (s,t,r) texture coordinates are treated as a direction vector emanating from the center of a cube. Fall 2013

Fall 2013

Overview2/2 The interpolated per-fragment (s,t,r) selects one cube face 2D image based on the largest magnitude coordinate (the major axis). A new 2D (s,t) is calculated by dividing the two other coordinates (the minor axes values) by the major axis value. Then the new (s,t) is used to lookup into the selected 2D texture image face of the cube map. Fall 2013

Example: (s,t,r)(s,t) (s,t,r) need not be normalized! y x z (2,0,1) t [1/4,1/2] z t s Major sc tc ma +ry -1 2 s = (-1/2 + 1)/2 = ¼ t = (0/2 + 1)/2 = ½ Fall 2013

Two TexGen Modes REFLECTION_MAP (s,t,r): vertex’s eye-space reflection vector NORMAL_MAP (s,t,r): vertex’s transformed eye-space normal Fall 2013

Reflection Map [Eye Space] ne r Every vertex (fragment) needs to compute the corresponding reflection vector as tex coord. (more accurate but time consuming) Fall 2013

Normal Map ne Use the normal vector (world or eye) to index into the cube map. Quickly get an environment map feel, but not a real reflection. Fall 2013

Cubemap Textures (ref) Debug Snow Red sky Fall 2013

Other Applications of Cube Maps Stable specular highlights A better alternative over massive over tessellation Limited to distant specular lights Fall 2013

Other Applications (cont) Sky illumination Dynamic cube map reflections Per-pixel shading (w/o shader) Fall 2013

Debug Cubemap Settings Front face color Fall 2013

Other Environment Maps Sphere map (OpenGL) View dependent (different sphere map required for different eye position) Authoring texture images is non-obvious (require special image warping) Fall 2013

Spheremap involves the use of a textured sphere infinitely far away from the object that reflects it. By creating a spherical texture using a fisheye lens or via prerendering or with a light probe, this texture is mapped to a hollow sphere, and the texel colors are determined by calculating the light vectors from the points on the object to the texels in the environment map. This technique may produce results which are superficially similar to those produced by raytracing, but incurs less of a performance hit because all of the colors of the points to be referenced are known beforehand, so all it has to do is to calculate the angles of incidence and reflection. There are a few glaring limitations to spherical mapping. For one thing, due to the nature of the texture used for the map, there is an abrupt point of singularity on the backside of objects using spherical mapping. Fall 2013

Sphere Map (from Spec) Fall 2013

Sphere Map Fall 2013

Sphere Map (cont) (x,y,z): the reflection vector r (in eye coord) Fall 2013

GLSL Implementation Fall 2013

Generating Sphere Map Fisheye lens Fall 2013

FishEye Fisheye lens/camera Cheap fisheye PS: Filter/distort/spherize Fall 2013 Cheap fisheye PS: Filter/distort/spherize

Add Specular with Sphere Map Fall 2013

Adding Silhouettes with Sphere Map Fall 2013

[bug?!] Somehow, the results from ShaderMaker is wrong!? The result from OpenGL & glsl is correct Fall 2013