Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may.

Slides:



Advertisements
Similar presentations
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1 Emmanuel Agu.
Advertisements

Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
2D Viewing and Projection
Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics May 3, 2007.
Rendering with Texture Maps CMPS 160 Assignment 5.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Adv. Computer Graphics CS6500, Spring 2003.
Texture mapping. Adds realism to computer graphics Texture mapping applies a pattern of color Bump mapping alters the surface Mapping is cheaper than.
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. The Data Model, PowerPivot and Dashboards.
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
CGMB 314 Intro to Computer Graphics Fill Area Primitives.
Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may.
Skills for Success with Microsoft Office 2013 Volume 1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. by Kris Townsend, Catherine.
CS 450: Computer Graphics PIXEL AdDRESSING AND OBJECT GEOMETRY
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
Informationsteknologi Monday, November 26, 2007Computer Graphics - Class 121 Today’s class Drawing lines Bresenham’s algorithm Compositing Polygon filling.
Computer Graphics Texture Mapping
Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may.
Computer Graphics World, View and Projection Matrices CO2409 Computer Graphics Week 8.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Texture Mapping Course: Computer Graphics Presented by Fan Chen
COMP 261 Lecture 16 3D Rendering. input: set of polygons viewing direction direction of light source(s) size of window. output: an image Actions rotate.
Buffers Textures and more Rendering Paul Taylor & Barry La Trobe University 2009.
Property of Virginia Beach City Public Schools ©2014 by Virginia Beach City Public Schools, P.O. Box 6038, Virginia Beach, Virginia All rights.
Digital Media Dr. Jim Rowan ITEC Vector Graphics Elegant way to construct digital images that –have a compact representation –are scalable –are.
HALLOWEEN A FUN STUDY By: Inspiring NH Kids
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan Access Chapter 3 Forms, Filters, and Reports.
Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
CS418 Computer Graphics John C. Hart
Digital Media Dr. Jim Rowan ITEC So far… We have compared bitmapped graphics and vector graphics We have discussed bitmapped images, some file formats.
PERIMETER & AREA. The distance around any closed figure.
Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may.
Notes for Project 6 PVA Pro Problem Definition The PVA Pro 9000 is a software application to support the estimation of acreage from aerial photographs.
Microsoft Project User Group May 2002 – Chapter Meeting Scheduling - Best Practices Initiation and Planning Presented by James Nuthall Brentford Technologies,
Many of the figures from this book may be reproduced free of charge in scholarly articles, proceedings, and presentations, provided only that the following.
Vertices, Edges and Faces By Jordan Diamond. Vertices In geometry, a vertices is a special kind of point which describes the corners or intersections.
Basic Perspective Projection Watt Section 5.2, some typos Define a focal distance, d, and shift the origin to be at that distance (note d is negative)
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
Many of the figures from this book may be reproduced free of charge in scholarly articles, proceedings, and presentations, provided only that the following.
File Texture Mapping Pasting images on primitives.
Digital Media Dr. Jim Rowan ITEC Vector Graphics Elegant way to construct digital images that –have a compact representation –are scalable –are.
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
Many of the figures from this book may be reproduced free of charge in scholarly articles, proceedings, and presentations, provided only that the following.
Digital Media Lecture 5: Vector Graphics Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Unit 2: The scale of a map and the measuring of distance A. What is a scale?  Purpose: To fit large areas onto small sheets of paper  A ratio between.
Lecture 13: Raster Graphics and Scan Conversion
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Texture Mapping Greg Humphreys University of Virginia CS 445, Fall 2003.
Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may.
Many of the figures from this book may be reproduced free of charge in scholarly articles, proceedings, and presentations, provided only that the following.
CS552: Computer Graphics Lecture 16: Polygon Filling.
GO! with Microsoft Office 2016
The Fish Experiment Hands on Science Activity
Texture Mapping cgvr.korea.ac.kr.
Many of the figures from this book may be reproduced free of charge in scholarly articles, proceedings, and presentations, provided only that the following.
File Texture Mapping Pasting images on primitives.
Digital Media Dr. Jim Rowan ITEC 2110.
Warm Up Problem Find the area of the trapezoid..
No part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior.
Page 12 Directions: C’ B B’ C A A’
APPLES A FUN STUDY By: Inspiring NH Kids
Introduction to Sampling Distributions
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Presentation transcript:

Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. CS 497: Computer Graphics James Money

Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Texture Mapping Texture Mapping is method of providing surface detail on a polygon, with relative little cost to the graphics system. It provide a way to map an image onto surface as shown:

Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Texture Mapping Texture mapping for general surfaces is not easy. It involves mapping the (x,y) of a pixel of a object to same point on the texture map, but in a (u,v) coordinate system. For polygons, we can map the square image to the polygon’s bounding rectangle: Bounding Rectangle

Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Texture Mapping We can also allow for repeating images on a large polygon by specifying how large the texture map is in (U max,V max ) and repeating from 0 after (U max,V max ) is reached.

Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Texture Mapping We can add support for texture mapping in our polygon data structure by: –Add an entry for a image pointer to U max xV max pixels. –The value of U max and V max for this image. –Specify what the (0,0), (U max,0), and (0,V max ) corners of the image map to on the polygon. I.E., give me three points bounding the image named tex1,tex2, and tex3.

Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Texture Mapping Here is how the mapping looks: Tex3 Tex1 Tex2 (0,0) (U max,0) (0,V max ) Texture Map Polygon

Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Texture Mapping We can add support for texture mapping in our fill routine by: –Project the 3 image points into 2D like a vertex of the polygon, except do not clip. –Set the number of pixels in U scale to distance from tex2(in 2d) to tex1(in 2d) and divide U max -U min. –Set the number of pixels in V scale to distance from tex3(in 2d) to tex1(in 2d) and divide by V max -V min.

Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Texture Mapping –Set texture position(in floating point) to 0,0. –For each pixel draw: If U scale or V scale >1 average the points contained in Rect(texture.x, texture.y, texture.x+U scale, texture.y+V scale ) for the pixel value. Otherwise, get the pixel at (texture.x, texture.y). Set texture position to (texture.x+U scale *deltaX,texture.y+V scale *deltaY); If texture.x>U max set texture.x=0. Same if true for Y.(Even better if you set texture.x-=U max and wrap around for averaging pixel values above).