ADDITIONAL TIPS Multi-texture Slides. Here is a link Workflow: /**************In texture parameter set up******/ call glActiveTextureARB(/*pick texture.

Slides:



Advertisements
Similar presentations
Hofstra University1 Texture Motivation: to model realistic objects need surface detail: wood grain, stone roughness, scratches that affect shininess, grass,
Advertisements

1 Understanding of OpenGL TA: Dong Hyun Jeong Instructor : Dr. Kalpathi Subramanian Texture Mapping.
OpenGL Texture Mapping
Texture Mapping. Typical application: mapping images on geometry 3D geometry (quads mesh) + RGB texture 2D (color-map) =
CH6 Texture. Before coding … 1/2 Prepare all texture images you need. BMP file is a good choice If you want to use TIFF file, maybe try this.
Texture Mapping CPSC /24/03 Abhijeet Ghosh.
CSC345: Advanced Graphics & Virtual Environments
OpenGL Texture Mapping
OpenGL Texture Mapping Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
TA: Zhicheng Yan, Sushma S Kini, Mary Pietrowicz
1 Lecture 12 Texture Mapping uploading of the texture to the video memory the application of the texture onto geometry.
OpenGL Texture Mapping April 16, Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Basic Stragegy Three steps to applying a texture.
CS 4731: Computer Graphics Lecture 17: Texturing Emmanuel Agu.
CS559: Computer Graphics Lecture 27: Texture Mapping Li Zhang Spring 2008 Many slides from Ravi Ramamoorthi, Columbia Univ, Greg Humphreys, UVA and Rosalee.
CSE (Notre Dame) Computer Graphics Lecture 16 A Simple Draw Image Example More Texture Mapping Simple OpenGL Image Library (SOIL) Transparency &
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Advanced Texturing Methods Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, December 8, 2003.
Texture Mapping. To add surface details… World of Warcraft, Blizzard Inc. More polygons (slow and hard to handle small details) Less polygons but with.
Computer Graphics Texture Mapping Eriq Muhammad Adams
2IV60 Computer Graphics set 10: Texture mapping Jack van Wijk TU/e.
2002 by Jim X. Chen: 1 Texture Lab At each rendered pixel, selected texels are used either to substitute for or to scale.
Lecture 8: Texture Mapping 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271
Texture Mapping. Introduction What is Texture Mapping? Types of Texture Mapping –1D, 2D and 3D SDL and OpenGL.
Texture Mapping. Example Mappings Mapping Techniques Consider the problem of rendering a sphere in the examples The geometry is very simple - a sphere.
Computer Graphics OpenGL - Texture mapping. OpenGL Texture mapping zTexture Mapping allows us to glue an image on polygons. In this method we can produce.
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
ECSE-4750 Computer Graphics Fall 2004 Prof. Michael Wozny TA. Abhishek Gattani TA. Stephen
CS380 LAB IV OpenGL Jonghyeob Lee Reference1. [OpenGL course slides by Rasmus Stenholt] Reference2. [
Lecture 27: Texture Mapping Li Zhang Spring 2008
And Some Extra Information From
Texture Mapping. 2 Motivation A typical modern graphics card can handle 10s of millions of polygons a second. How many individual blades of grass are.
OpenGL Texture Mapping. 2 Objectives Introduce the OpenGL texture functions and options.
Texture Mapping Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
CS 480/680 Computer Graphics OpenGL Texture Mapping Dr. Frederick C Harris, Jr. Fall 2011.
Texture Mapping Software College, Shandong University Instructor: Zhou Yuanfeng
Texture Mapping in OpenGL. Texture Mapping Imaging we are “pasting” a picture onto a model  Which part of the picture will be pasted onto which part.
Texture Mapping Drawing Pictures on Polygons. Texture Mapping.
TEXTURES & OTHER GOODIES Computer Graphics. glTexCoord2f(...); + =
Computer Science Term 1, 2006 Tutorial 2 Assignment 3 – The Virtual World.
More on Environment Mapping Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Wednesday, December 10, 2003.
October 9, 2002Serguei A. Mokhov, 1 COMP471 – Computer Graphics OpenGL: Texture Mapping.
TEXTURE CSE 410. Add Texture to Polygon glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D,texid); // here texid corresponds a bitmap image. glNormal3f(1.0,0.0,0.0);
OpenGL Programming Guide : Texture Mapping Yoo jin wook Korea Univ. Computer Graphics Lab.
CS559: Computer Graphics Lecture 22: Texture mapping Li Zhang Spring 2010 Many slides from Ravi Ramamoorthi, Columbia Univ, Greg Humphreys, UVA and Rosalee.
CH6 Texture. Pixel pipeline Vertex pipeline Course Map Transformation & Lighting Primitive assembly Viewport culling & clipping Texture blending Per Fragment.
Texture Mapping. checker.c Texture-Mapped Squares.
1 Graphics CSCI 343, Fall 2015 Lecture 25 Texture Mapping.
CH6 Texture.
Texture Mapping and NURBS Week 7 David Breen Department of Computer Science Drexel University Based on material from Ed Angel, University of New Mexico.
Details of Texture Mapping Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, December 1, 2003.
CH6 Texture. Pixel pipeline Vertex pipeline Course Map Transformation & Lighting Primitive assembly Viewport culling & clipping Texture blending Per Fragment.
CH6 Texture. Before coding … 1/2 Prepare all texture images you need. BMP file is a good choice If you want to load other format, you can try the FreeImage.
Texture Coordinates CS418 Computer Graphics John C. Hart.
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.
CPSC 591/691 Lab Assignment: Attribute-Based Texture Mapping Based on the paper: X-Toon: An extended toon shader Barla et al, NPAR ‘06 PDF + video here:
Texture Mapping We can improve the realism of graphics models by mapping a texture pattern (image) onto the modeled object surface. We refer to this technique.
OpenGL Texture Mapping
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
OpenGL Texture Mapping
Computer Graphics, Lee Byung-Gook, Dongseo Univ.
Assignment 3b Q&A.
3D Game Programming Texture Mapping
Computer Graphics Practical Lesson 6
OpenGL Texture Mapping
OpenGL Texture Mapping
Programming Textures Lecture 15 Fri, Sep 28, 2007.
3D Game Programming Texture Mapping
OpenGL Texture Mapping
Presentation transcript:

ADDITIONAL TIPS Multi-texture Slides

Here is a link Workflow: /**************In texture parameter set up******/ call glActiveTextureARB(/*pick texture Ex. GL_TEXTURE1_ARB*/); //set up texture as you normally would /**************Drawing in Display *************/ call glMultiTexCoord2dvARB(/* texture you picked*/, /*texture coordinates for it*/) glNormal glTexCoord glVertex

Texture Setup ////////////////////// texture 0 ////////////////////////// glActiveTextureARB (GL_TEXTURE0_ARB); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture[0]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); ////////////////////// texture 1 ////////////////////////// glActiveTextureARB (GL_TEXTURE1_ARB); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture[1]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // Make sure the mipmap initialization is completed glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); //Note: you need to load texture[0] and texture[1] with some image data with either some library Ex. SOIL_load_OGL_texture. or glTexImage2D or gluBuild2DMipmaps

Display Drawing glMultiTexCoord2dvARB (GL_TEXTURE0_ARB, /*a vector of texture coordinates*/); glNormal // glMultiTexCoord2dvARB (GL_TEXTURE1_ARB, /*a vector of texture coordinates*/) this can be omitted if texture coordinates are generated automatically glVertex //Since sphere map auto generate texture coordinates, you can use the glTexCoord will be the sphere maps coordinates.