Some Tutorial about the Project. Computer Graphics

Similar documents
Scan Conversion & Shading

Scan Conversion & Shading

Barycentric Coordinates. From: Mean Value Coordinates for Closed Triangular Meshes by Ju et al.

Surface Mapping One. CS7GV3 Real-time Rendering

Computer Graphics. Lecture 8 Antialiasing, Texture Mapping

Computer Animation and Visualisation. Lecture 4. Rigging / Skinning

Reading. 14. Subdivision curves. Recommended:

Monte Carlo Rendering

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

Real-time. Shading of Folded Surfaces

Interactive Rendering of Translucent Objects

Complex Filtering and Integration via Sampling

2x x l. Module 3: Element Properties Lecture 4: Lagrange and Serendipity Elements

High resolution 3D Tau-p transform by matching pursuit Weiping Cao* and Warren S. Ross, Shearwater GeoServices

3D vector computer graphics

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Caching. Irradiance Calculation. Advanced Computer Graphics (Fall 2009)

X-Ray Rendering. Other Rendering Techniques: Points, Splats, Shear-Warp. X-Ray Point Splatting. X-Ray Rendering. CSE 564: Visualization

Computer Graphics. - Spline and Subdivision Surfaces - Hendrik Lensch. Computer Graphics WS07/08 Spline & Subdivision Surfaces

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Calculation. Irradiance Caching. Advanced Computer Graphics (Fall 2009)

Outline. Discriminative classifiers for image recognition. Where in the World? A nearest neighbor recognition example 4/14/2011. CS 376 Lecture 22 1

Harmonic Coordinates for Character Articulation PIXAR

Realistic and Detail Rendering of Village Virtual Scene Based on Pixel Offset

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision

An Accurate Evaluation of Integrals in Convex and Non convex Polygonal Domain by Twelve Node Quadrilateral Finite Element Method

Steps for Computing the Dissimilarity, Entropy, Herfindahl-Hirschman and. Accessibility (Gravity with Competition) Indices

Computer Generated Integral Imaging (II) System Using Depth-Camera

Improvement of Spatial Resolution Using BlockMatching Based Motion Estimation and Frame. Integration

Color in OpenGL Polygonal Shading Light Source in OpenGL Material Properties Normal Vectors Phong model

Simulation: Solving Dynamic Models ABE 5646 Week 11 Chapter 2, Spring 2010

Recognizing Faces. Outline

An efficient method to build panoramic image mosaics

Loop Transformations, Dependences, and Parallelization

A Binarization Algorithm specialized on Document Images and Photos

Ecient Computation of the Most Probable Motion from Fuzzy. Moshe Ben-Ezra Shmuel Peleg Michael Werman. The Hebrew University of Jerusalem

What are the camera parameters? Where are the light sources? What is the mapping from radiance to pixel color? Want to solve for 3D geometry

Lecture #15 Lecture Notes

Simplification of 3D Meshes

Angle-Independent 3D Reconstruction. Ji Zhang Mireille Boutin Daniel Aliaga

Parallelism for Nested Loops with Non-uniform and Flow Dependences

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

Monte Carlo 1: Integration

Accounting for the Use of Different Length Scale Factors in x, y and z Directions

Model-Based Bundle Adjustment to Face Modeling

Model Clipping Triangle Strips and Quad Meshes.

Global Illumination and Radiosity

Structure from Motion

Hidden surface removal. Computer Graphics

Monte Carlo 1: Integration

News. Recap: While Loop Example. Reading. Recap: Do Loop Example. Recap: For Loop Example

Computer Vision. Exercise Session 1. Institute of Visual Computing

Global Illumination and Radiosity

Computer Graphics 7 - Texture mapping, bump mapping and antialiasing

Lobachevsky State University of Nizhni Novgorod. Polyhedron. Quick Start Guide

Feature Reduction and Selection

Local Quaternary Patterns and Feature Local Quaternary Patterns

Smoothing Spline ANOVA for variable screening

TN348: Openlab Module - Colocalization

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

Robust Soft Shadow Mapping with Depth Peeling

Topic 13: Radiometry. The Basic Light Transport Path

RESOLUTION ENHANCEMENT OF SATELLITE IMAGES USING DUAL-TREE COMPLEX WAVELET AND CURVELET TRANSFORM

Motion Compensated Compression of Computer Animation Frames. are combined or manipulated and run through the compression

Design of Simulation Model on the Battlefield Environment ZHANG Jianli 1,a, ZHANG Lin 2,b *, JI Lijian 1,c, GUO Zhongwei 1,d

Global Illumination and Radiosity

REFRACTION. a. To study the refraction of light from plane surfaces. b. To determine the index of refraction for Acrylic and Water.

Implementation of a Dynamic Image-Based Rendering System

Machine Learning. Support Vector Machines. (contains material adapted from talks by Constantin F. Aliferis & Ioannis Tsamardinos, and Martin Law)

All-Pairs Shortest Paths. Approximate All-Pairs shortest paths Approximate distance oracles Spanners and Emulators. Uri Zwick Tel Aviv University

S1 Note. Basis functions.

Image Representation & Visualization Basic Imaging Algorithms Shape Representation and Analysis. outline

Contours Planning and Visual Servo Control of XXY Positioning System Using NURBS Interpolation Approach

Robust Soft Shadow Mapping with Backprojection and Depth Peeling

A DATA ANALYSIS CODE FOR MCNP MESH AND STANDARD TALLIES

GPU-based Parallel Construction of Compact Visual Hull Meshes

Interactive Virtual Relighting of Real Scenes

Support Vector Machines

The B-spline Interpolation in Visualization of the Three-dimensional Objects

Global Illumination: Radiosity

SUMMARY... I TABLE OF CONTENTS...II INTRODUCTION...

Chapter 4. Non-Uniform Offsetting and Hollowing by Using Biarcs Fitting for Rapid Prototyping Processes

IP Camera Configuration Software Instruction Manual

Real-time Motion Capture System Using One Video Camera Based on Color and Edge Distribution

Rail-Track Viewer An Image-Based Virtual Walkthrough System

Why visualisation? IRDS: Visualization. Univariate data. Visualisations that we won t be interested in. Graphics provide little additional information

COMP250: Computer Graphics

Low Latency Rendering on Pixel-Planes 5. Jonathan Cohen Marc Olano University of North Carolina at Chapel Hill

RAPID CARDIAC MRI USING RANDOM RADIAL TRAJECTORIES S. M. EL-METWALLY 1, K. Z. ABD-ELMONIEM 2, A. M. YOUSSEF 1 AND Y. M.

Diffusion Curve Textures for Resolution Independent Texture Mapping

MOTION PANORAMA CONSTRUCTION FROM STREAMING VIDEO FOR POWER- CONSTRAINED MOBILE MULTIMEDIA ENVIRONMENTS XUNYU PAN

Dynamic wetting property investigation of AFM tips in micro/nanoscale

Optimal Workload-based Weighted Wavelet Synopses

Virtual Memory. Background. No. 10. Virtual Memory: concept. Logical Memory Space (review) Demand Paging(1) Virtual Memory

High-Boost Mesh Filtering for 3-D Shape Enhancement

Problem Set 3 Solutions

THE PULL-PUSH ALGORITHM REVISITED

FRACTAL COMPRESSION TECHNIQUE FOR COLOR IMAGES USING VARIABLE BLOCK

Temporal Texture Synthesis by Patch-Based Sampling and Morphing Interpolation

3D MODEL DEFORMATION ALONG A PARAMETRIC SURFACE

Skew Angle Estimation and Correction of Hand Written, Textual and Large areas of Non-Textual Document Images: A Novel Approach

Registration of Expressions Data using a 3D Morphable Model

Transcription:

Some Tutoral about the Project Lecture 6 Rastersaton, Antalasng, Texture Mappng, I have already covered all the topcs needed to fnsh the 1 st practcal Today, I wll brefly explan how to start workng on t. I have already provded you a program to mport an obj fle. 2 Steps Apply transformatons to all vertces Prepare the frame buffer and Z-buffer For each trangle Project t to the screen space Fnd the 2D boundng box For each pxel n the boundng box Check f t s nsde the trangle by computng ts barycentrc coordnates If yes, use barycentrc coordnates to compute the depth and colour at the pxel If (depth < zbuf[pxel]) { framebuffer[pxel] = colour zbuf[pxel] = depth } Export the frame buffer data nto a PPM fle 3 For each pxel n the boundng box Check f t s nsde the trangle by computng ts barycentrc coordnates If yes, use barycentrc coordnates to compute the depth and colour at the pxel z = αz1 + β z2 + γ z3 c = αc1 + β c2 + γ c3 If (z < zbuf[pxel]) { framebuffer[pxel] = colour zbuf[pxel] = c } Computng the barcentrc coordnates of the nteror pxels The trangle s composed of 3 ponts p (y), p1 (x1, y1), p2(x2,y2) Ant-alasng Texture mappng Today Common texture coordnates mappng Texture coordnates (α,β,γ) : barycentrc coordnates Only f <α,β,γ<1, (y) s nsde the trangle Depth can be computed by αz + βz1 +γz2 Can do the same thng for color, normals, textures 5 6 1

Rastersaton Converts the vertex nformaton output by the geometry ppelne nto pxel nformaton needed by the vdeo dsplay Ant-alasng Z-buffer Texture mappng Bump mappng Transparent objects Drawng lnes Ant-alasng Alasng: dstorton artfacts produced when representng a hgh-resoluton sgnal at a lower resoluton. Ant-alasng : technques to remove alasng 7 Alased polygons (jagged edges) Ant-alased polygons 8 Nyqust Lmt Screen-based Ant-alasng Each pxel s subdvded (sub-sampled) nto n regons, and each sub-pxel has a color; Compute the average color value The sgnal frequency (fsgnal) should be no greater than half the sample frequency (fsample) fsgnal <=.5 fsample In the top, fsgnal =.8 fsample -> cannot reconstruct the orgnal sgnal In the bottom fsgnal =.5 fsample -> the orgnal sgnal can be reconstructed by slghtly ncreasng the samplng rate p( y) = = 1 p( y) : pxel color at ( y) c(, y) : sample color w : weght n w c(, y) 1 Accumulaton Buffer (A-Buffer) Use a buffer that has the same resoluton as the orgnal mage To obtan a 2x2 samplng of a scene, 4 mages are made by shftng the buffer horzontally/vertcally for half a pxel The results are accumulated and the fnal results are obtaned by averagng Varous samplng schemes are avalable Pxel center Subsampled pont Dfferent Samplng Schemes 2

Accumulaton Buffer (A-Buffer) The lghtng computaton s usually done only once per vertex Not dong the lghtng computaton at each sample pont The A-buffer s focus s on the edge antalasng Also useful for renderng transparent objects, moton blur (wll be covered later n the course) Edges Stochastc Samplng A scene can be produced of objects that are arbtrarly small A regular pattern of samplng wll always exhbt some sort of alasng One approach to solve ths s to randomly sample over the pxel Jtterng : subdvde nto n regons of equal sze and randomly sample nsde each regon The oversamplng rate s 1 and 2 from left to rght Today Texture Mappng : Why needed? Ant-alasng Texture mappng Common texture coordnates mappng Texture coordnates We don't want to represent all ths detal wth geometry 17 3

Texture mappng. Texture mappng. Method of mprovng surface appearance by addng detals on surface. Image s pasted onto a polygon. Image s called a Texture map, t s pxels are often referred as a Texels and have coordnates (u,v) Texture coordnates are defned for each vertex of the polygon and nterpolated across the polygon. v u y v x u 19 2 Photo-textures Texture Interpolaton Specfy a texture coordnate (u,v) at each vertex Can we just lnearly nterpolate the values n screen space? (,1) (,) (1,) Interpolatng the uv coordnates Agan, we use barcentrc coordnates u1 v1 Interpolaton - What Goes Wrong? Lnear nterpolaton n screen space: u= α u1 + β u2 + γ u3 v = α v1 + β v2 + γ v3 u3 v3 u2 v2 texture source what we get what we want 4

Why does t happen? Unform steps on the mage plane does not correspond to unform steps along the edge How do we deal wth t? Use hyperbolc nterpolaton (u,v) cannot be lnearly nterpolated, but 1/w and (u/w, v/w) can w s the last component after the canoncal vew transformaton 2n x pw r l y pw = z pw w 2n t b r + l r l t + b t f + b n f n 1 x y 2 fn z f n 1 Texture Mappng Examples Computng the uv coordnates at the nternal ponts For three ponts of the trangle, get r = [ p 1 u v,,, ] w w w Lnear nterpolaton vs. Hyperbolc nterpolaton Two trangles per square 1 u v [,, ] Compute w at the nternal ponts of the w w trangle by nterpolaton Compute w by nvertng 1/w, and multply them to (u /w,,v /w) to compute (u,v) Common Texture Coordnate Mappngs Orthogonal Cylndrcal Sphercal Texture Mappng & Illumnaton Texture mappng can be used to alter some or all of the constants n the llumnaton equaton: pxel color, dffuse color. Phong s Illumnaton Model Constant Dffuse Color Dffuse Texture Color Texture used as Label Texture used as Dffuse Color 5

Readngs Chapter 5.1-2 of Real-Tme Renderng Second edton http://books.google.co.uk/books?d=mokefbt w4xc&prntsec=frontcover&source=gbs_v2_ summary_r&cad=#v=onepage&q=&f=false Hyperbolc Interpolaton IEEE Computer Graphcs and Applcatons, vol12, no.4, 89-94, 1992 Demoed Software http://www-u.s.s.u-tokyo.ac.jp/~takeo/java/smoothteddy/ndex.html 6