CPSC / Texture Mapping

Similar documents
Computer Graphics. - Texturing Methods -

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 5600 Spring

Textures and normals in ray tracing

Complex Features on a Surface. CITS4241 Visualisation Lectures 22 & 23. Texture mapping techniques. Texture mapping techniques

CPSC / Illumination and Shading

Surface Rendering. Surface Rendering

Complex Shading Algorithms

Texture mapping. Computer Graphics CSE 167 Lecture 9

Texturas. Objectives. ! Introduce Mapping Methods. ! Consider two basic strategies. Computação Gráfica

INF3320 Computer Graphics and Discrete Geometry

Einführung in Visual Computing

CS 498 VR. Lecture 19-4/9/18. go.illinois.edu/vrlect19

Announcements. Written Assignment 2 is out see the web page. Computer Graphics

CS 450: COMPUTER GRAPHICS TEXTURE MAPPING SPRING 2015 DR. MICHAEL J. REALE

CS 428: Fall Introduction to. Texture mapping and filtering. Andrew Nealen, Rutgers, /18/2010 1

Texturing Theory. Overview. All it takes is for the rendered image to look right. -Jim Blinn 11/10/2018

Computer Graphics. Illumination Models and Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

Barycentric Coordinates and Parameterization

Lecture 11of 41. Surface Detail 2 of 5: Textures OpenGL Shading

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Chapter 10. Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

CS 130 Final. Fall 2015

The University of Calgary

Texture Mapping. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Texture Mapping. Brian Curless CSE 457 Spring 2016

Computer Graphics I Lecture 11

CS 4620 Midterm, March 21, 2017

Homework #2. Shading, Ray Tracing, and Texture Mapping

Computer Graphics. - Texturing - Philipp Slusallek

CPSC GLOBAL ILLUMINATION

CS 354R: Computer Game Technology

lecture 18 - ray tracing - environment mapping - refraction

CSE 167: Introduction to Computer Graphics Lecture #8: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016

Texture Mapping and Sampling

Ray-Tracing. Misha Kazhdan

Cap. 3 Textures. Mestrado em Engenharia Informática (6931) 1º ano, 1º semestre

The Bricks2D texture has axial projection methods available such as spherical, cubic, planar, front, cylindrical and UV.

+ = To Do. Texture Mapping. Adding Visual Detail. Parameterization. Option: Varieties of projections. Computer Graphics. geometry

+ = To Do. Adding Visual Detail. Texture Mapping. Parameterization. Option: Varieties of projections. Foundations of Computer Graphics (Fall 2012)

Pipeline Operations. CS 4620 Lecture 10

Texture Mapping. Michael Kazhdan ( /467) HB Ch. 14.8,14.9 FvDFH Ch. 16.3, , 16.6

v. T u. Textures. Perlin, SIGGRAPH85. Werner Purgathofer

TEXTURE MAPPING. DVA338 Computer Graphics Thomas Larsson, Afshin Ameri

Homework #2. Shading, Projections, Texture Mapping, Ray Tracing, and Bezier Curves

Lecture 11: Ray tracing (cont.)

CSE 167: Lecture 11: Textures 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

COMP environment mapping Mar. 12, r = 2n(n v) v

Chapter IV Fragment Processing and Output Merging. 3D Graphics for Game Programming

Questions??? Announcements Assignment 3 due today

Textures. Texture coordinates. Introduce one more component to geometry

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

1999, Denis Zorin. Ray tracing

The Viewing Pipeline Coordinate Systems

Geometric Queries for Ray Tracing

CS559 Computer Graphics Fall 2015

Reading. Texture Mapping. Non-parametric texture mapping. Texture mapping. Required. Angel, 8.6, 8.7, 8.9, Recommended

Introduction to Visualization and Computer Graphics

L15 POV-Ray - Part 1

Assignment #2. (Due date: 11/6/2012)

Ray Tracer Due date: April 27, 2011

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Graphics for VEs. Ruth Aylett

Shading, Advanced Rendering. Week 7, Wed Feb 28

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading)

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

9. [20 points] A degree three Bezier curve q(u) has the four control points p 0 = 0,0, p 1 = 2,0, p 2 = 0,2, and p 3 = 4,4.

6.837 Introduction to Computer Graphics Quiz 2 Thursday November 20, :40-4pm One hand-written sheet of notes allowed

Computer Graphics Ray Casting. Matthias Teschner

CS 488. More Shading and Illumination. Luc RENAMBOT

Computer Graphics 1. Chapter 2 (May 19th, 2011, 2-4pm): 3D Modeling. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2011

Illumination and Shading

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

BCC Sphere Transition

Topics and things to know about them:

CSE 167: Introduction to Computer Graphics Lecture #9: Textures. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Curves and Surface I. Angel Ch.10

CS GPU and GPGPU Programming Lecture 11: GPU Texturing 1. Markus Hadwiger, KAUST

Textures Tutorial. Using Cobalt, Xenon, Argon. Copyright Vellum Investment Partners dba Ashlar-Vellum. All rights reserved.

Pipeline Operations. CS 4620 Lecture 14

Texture Mapping. Brian Curless CSE 457 Spring 2015

Computer Graphics 10 - Shadows

Today. Texture mapping in OpenGL. Texture mapping. Basic shaders for texturing. Today. Computergrafik

COMP 175 COMPUTER GRAPHICS. Lecture 11: Recursive Ray Tracer. COMP 175: Computer Graphics April 9, Erik Anderson 11 Recursive Ray Tracer

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Announcements. Mosaics. How to do it? Image Mosaics

Reading. Texture Mapping. Non-parametric texture mapping. Texture mapping. Required. Angel, 8.6, 8.7, 8.9, 8.10,

Texture Mapping. Reading. Implementing texture mapping. Texture mapping. Daniel Leventhal Adapted from Brian Curless CSE 457 Autumn 2011.

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

CPSC 314 LIGHTING AND SHADING

Worksheet 3.5: Triple Integrals in Spherical Coordinates. Warm-Up: Spherical Coordinates (ρ, φ, θ)

Transcription:

CPSC 599.64 / 601.64

Introduction and Motivation so far: detail through polygons & materials example: brick wall problem: many polygons & materials needed for detailed structures inefficient for memory and processing new approach necessary: texture mapping introduced by Ed Catmull (1974), extended by Jim Blinn (1976)

Introduction and Motivation several properties can be modified color: diffuse component of surface reflection: specular component of surface to simulate reflection (environment mapping) normal vector: simulate 3D surface structure (bump mapping) actual surface: raise/lower points to actually modify surface (displacement mapping) transparency: make parts of a surface entirely or to a certain degree transparent

texture: typically 2D pixel image texel: pixel in a texture determines the appearance of a surface procedure to map the texture onto the surface needed easy for single triangle complex for arbitrary 3D surface goal: find easy way to do this mapping

rendering pipeline slightly modified to use new texture mapping function algorithm: for each pixel to be rendered find depicted surface point find point in texture (texel) that corresponds to surface point use texel color to modify the pixel s shading

: Definitions 2D texture: function that maps points on the (u, v) plane to (r, g, b) values: (r, g, b) = c tex (u, v) texture mapping function maps (u, v) values to (x, y, z) positions on objects: (x, y, z) = F map (u, v) we need to solve the inverse function to find (u, v) values for a (x, y, z) position: (u, v) = F map -1 (x, y, z)

: General Procedure general texture mapping pipeline: (x,y) (x,y,z) (u,v) (s,t) determine surface position find texture coordinates find corresponding texel (s,t) possibly more processing (r,g,b) modify illumination (r,g,b) 1. compute texture color for surface point 2. use to modify parameters in Phong illumination

Projector Functions goal: derive texture coordinates from 3D point P: R 3 R 2, so P(x, y, z) = (u, v) several typical possibilities (manual) parameterization of the surface use of inherent (u, v) coordinates (e.g., freeform surfaces or primitive shapes) two step technique

(Manual) Surface Parameterization simplest technique specification of texture coordinates during modeling (u, v) coordinates specified for all vertices of a polygon interpolation between these values for points inside the polygon (e.g. barycentric interpolation for triangles)

Inherent (u, v) Coordinates (u, v) coordinates derived from parameter directions of surface patches (e.g., Bézier and spline patches) obvious (u, v) coordinates derived for primitive shapes (e.g., boxes, spheres, cones, cylinders, etc.) used as defaults

Two Step Approach problem with previous techniques: not flexible enough (inherent coordinates) too tedious (manual parameterization) new idea: texture mapped on simple intermediate surface that has inherent coordinates then transfer onto complex objects common intermediate surfaces: cylinder, sphere, plane, box

Two Step Approach two steps: mapping of 2D texture coordinates onto simple 3D surface (s-mapping) mapping of the now 3D texture pattern onto complex object (o-mapping) in practice inverse approach: mapping of object point onto simple surface O: f(x o, y o, z o ) = (x i, y i, z i ) mapping of surface point onto texture S: f(x i, y i, z i ) = (u, v)

Cylindrical Mapping mapping onto cylinder surface given by height h 0 and angle θ 0 S r 1 ( θ, h) ( u, v) = ( θ θ0 ), ( h h ) c d : 0 using scaling factors c, d, and the radius r discontinuity along one line parallel to center axis from R. Wolfe: Teaching

Spherical Mapping mapping onto surface of a sphere given by spherical coordinates S : ( r, φ, θ ) ( u, v) = θ ( π / 2) + φ, 2π π no non-distorting mapping possible between plane and sphere surface from R. Wolfe: Teaching

Planar Mapping mapping onto planar surface given by position vector v 0 and two vectors s and t S : ( x, y, z) ( u, v) = r r v s k r r v t, k scaling factor k and v = P i v 0 (describes point position w.r.t. the origin of the plane) from R. Wolfe: Teaching

Box Mapping enclosing box is usually axis-parallel bounding box of object six rectangles onto which the texture is mapped similar to planar mapping from R. Wolfe: Teaching

O Mapping: Object to Surface necessary for all named techniques four methods reflected ray: trace a ray from viewer to object and reflect it onto the intermediate surface object normal: intersection of normal vector of object with intermediate surface object center: intersection of ray from object center through the object surface with the intermediate surface normal of intermediate surface: trace this normal vector towards the object and determine intersection with it

O Mapping: Object to Surface

Correspondence Functions projector functions yield (u, v) coordinates in texture parameter space typically values of u and v in [0, 1] correspondence functions transform these into texel positions rotations, translations, scaling possible in most simple cases only scaling necessary

Correspondence Functions problem: what happens outside of [0, 1]? typical approaches texture repetition (tiling) using modulo function texture mirroring better continuity at texture seams clamping: repeat the last value of the texture edges for values outside of [0, 1] border color: use a specified color for all nondefined values

Correspondence Functions from Microsoft Developer Network

Application of Texture Values from an (x, y, z) position we derived an (r, g, b) color value from the texture, potentially with α transparence value is typically used to modify illumination methods: replace: surface color value is replaced with texture color decal: α blending of texture and original color modulate: multiplication of original color value with texture color

done! well, almost...

Sources: Computer Graphics II lecture by Stefan Schlechtweg, Department of Simulation and Graphics, Otto-von-Guericke University of Magdeburg, Germany CPSC 407 and CPSC 453 lectures by Brian Wyvill, Department of Computer Science, University of Calgary, Canada