lecture14-2

lecture14-2 - CS 445 / 645 Introduction to Computer...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 445 / 645 Introduction to Computer Graphics Lecture 14 Assign 3 Assignment 3 - Morphing What is morphing? • Combination of warping and blending – warp = image distortion Map image to a coke can Ripple effect – blend = cross dissolve Film cut effect Ways to morph 3D Techniques • Interpolate between corresponding vertices – Models must align somehow – Polygon transformations may look odd 2D Techniques • Cross-dissolve – • Difficult to align Pixelize the images and move the “tiles” – Tile paths must be determined somehow Beier-Neely Morphing Simple / effective morphing • User identifies key features with line segments • Everything else is automatic Assignment 3 - Morphing How do we explain this? Step 1 – Interpolate endpoints Interpolate between lines S1 S2 and F1 F2 F2 I1 S1 (0,0) S2 ½ S1+ ½ F1 F1 (0,0) How would start image morph? What is color from start image at X in intermediate image? F2 X S1 (0,0) S2 I2 I1 F1 (0,0) Build Common Coordinate System Find projection F2 X S1 (0,0) u S2 u = (X – I1).dot.(I2 – I1) / ||( I2 – I1) || I2 I1 F1 (0,0) Build Common Coordinate System Find projection on perpendicular F2 X I2 v S1 (0,0) S2 I1 F1 (0,0) v = (X – I1).dot.Perp(I2 – I1) || (I2 – I1) || Find Projection Sample color from initial image F2 X=(u,v) X’=(u,v) S1 (0,0) S2 I2 I1 F1 (0,0) Repeat for all pixels in image F2 I2 S1 (0,0) u S2 I1 F1 (0,0) Now do the same thing for the final image F2 I2 S1 (0,0) S2 I1 F1 (0,0) Now do a 50/50 blend of two warped images Final Movie Extra factors… What about more than one line? I4 S4 F4 F2 F3 (0,0) F1 S3 I2 I3 S1 (0,0) S2 I1 More than one line Compute pixel color from initial image for each line and average (weighted) I4 S4 F4 F2 F3 (0,0) F1 S3 I2 I3 S1 (0,0) S2 I1 Weighting of multiple points A point’s weight • Should be strongest on the line and weaker as moved away à !b p weight length a dist • length = length of line – Longer lines have more influence • dist = distance from pixel to line More than one line Solving the Lighting Problem • We somewhat understand the perception of light (color) • We engineered a solution to representing and generating We color using computers color • We need to understand the interplay of light and objects Optical Illusion Lighting Remember, we know how to rasterize Remember, rasterize • Given a 3-D triangle and a 3-D viewpoint, we know which Given pixels represent the triangle pixels But what color should those pixels be? Lighting If we’re attempting to create a realistic image, If we need to simulate the lighting of the surfaces lighting in the scene in • Fundamentally simulation of physics and optics Fundamentally physics optics • As you’ll see, we use a lot of approximations (a.k.a As perceptually based hacks) to do this simulation fast enough perceptually Definitions Illumination: the transport of energy from light sources to surfaces & points to • Note: includes direct and indirect illumination Note: direct indirect illumination Images by Henrik Wann Jensen Definitions Lighting: the process of computing the luminous intensity (i.e., outgoing light) at a particular 3-D point, usually on a surface point, Shading: the process of assigning colors to pixels the (why the distinction?) Definitions Illumination models fall into two categories: • Empirical: simple formulations that approximate observed phenomenon • Physically based: models based on the actual physics of light models interacting with matter interacting We mostly use empirical models in interactive graphics We for simplicity for Increasingly, realistic graphics are using physically Increasingly, based models Components of Illumination Two components of illumination: light sources and surface Two light properties properties Light sources (or emitters) Light emitters • Spectrum of emittance (i.e., color of the light) • Geometric attributes – Position Direction – Shape • Directional attenuation • Polarization Components of Illumination Surface properties • Reflectance spectrum (i.e., color of the surface) • Subsurface reflectance • Geometric attributes – Position – Orientation – Micro-structure ...
View Full Document

This note was uploaded on 01/23/2012 for the course CS 445 taught by Professor Bloomfield,a during the Spring '08 term at UVA.

Ask a homework question - tutors are online