Rendering with Texture Maps CMPS 160 Assignment 5.

Slides:



Advertisements
Similar presentations
Graphics Pipeline.
Advertisements

Introduction and Basic OpenGL functionality
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
03/16/2009Dinesh Manocha, COMP770 Texturing Surface’s texture: its look & feel Graphics: a process that takes a surface and modifies its appearance using.
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Texture Mapping. Typical application: mapping images on geometry 3D geometry (quads mesh) + RGB texture 2D (color-map) =
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Textures II Week 8, Wed.
MAT 594CM S2010Fundamentals of Spatial ComputingAngus Forbes Overview Today: - Make sure everyone is set up with an OpenGL environment - OpenGL basics:
ARCH 481 3d Modeling and Rendering lecture four: texture maps.
Texture Mapping CPSC /24/03 Abhijeet Ghosh.
Hofstra University1 Texture Motivation: to model realistic objects need surface detail: wood grain, stone roughness, scratches that affect shininess, grass,
Texture mapping. Adds realism to computer graphics Texture mapping applies a pattern of color Bump mapping alters the surface Mapping is cheaper than.
1 Lecture 12 Texture Mapping uploading of the texture to the video memory the application of the texture onto geometry.
CS 4731: Computer Graphics Lecture 17: Texturing Emmanuel Agu.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
Texture Mapping A way of adding surface details Two ways can achieve the goal:  Surface detail polygons: create extra polygons to model object details.
1 Texturing. 2 What is Texturing? 3 Texture Mapping Definition: mapping a function onto a surface; function can be:  1, 2, or 3D  sampled (image) or.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
UniS CS293 Graphics with Java and OpenGL Textures.
Texturing in OpenGL Lab #7. Creating Textures glEnable ( GL_TEXTURE_2D ); GLuint myTex; glGenTextures ( 1, (GLuint*) &myTex ); glBindTexture ( GL_TEXTURE_2D,
CSE 381 – Advanced Game Programming Basic 3D Graphics
Computer Graphics Texture Mapping
1 9. Textures v Create the illusion of detail by wraping a complex image (texture) around a simple geometry –realism is increased without the need for.
Lecture 8: Texture Mapping 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271
3D API By Clayton Azzopardi (Group 10). Introduction Android uses the OpenGL ES 1.0 API Android uses the OpenGL ES 1.0 API Open Graphics Library for Embedded.
Texture Mapping. Scope Buffers Buffers Various of graphics image Various of graphics image Texture mapping Texture mapping.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Texture Mapping. Example Mappings Mapping Techniques Consider the problem of rendering a sphere in the examples The geometry is very simple - a sphere.
Texturing A picture is worth a thousand words. Texturing Texturing is the art of doing this with any picture to any model.  (This is Opus the Penguin.
Texture Mapping Course: Computer Graphics Presented by Fan Chen
Computer Graphics Ben-Gurion University of the Negev Fall 2012.
An Interactive Introduction to OpenGL Programming Ed Angel
CS380 LAB IV OpenGL Jonghyeob Lee Reference1. [OpenGL course slides by Rasmus Stenholt] Reference2. [
Texture Mapping Drawing Pictures on Polygons. Texture Mapping.
Computer Graphics 2 Lecture 7: Texture Mapping Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
CS418 Computer Graphics John C. Hart
October 9, 2002Serguei A. Mokhov, 1 COMP471 – Computer Graphics OpenGL: Texture Mapping.
1 3D API OPENGL ES v1.0 Owned by Silicon Graphics (SGL) Control was then transferred to Khronos Group Introduction.
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.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
File Texture Mapping Pasting images on primitives.
OpenGL Graphics Textures. Quiz You didn't see that coming!
1 Graphics CSCI 343, Fall 2015 Lecture 25 Texture Mapping.
Details of Texture Mapping Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, December 1, 2003.
Mapping: Image Texturing CPSC 591/691. Texture Mapping Two-dimensional techniques place a two-dimensional (flat) image onto an object using methods similar.
1 Chapter 7 Texture Mapping. 2 The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number is.
GIS Data Shape files, Rasters, Coordinate Systems, ArcGIS.
Texture Mapping CEng 477 Introduction to Computer Graphics.
Texturing CMSC 435/ What is Texturing? 2 Texture Mapping Definition: mapping a function onto a surface; function can be: – 1, 2, or 3D – sampled.
Texture Mapping cgvr.korea.ac.kr.
OpenGL Texture Mapping
Chapters VIII Image Texturing
File Texture Mapping Pasting images on primitives.
Introduction to Texture Mapping
Texture Motivation: to model realistic objects need surface detail: wood grain, stone roughness, scratches that affect shininess, grass, wall paper. Use.
3D Game Programming Texture Mapping
Textures II Week 10, Mon Mar 22
Introduction to Meshes
OpenGL Texture Mapping
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics with Three.JS
OpenGL Texture Mapping
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
3D Game Programming Texture Mapping
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Texture Mapping Jung Lee.
Introduction to Meshes
Presentation transcript:

Rendering with Texture Maps CMPS 160 Assignment 5

Whats new in Meshshop this week? More meshes (meshshop/example_data) New image library (lib/glpng) Texturing display plugin (you write it) Coordinate mapping filter plugin (you write it) A sample texture (a sock!)

Texture Mapping in OpenGL Texture maps specify a color pattern that that should be used to modulate surface reflectance at each pixel. Textures are loaded and bound to GL once at startup (ideally). Texture coordinates tell GL which texels (texture pixels) to consider when drawing a polygon.

Loading and Binding A Texture glGenTextures finds unused texture ID to give to you glBindTexture sets texture type (1D/2D/3D/4D) glTexParameter sets filtering modes (minification/magnification) pngLoad loads png from filesystem and builds mipmaps glEnable(GL_TEXTURE_2D) turns on texturing

Specifying Texture Coordinates Usually called u,v (as opposed to x,y,z) glTexCoord specifies texture coordinates for the next item drawn (same way glColor does) u,v should have usefull information in them (based on the vertex position you are texturing) so….

Projecting Texture Coordinates onto the mesh Spherical Projection Planar Projection Cylindrical Projection Transformations of above projctions (Slightly) Random projection? You need some function… (u,v) = f(x,y,z)

Assignment Create a display plugin to draw the mesh using a texture selected from the menu and using the texture coordinates stored in the mesh. Create a filter plugin to assign “vertex_texture_coordinates” values for each vertex of the mesh using several different projections.

Demo …