SI31 Advanced Computer Graphics AGR

Slides:



Advertisements
Similar presentations
Volumes The measure of the amount of space a solid occupies is called the volume of solid.
Advertisements

Objective: Be able to work out the volume of a prism.
Volume of Solids The Sphere The Cone Any Prisms Composite Prisms
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
1GR2-00 GR2 Advanced Computer Graphics AGR Ken Brodlie Lecture 1 - Overview.
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...
16.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 16 – Some Special Rendering Effects.
7.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 7 Polygon Shading Techniques.
1.1 SI31_2001 SI31 Advanced Computer Graphics AGR Ken Brodlie Lecture 1 - Overview.
5.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 5 A Simple Reflection Model.
9.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
SI31 Advanced Computer Graphics AGR
8.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 8 Polygon Rendering.
13.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 13 An Introduction to Ray Tracing.
SI Concept Review 1. What is the SI base unit of measure for:
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Texture Visual detail without geometry. Texture Mapping desire for heightened realism.
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 6, 2014 TEXTURE MAPPING TEXTURES BUMP MAPPING ENVIRONMENT MAPPING PROCEDURAL TEXTURING.
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 12 Solid Textures Bump Mapping Environment Mapping.
18.1 Si31_2001 SI31 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Light Maps What We Did Not Cover Learning More...
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.
Shading, Surfaces & Textures
Prisms and Cylinders. A prism is a polyhedron with exactly 2 congruent parallel faces. The bases are the two congruent parallel faces. Lateral faces are.
Texture Mapping. 2 The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number is insufficient.
Volumes Of Solids. 7cm 5 cm 14cm 6cm 4cm 4cm 3cm 10cm.
Engineering Graphics Stephen W. Crown Ph.D.
Noise and Procedural Techniques John Spitzer Simon Green NVIDIA Corporation.
OBJECTIVE AFTER STUDYING THIS SECTION, YOU WILL BE ABLE TO FIND THE VOLUMES OF RIGHT RECTANGULAR PRISMS AND OTHER PRISMS. YOU WILL BE ABLE TO FIND THE.
1 Secondary Storage Management Submitted by: Sathya Anandan(ID:123)
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.
Digital imaging. Two types of graphic Bitmap Vector.
Geometric Measurements Fundamental Tools for Mathematical Modeling.
Volume learning about. There are three classes of solid that we will look at: Prisms Tapered Solids Spheres.
Volume of Cones Unit 3: Geometric Applications of Exponents.
Kandinsky’s Composition VIII. Is it affective without color?
LESSON 8.4 SURFACE AREAS AND VOLUME OF SIMILAR SOLIDS Advanced Two Chapter 8 Volume and Similar Solids.
Art I. Elements of Art Color Color is the most expressive element of art and is seen by the way light reflects off a surface.
COMPUTER GRAPHICS. Can refer to the number of pixels in a bitmapped image Can refer to the number of pixels in a bitmapped image The amount of space it.
12-3: Volumes of Prisms and Cylinders. V OLUME : the measurement of space within a solid figure Volume is measured in cubic units The volume of a prism.
Module 05 –Bump mapping Module 05 – Bump mapping Module 05 Advanced mapping techniques: Bump mapping.
What is surface area of the composite figure? SA: Cylinder =2πrh+πr^2 =2π(5)(6)+π(25) =60π+25π =85π LA: Cone = r= r =  (5)(13) =65  π+65π=150π.
Surface Area and Volume of Cylinders Mr. Bench PVMS.

Elements of Design.
Powerpoint lesson 3- working with text
ATEC Procedural Animation
ATCM 3310 Procedural Animation
Graphics, Fall 2017 Lecture 24: Texture Mapping
Advanced higher GRAphic communication
Evaluate the integral using the indicated trigonometric substitution {image} {image}
Digital imaging.
Chapter 11.4 Volumes of Prisms and Cylinders
The Elements of Design.
Which of the equations below is an equation of a cone?
Advanced Computer Graphics: Introduction
The Elements of Design.
Industrial Technology Timber Stage 5
(c) McGraw Hill Ryerson 2007
11.4, 11.5 Volumes of Prisms, Cylinders, Pyramids, and Cones
Procedural Animation Lecture 6: Mapping
ATCM 6317 Procedural Animation
IMAGINE Find the area of the base, B, times the height
What is Matter?.
12E, 14B, 14C Cross Sections, Perimeter, and Area
(c) McGraw Hill Ryerson 2007
Computer Graphics, KKU. Lecture 11
Volume Notes 8/27/19.
Presentation transcript:

SI31 Advanced Computer Graphics AGR Lecture 10 Solid Textures Bump Mapping Environment Mapping

Marble Texture

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

texture (u, v, w) = sin (u) sin (v) sin (w) Defining the Texture 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

Example: Wood Texture Wood grain texture can be modelled by a set of concentric cylinders cylinders coloured dark, gaps between adjacent cylinders coloured light U V W texture space radius r = sqrt(u*u + w*w) if radius r = r1, r2, r3, then texture (u,v,w) = dark else texture (u,v,w) = light looking down: cross section view

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

Wood Texture

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

Marble Texture

Using Turbulence for Flame Simulation Flame in 2D region [-b,b] x [0,h] can be modelled as: flame(x,y) = (1-y/h) * flame_col(abs(x/b)) flame_col has max intensity at 0, min at 1 Adding turbulence factor to flame_col gives more realistic effect: flame(x,y) = (1-y/h) * flame_col(abs(x/b)+turb(x))

Animating the Turbulence The noise function, and hence the turbulence function, can be made time-dependent

Bump Mapping This is another texturing technique Aims to simulate a dimpled or wrinkled surface for example, surface of an orange 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’

Bump Mapping

How Does It Work? 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

x=rcos(s); y=rsin(s); z=t Ps = dP(s,t)/ds and Pt = dP(s,t)/dt How It Works - The Maths! 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 Thus a point P on surface can be written P(s,t) where s,t are the parameters The vectors: Ps = dP(s,t)/ds and Pt = dP(s,t)/dt are tangential to the surface at (s,t)

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

N’ = Ps x Pt + bt(Ps x N) + bs(N x Pt) + bsbt(N x N) How it Works - The Maths Thus the perturbed surface normal is: N’ = P’s x P’t or N’ = Ps x Pt + bt(Ps x N) + bs(N x Pt) + bsbt(N x N) But since Ps x Pt = N and N x N = 0, this simplifies to: N’ = N + D where D = bt(Ps x N) + bs(N x Pt) = bs(N x Pt) - bt(N x Ps ) = A - B

Worked Example for a Cylinder P has co-ordinates: Thus: and then x (s,t) = r cos (s) y (s,t) = r sin (s) z (s,t) = t Ps : xs (s,t) = -r sin (s) ys (s,t) = r cos (s) zs (s,t) = 0 Pt : xt (s,t) = 0 yt (s,t) = 0 zt (s,t) = 1 N = Ps x Pt : Nx = r cos (s) Ny = r sin (s) Nz = 0

Worked Example for a Cylinder Then: D = bt(Ps x N) + bs(N x Pt) becomes: and perturbed normal N’ = N + D is: D : bt *0 + bs*r sin (s) = bs*r sin (s) bt *0 - bs*r cos (s) = - bs*r cos (s) bt*(-r2) + bs*0 = - bt*(r2) N’ : r cos (s) + bs*r sin (s) r sin (s) - bs*r cos (s) -bt*r2

Bump Mapping A Bump Map

Bump Mapping Resulting Image

Bump Mapping - Another Example

Bump Mapping Another Example

Bump Mapping Procedurally Defined Bump Map

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

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

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

Environment Mapping Example Environment Mapped Teapot The six views from the teapot

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

Jim Blinn Both bump mapping and environment mapping concepts are due to Jim Blinn Pioneer figure in computer graphics www.research.microsoft.com/~blinn www.siggraph.org/s98/conference/ keynote/slides.html

Acknowledgements Thanks again to Alan Watt for many of the images Flame simulation movie from Josef Pelikan, Charles University Prague Environment mapping examples from Mizutani and Reindel, Japan