1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 12 Solid Textures Bump Mapping Environment Mapping.

Slides:



Advertisements
Similar presentations
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
Advertisements

1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...
GR2 Advanced Computer Graphics AGR
16.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 16 – Some Special Rendering Effects.
SI31 Advanced Computer Graphics AGR
9.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
SI31 Advanced Computer Graphics AGR
13.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 13 An Introduction to Ray Tracing.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
03/16/2009Dinesh Manocha, COMP770 Texturing Surface’s texture: its look & feel Graphics: a process that takes a surface and modifies its appearance using.
Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering.
3D Graphics Rendering and Terrain Modeling
Computer Graphics Bing-Yu Chen National Taiwan University.
Eyes for Relighting Extracting environment maps for use in integrating and relighting scenes (Noshino and Nayar)
1 Computer Graphics By : Mohammed abu Lamdy ITGD3107 University of Palestine Supervision: Assistant Professor Dr. Sana’a Wafa Al-Sayegh.
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 6, 2014 TEXTURE MAPPING TEXTURES BUMP MAPPING ENVIRONMENT MAPPING PROCEDURAL TEXTURING.
18.1 Si31_2001 SI31 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Light Maps What We Did Not Cover Learning More...
HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield1 Texturing Based on 3D Rendering, Humphreys, G., University of Virginia, 2004.
(conventional Cartesian reference system)
Texture Mapping from Watt, Ch. 8 Jonathan Han. Topics Discussed Texture Map to Models Bump Maps, Light Maps Environment (Reflection) Mapping 3D Textures.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Texture Mapping.
Texture Mapping April 9, The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
Environmental Mapping CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Direct Volume Rendering w/Shading via Three- Dimensional Textures.
Shading, Surfaces & Textures
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
1 Texture. 2 Overview Introduction Painted textures Bump mapping Environment mapping Three-dimensional textures Functional textures Antialiasing textures.
Computer Graphics Inf4/MSc Computer Graphics Lecture 7 Texture Mapping, Bump-mapping, Transparency.
1 Perception and VR MONT 104S, Spring 2008 Lecture 22 Other Graphics Considerations Review.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
COMP 175: Computer Graphics March 24, 2015
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Computer Visualization BIM Curriculum 03. Topics  History  Computer Visualization Methods  Visualization Workflow  Technology Background.
ECSE 4750: Computer Graphics Rensselaer Polytechnic Institute Nov 5, 2012 Texture and Texture Mapping.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Texture Mapping.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 1 Shading (Shading) & Smooth Shading Graphics.
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
Texture Mapping Applications 2. Parallax Mapping with Slope  parallax mapping assumes that the surface is a single plane  a better approximation  surface.
June 9, 2008 Dr. Haim Levkowitz IVPR/CS/UML | 1 Texture.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
Business and Computing Deanery 3D Modelling Tools Week 18 More on materials.
1 Texture Mapping. 2 Texture Aliasing MIPmaps Environment Mapping Bump Mapping Displacement Mapping Shadow Maps Solid Textures Antialiasing.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Introduction to 3D Graphics Lecture 2: Mathematics of the Simple Camera Anthony Steed University College London.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Course Introduction to virtual engineering Óbuda University John von Neumann Faculty of Informatics Institute of Applied Mathematics Lecture and laboratory.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.
Written by: Itzik Ben Shabat Technion - Israel Institute of Technology Faculty of Mechanical Engineering Laboratory for CAD & Lifecycle Engineering Lab.
Module 06 –environment mapping Module 06 – environment mapping Module 06 Advanced mapping techniques: Environment mapping.
CS552: Computer Graphics Lecture 33: Illumination and Shading.
CS 376 Introduction to Computer Graphics 04 / 13 / 2007 Instructor: Michael Eckmann.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
CSE 681 Texture Mapping: Solid Texturing. CSE 681 Texture Mapping Visual complexity on demand Vary display properties over object Location on object used.

3D Graphics Rendering PPT By Ricardo Veguilla.
So Far We have assumed that we know: The point The surface normal
Chapter 10: Computer Graphics
Basics Texture Map Setup
Texture Mapping: Solid Texturing
CS-378: Game Technology Lecture #4: Texture and Other Maps
Illumination and Shading
Computer Graphics Material Colours and Lighting
Texture Mapping: Solid Texturing
Presentation transcript:

1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 12 Solid Textures Bump Mapping Environment Mapping

2GR2-00 Marble Texture

3GR2-00 Solid Texture n A difficulty with 2D textures is the mapping from the object surface to the texture image – ie constructing f u (x,y,z) and f v (x,y,z) solid n This is avoided in 3D, or solid, texturing – texture now occupies a volume – can imagine object being carved out of the texture volume U V W texture space X Y Z object space Mapping functions trivial: u = x; v = y; w = z

4GR2-00 Defining the Texture n The texture volume itself is usually defined procedurally – ie as a function that can be evaluated, such as: texture (u, v, w) = sin (u) sin (v) sin (w) – this is because of the vast amount of storage required if it were defined by data values

5GR2-00 Example: Wood Texture n Wood grain texture can be modelled by a set of concentric cylinders – cylinders coloured dark, gaps between adjacent cylinders coloured light radius r = sqrt(u*u + w*w) if radius r = r 1, r 2, r 3, then texture (u,v,w) = dark else texture (u,v,w) = light looking down: cross section view U V W texture space

6GR2-00 Example: Wood Texture n It is a bit more interesting to apply a sinusoidal perturbation – radius:= radius + 2 * sin( 20*  ), with 0<  <2  n.. and a twist along the axis of the cylinder – radius:= radius + 2 * sin( 20*  + v/150 ) n This gives a realistic wood texture effect

7GR2-00 Wood Texture

8GR2-00 How to do Marble? n First create noise function (in 1D): – noise [i] = random numbers on lattice of points n Next create turbulence: – turbulence (x) = noise(x) + 0.5*noise(2x) *noise(4x) + … n Marble created by: – basic pattern: marble (x) = marble_colour (sin (x) ) – with turbulence: marble (x) = marble_colour (sin (x + turbulence (x) ) )

9GR2-00 Marble Texture

10GR2-00 Bump Mapping n This is another texturing technique n Aims to simulate a dimpled or wrinkled surface – for example, surface of an orange trick n Like Gouraud and Phong shading, it is a trick – surface stays the same – but the true normal is perturbed, or jittered, to give the illusion of surface ‘bumps’

11GR2-00 Bump Mapping

12GR2-00 How Does It Work? n Looking at it in 1D: original surface P(u) bump map b(u) add b(u) to P(u) in surface normal direction, N(u) new surface normal N’(u) for reflection model

13GR2-00 How It Works - The Maths! n Any 3D surface can be described in terms of 2 parameters – eg cylinder of fixed radius r is defined by parameters (s,t) x=rcos(s); y=rsin(s); z=t n Thus a point P on surface can be written P(s,t) where s,t are the parameters n The vectors: P s = dP(s,t)/ds and P t = dP(s,t)/dt are tangential to the surface at (s,t)

14GR2-00 How it Works - The Maths n Thus the normal at (s,t) is: N = P s x P t n Now add a bump map to surface in direction of N: P’(s,t) = P(s,t) + b(s,t) N n To get the new normal we need to calculate P’ s and P’ t P’ s = P s + b s N + b N s approx P’ s = P s + b s N - because b small n P’ t similar – P’ t = P t + b t N

15GR2-00 How it Works - The Maths n Thus the perturbed surface normal is: N’ = P’ s x P’ t or N’ = P s x P t + b t (P s x N) + b s (N x P t ) + b s b t (N x N) n But since – P s x P t = N and N x N = 0, this simplifies to: N’ = N + D – where D = b t (P s x N) + b s (N x P t ) = b s (N x P t ) - b t (N x P s ) = A - B

16GR2-00 Worked Example for a Cylinder n P has co-ordinates: n Thus: n and then x (s,t) = r cos (s) y (s,t) = r sin (s) z (s,t) = t P s : x s (s,t) = -r sin (s) y s (s,t) = r cos (s) z s (s,t) = 0 P t : x t (s,t) = 0 y t (s,t) = 0 z t (s,t) = 1 N = P s x P t :Nx = r cos (s) Ny = r sin (s) Nz = 0

17GR2-00 Worked Example for a Cylinder n Then: D = b t (P s x N) + b s (N x P t ) becomes: n and perturbed normal N’ = N + D is: D : b t *0 + b s *r sin (s)= b s *r sin (s) b t *0 - b s *r cos (s)= - b s *r cos (s) b t *(-r 2 ) + b s *0= - b t *(r 2 ) N’ :r cos (s) + b s *r sin (s) r sin (s) - b s *r cos (s) -b t *r 2

18GR2-00 Bump Mapping A Bump Map

19GR2-00 Bump Mapping Resulting Image

20GR2-00 Bump Mapping - Another Example

21GR2-00 Bump Mapping Another Example

22GR2-00 Bump Mapping Procedurally Defined Bump Map

23GR2-00 Environment Mapping n This is another famous piece of trickery in computer graphics n Look at a highly reflective surface – what do you see? – does the Phong reflection model predict this? n Phong reflection is a local illumination model – does not convey inter-object reflection – global illumination methods such as ray tracing and radiosity provide this n.. but can we cheat?

24GR2-00 Environment Mapping - Recipe n Place a large cube around the scene with a camera at the centre environment map n Project six camera views onto faces of cube - known as an environment map camera projection of scene on face of cube - environment map

25GR2-00 Environment Mapping - Rendering n When rendering a shiny object, calculate the reflected viewing direction (called R earlier) n This points to a colour on the surrounding cube which we can use as a texture when rendering eye point environment map

26GR2-00 Environment Mapping - Limitations n Obviously this gives far from perfect results - but it is much quicker than the true global illumination methods (ray tracing and radiosity) n It can be improved by multiple environment maps (why?) - one per key object reflection mapping n Also known as reflection mapping n Can use sphere rather than cube

27GR2-00 Environment Mapping

28GR2-00 Environment Mapping

29GR2-00 Jim Blinn n Both bump mapping and environment mapping concepts are due to Jim Blinn n Pioneer figure in computer graphics keynote/slides.html