Image Processing and Computer Graphics. Texture Mapping. Matthias Teschner. Computer Science Department University of Freiburg

Similar documents
Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

INTRODUCTION TO RENDERING TECHNIQUES

CS 4204 Computer Graphics

Software Virtual Textures

Dynamic Resolution Rendering

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

Introduction to Computer Graphics

A Short Introduction to Computer Graphics

Realtime 3D Computer Graphics Virtual Reality

Touchstone -A Fresh Approach to Multimedia for the PC

Optimization for DirectX9 Graphics. Ashu Rege

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

Bildverarbeitung und Mustererkennung Image Processing and Pattern Recognition

Workstation Applications for Windows. NVIDIA MAXtreme User s Guide

Recent Advances and Future Trends in Graphics Hardware. Michael Doggett Architect November 23, 2005

Summed-Area Tables for Texture Mapping

Computer Graphics. Introduction. Computer graphics. What is computer graphics? Yung-Yu Chuang

OpenGL Performance Tuning

Using Photorealistic RenderMan for High-Quality Direct Volume Rendering

Rendering Microgeometry with Volumetric Precomputed Radiance Transfer

Optimizing Unity Games for Mobile Platforms. Angelo Theodorou Software Engineer Unite 2013, 28 th -30 th August

B2.53-R3: COMPUTER GRAPHICS. NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions.

Computer Applications in Textile Engineering. Computer Applications in Textile Engineering

Advanced Computer Graphics. Rendering Equation. Matthias Teschner. Computer Science Department University of Freiburg

Advanced Visual Effects with Direct3D

3D Analysis and Surface Modeling

Radeon HD 2900 and Geometry Generation. Michael Doggett

CUBE-MAP DATA STRUCTURE FOR INTERACTIVE GLOBAL ILLUMINATION COMPUTATION IN DYNAMIC DIFFUSE ENVIRONMENTS

Essential Mathematics for Computer Graphics fast

A Prototype For Eye-Gaze Corrected

High Dynamic Range and other Fun Shader Tricks. Simon Green

Introduction to Computer Graphics. Reading: Angel ch.1 or Hill Ch1.

Scan-Line Fill. Scan-Line Algorithm. Sort by scan line Fill each span vertex order generated by vertex list

Triangle Scan Conversion using 2D Homogeneous Coordinates

2. SPATIAL TRANSFORMATIONS

CSE 564: Visualization. GPU Programming (First Steps) GPU Generations. Klaus Mueller. Computer Science Department Stony Brook University

Data Visualization Using Hardware Accelerated Spline Interpolation

Image Synthesis. Transparency. computer graphics & visualization

Computer Graphics Hardware An Overview

Common Core Unit Summary Grades 6 to 8

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group

GAME ENGINE DESIGN. A Practical Approach to Real-Time Computer Graphics. ahhb. DAVID H. EBERLY Geometrie Tools, Inc.

Introduction to 2D and 3D Computer Graphics Mastering 2D & 3D Computer Graphics Pipelines

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

How To Make A Texture Map Work Better On A Computer Graphics Card (Or Mac)

GPU Shading and Rendering: Introduction & Graphics Hardware

Assessment Anchors and Eligible Content

Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

CASTING CURVED SHADOWS ON CURVED SURFACES. Lance Williams Computer Graphics Lab New York Institute of Technology Old Westbury, New York 11568

Glencoe. correlated to SOUTH CAROLINA MATH CURRICULUM STANDARDS GRADE 6 3-3, , , 4-9

Deferred Shading & Screen Space Effects

Lecture 9: Geometric map transformations. Cartographic Transformations

MATHS LEVEL DESCRIPTORS

Lezione 4: Grafica 3D*(II)

Number Sense and Operations

Calibration Best Practices

Computer-Generated Photorealistic Hair

Image Synthesis. Fur Rendering. computer graphics & visualization

Approval Sheet. Interactive Illumination Using Large Sets of Point Lights

Shadows. Shadows. Thanks to: Frédo Durand and Seth Teller MIT. Realism Depth cue

Self-Positioning Handheld 3D Scanner

Such As Statements, Kindergarten Grade 8

AutoCAD New Icon Quick Reference

Mathematics. Mathematical Practices

Visualization and Feature Extraction, FLOW Spring School 2016 Prof. Dr. Tino Weinkauf. Flow Visualization. Image-Based Methods (integration-based)

Geometric Camera Parameters

521493S Computer Graphics. Exercise 2 & course schedule change

The Essentials of CAGD

GPU(Graphics Processing Unit) with a Focus on Nvidia GeForce 6 Series. By: Binesh Tuladhar Clay Smith

Abstract. These two vectors define a plane tangent to the surface at that point. Their cross product is Recent work in computer graphics has been

How To Understand The Power Of Unity 3D (Pro) And The Power Behind It (Pro/Pro)

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch.

Digital image processing

Summary: Transformations. Lecture 14 Parameter Estimation Readings T&V Sec Parameter Estimation: Fitting Geometric Models

How To Create An Summed Area Table In A Computer Game

PRODUCT LIFECYCLE MANAGEMENT COMPETENCY CENTRE RENDERING. PLMCC, JSS Academy of Technical Education, Noida Rendering 1 of 16

CAMI Education linked to CAPS: Mathematics

GUI GRAPHICS AND USER INTERFACES. Welcome to GUI! Mechanics. Mihail Gaianu 26/02/2014 1

Kankakee Community College

Transformations in the pipeline

A New Approach to Cutting Tetrahedral Meshes

The Future Of Animation Is Games

3D Math Overview and 3D Graphics Foundations

Color correction in 3D environments Nicholas Blackhawk

Interactive visualization of multi-dimensional data in R using OpenGL

Introduction to Graphics Software Development for OMAP 2/3

The Evolution of Computer Graphics. SVP, Content & Technology, NVIDIA

Interactive Computer Graphics

Lecture Notes, CEng 477

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

TEXTURE AND BUMP MAPPING

CSE168 Computer Graphics II, Rendering. Spring 2006 Matthias Zwicker

GPU Architecture. Michael Doggett ATI

Angles that are between parallel lines, but on opposite sides of a transversal.

Solids. Objective A: Volume of a Solids

Transcription:

Image Processing and Computer Graphics Texture Mapping Matthias Teschner Computer Science Department University of Freiburg

Motivation adding per-pixel surface details without raising the geometric complexity of a scene keep the number of vertices and primitives low add detail per fragment detail refers to any property that influences the final radiance, e.g. object or light properties modeling and rendering time is saved by keeping the geometrical complexity low scene without texture [Rosalee Wolfe] University of Freiburg Computer Science Department Computer Graphics - 2 scene with color texture colors can be stored in a texture (represented as an image) and applied to a rendered scene.

Concept 2D textures are represented as 2D images textures can store a variety of properties, i.e. colors, normals positions of texture pixels, i. e. texels, are characterized by texture coordinates (u, v) in texture space texture mapping is a transformation from object space to texture space (x, y, z) (u, v) texture coordinates (u, v) are assigned to a vertex (x, y, z) texture mapping is generally applied per fragment rasterization determines fragment positions and interpolates texture coordinates from adjacent vertices texture lookup is performed per fragment using interpolated texture coordinates University of Freiburg Computer Science Department Computer Graphics - 3

Outline applications concept image texturing University of Freiburg Computer Science Department Computer Graphics - 4

Bump Mapping normals / normal deviations can be stored in a texture object without bump mapping bump texture encodes normals or normal deviations object with bump mapping [Wikipedia: Bump Mapping] University of Freiburg Computer Science Department Computer Graphics - 5

Environment Mapping cube mapping approximates reflections of the environment place a viewer in a scene generate the environment texture from six view directions apply the texture to an object at the position of the viewer [Wikipedia: Cube Mapping] University of Freiburg Computer Science Department Computer Graphics - 6

Light Mapping diffuse object color (color texture) light map (light texture) diffuse reflection component [Keshav Channa: Light Mapping - Theory and Implementation] University of Freiburg Computer Science Department Computer Graphics - 7

Light Mapping scene with color texture scene with color and light texture [Keshav Channa: Light Mapping - Theory and Implementation] University of Freiburg Computer Science Department Computer Graphics - 8

Billboards color texture alpha texture representing transparency billboard: simple primitive with color and alpha mapping [Virtual Terrain Project: www.vterrain.org] University of Freiburg Computer Science Department Computer Graphics - 9

Billboards color and alpha texture billboards at different orientations combined 3D billboard viewed at appropriate directions, a small number of combined 2D billboards provides a realistic 3D impression [Akenine-Moeller et al.: Real-time Rendering] University of Freiburg Computer Science Department Computer Graphics - 10

Outline applications concept image texturing University of Freiburg Computer Science Department Computer Graphics - 11

Texturing Pipeline object space location texture coordinates are defined for object space locations if the object moves in world space, the texture moves along with it projector function maps a 3D object space location to a (2D) parameter-space value corresponder functions map from parameter space to texture space texture-space values are used to obtain values from a texture value transform a function that transforms obtained texture values University of Freiburg Computer Science Department Computer Graphics - 12

Object vs. World Space if the object moves in world space, the texture should move along with it texture coordinates assigned to object space positions texture coordinates assigned to world space positions [Rosalee Wolfe] University of Freiburg Computer Science Department Computer Graphics - 13

Projector Functions a method to generate texture coordinates, i.e. a method for surface parameterization planar projection cylindrical projection spherical projection can be an initialization step for the surface parameterization spherical projection cylindrical projection [Akenine-Moeller et al.: Real-time Rendering] University of Freiburg Computer Science Department Computer Graphics - 14 planar projection

Projector Functions use of different projections for surface patches minimize distortions, avoid artifacts at seams several texture coordinates can be assigned to a single vertex textured object texture University of Freiburg Computer Science Department Computer Graphics - 15

Corresponder Functions one or more corresponder functions transform from parameter space to texture space transform of (u, v) into a valid range from 0 to 1, e.g. repeat (the texture repeats itself, integer value is dropped) mirror (the texture repeats itself, but is mirrored) clamp to edge (values outside [0,1] are clamped to this range) clamp to border (values outside [0,1] are rendered with a border color) [Akenine-Moeller et al.: Real-time Rendering] University of Freiburg Computer Science Department Computer Graphics - 16

Value Transform / Texture Blending Functions value transform arbitrary transformations, e.g. represented by a matrix in homogeneous form, can be applied to texture values texture blending functions define how to use the texture value, e.g. replace the original surface color with the texture color linearly combine the original surface color with the texture multiply, add, subtract surface color and texture color alternatively, texture values can be used in the computation of the illumination model University of Freiburg Computer Science Department Computer Graphics - 17

Outline applications concept image texturing perspective-correct interpolation magnification minification University of Freiburg Computer Science Department Computer Graphics - 18

Image Texturing 2D image is mapped / glued to a triangulated object surface certain aspects affect the quality interpolation of texture coordinates has to consider the nonlinear transformation of the z-component from camera space to clip space in case of perspective projection sampling textures can be change their size when applied to the object (magnification / minification) University of Freiburg Computer Science Department Computer Graphics - 19

Outline applications concept image texturing perspective-correct interpolation magnification minification University of Freiburg Computer Science Department Computer Graphics - 20

Linear vs. Perspective-Correct Interpolation two triangles in the same plane a quadrilateral [Akenine-Moeller et al.: Real-time Rendering] [Heckbert, Moreton] University of Freiburg Computer Science Department Computer Graphics - 21

Perspective-Correct Interpolation Solution u and v are not linearly interpolated instead, u / w clip, v / w clip, and 1 / w clip are interpolated the resulting interpolated values for u / w clip and v / w clip are divided by the interpolated value for 1 / w clip motivated by the fact that linear interpolation with constant offsets is efficient [Akenine-Moeller et al.: Real-time Rendering] University of Freiburg Computer Science Department Computer Graphics - 22

Perspective-Correct Interpolation linear interpolation in camera space non-linear interpolation in screen space Perspective projection of a line AB. t / (1-t) is not equal to s / (1-s). Therefore, linear interpolation between a and b does not correspond to a linear interpolation between A and B. linear interpolation of I / Z and 1 / Z in screen space [Kok-Lim Low: Perspective-Correct Interpolation] University of Freiburg Computer Science Department Computer Graphics - 23

Perspective-Correct Interpolation perspective projection transform linear relation between w in clip space and Z in camera space therefore, Z camera or w clip can be used in the interpolation University of Freiburg Computer Science Department Computer Graphics - 24

Perspective-Correct Interpolation is only an issue for perspective projection for parallel projection, linear interpolation in screen space corresponds to linear interpolation in camera space is not an issue for lines and polygons parallel to the near plane can be applied to all vertex attributes, i.e. color, depth, normal, texture coordinates interp. is commonly based on w clip instead of Z camera Z camera is not available in screen space w clip can be kept when converting from clip to NDC space University of Freiburg Computer Science Department Computer Graphics - 25

Outline applications concept image texturing perspective-correct interpolation magnification minification University of Freiburg Computer Science Department Computer Graphics - 26

Magnification adjacent pixel positions in window space map to the same texel, i.e. pixel position in an image texture texture is magnified [Akenine-Moeller et al.: Real-time Rendering] nearest neighbor (nearest texel) bilinear interpolation (weighted average of 2x2 texels) bicubic interpolation (weighted average of 5x5 texels) University of Freiburg Computer Science Department Computer Graphics - 27

Filtering bilinear interpolation relative position within four adjacent texel positions b (p u, p v ) is interpolated from four texels t (x l, y b ), t (x r, y b ), t (x l, y t ), t (x r, y t ) [Akenine-Moeller et al.: Real-time Rendering] bicubic interpolation University of Freiburg Computer Science Department Computer Graphics - 28

Examples nearest neighbor (nearest texel) bilinear interpolation (weighted average of 2x2 texels) bicubic interpolation (weighted average of 2x2 texels) [Wikipedia: Bicubic interpolation] University of Freiburg Computer Science Department Computer Graphics - 29

Outline applications concept image texturing perspective-correct interpolation magnification minification University of Freiburg Computer Science Department Computer Graphics - 30

Minification adjacent texels map to the same pixel position in window space texture is minimized adjacent pixel positions do not map to adjacent texels (undersampling), which can cause aliasing Undersampling can lead to artifacts, i. e. aliasing, as information from the texture is lost [Rosalee Wolfe] University of Freiburg Computer Science Department Computer Graphics - 31

Filtering nearest neighbor mipmapping summed area tables [Akenine-Moeller et al.: Real-time Rendering] University of Freiburg Computer Science Department Computer Graphics - 32

Mipmapping mip - multum in parvo, many things in a small space a set of smaller, low-pass filtered textures is generated [Rosalee Wolfe] mipmaps can be extended to ripmaps with subtextures of rectangular areas to avoid overblurring University of Freiburg Computer Science Department Computer Graphics - 33

Mipmapping estimation of the texture area covered by a pixel in window space, e. g. by considering the texture coordinates of 2x2 pixels in window space choosing the appropriate subtexture, applying additional filters, i. e. interpolation of texels of two adjacent subtextures. [Rosalee Wolfe] University of Freiburg Computer Science Department Computer Graphics - 34

Summed Area Table reduced overblurring due to the consideration of a more accurate texture area generate a second texture that stores the sum of all texels within the rectangle A, B, C, D is if a pixel in window space covers rectangle A, B, C, D in the texture, the texture value can be, e. g., [Wikipedia: Summed area table] University of Freiburg Computer Science Department Computer Graphics - 35

Summary textures add detail without raising the geom.complexity textures can influence a variety of properties textures can be 1D, 2D, 3D,, or procedural texture coordinates at vertices or fragments are used to lookup texels quality of applied textures can be improved by perspective-correct interpolation considering magnification and minification examples color, alpha, environment mapping, light, bump, parallax, relief mapping, University of Freiburg Computer Science Department Computer Graphics - 36