Textures, Sprites, and Fonts

Slides:



Advertisements
Similar presentations
GlTF and rest3d Patrick Cozzi University of Pennsylvania CIS Fall 2013.
Advertisements

CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Graphics Pipeline.
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.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Texture Visual detail without geometry. Texture Mapping desire for heightened realism.
Week 7 - Wednesday.  What did we talk about last time?  Transparency  Gamma correction  Started texturing.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
Essentials of Interactive Computer Graphics: Concepts and Implementation K. Sung, P. Shirley, S. Baer Chapter 12 Chapter 12: Making the Applications Interesting.
Chapter 6 Color Image Processing Chapter 6 Color Image Processing.
Basic Rendering Techniques V Recognizing basic rendering techniques.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
09/18/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Bump Mapping Multi-pass algorithms.
WEB GRAPHICS. The Pixel Computer displays are comprised of rows and columns of pixels. Pixels are indivisible. Some common screen resolutions are:, 600.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
Sky Rendering The actual physics is very complicated and costly to calculate. Several cheap approaches for very distant skies: –Constant backdrop –Skybox.
Geometric Objects and Transformations. Coordinate systems rial.html.
Computer Graphics Texture Mapping
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Textures.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 5 Working with Images Starting Out with Games & Graphics in.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
Computer Graphics Bitmaps & Sprites CO2409 Computer Graphics Week 3.
3D Graphics for Game Programming Chapter IV Fragment Processing and Output Merging.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
Texture Mapping CAP4730: Computational Structures in Computer Graphics.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
1 Welcome Alireza Moghaddam Humber College Lecture 1 Game 540 Alireza Moghaddam
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
File Texture Mapping Pasting images on primitives.
WORKING WITH SELECTIONS MASKS and CHANNELS 3D IMAGES LAYER BASICS PHOTO.
Overview  Basic requirements of implementation  Image resource  Texture mapping  Advanced requirements of implementation  KGL sprite class.
GAM666 – Introduction To Game Programming ● Textures are simply 2D images which are spread over the triangles of a 3D shape ● Each vertex has texture coordinates.
Textures – Basic Principles Lecture 29 Fri, Nov 14, 2003.
Efficient Game Graphics From Flash MX 2004 Game Design Demystified.
Creation and Visualization of 3D Scenes with the MRPT library January, 2007 Jose Luis Blanco Claraco Dept. of Automation and System Engineering University.
Build your own 2D Game Engine and Create Great Web Games using HTML5, JavaScript, and WebGL. Sung, Pavleas, Arnez, and Pace, Chapter 5 Examples 1.
Build your own 2D Game Engine and Create Great Web Games using HTML5, JavaScript, and WebGL. Sung, Pavleas, Arnez, and Pace, Chapter 5 Examples 3.
Applications and Rendering pipeline
Volume Rendering (3) Hardware Texture Mapping Methods.
Textures, Sprites, and Fonts
Computer Graphics Imaging
Discrete Techniques.
Week 7 - Wednesday CS361.
Week 7 - Monday CS361.
Week 2 - Friday CS361.
Inserting and Working with Images
The Basics: HTML5, Drawing, and Source Code Organization
PROJECTION TEXTURE MAP
Chapter 3 Drawing In the World.
ATEC Procedural Animation
ATCM 3310 Procedural Animation
Chapter 5 Working with Images
File Texture Mapping Pasting images on primitives.
Chapter 15, Images …a few points
Introduction to Texture Mapping
Computer Animation Texture Mapping.
Introduction to Computer Graphics
3D Game Programming Texture Mapping
Procedural Animation Lecture 6: Mapping
ATCM 6317 Procedural Animation
Computer Graphics Module Overview
Color Image Processing
Chapter X Output Merger.
OpenGL Texture Mapping
Presentation transcript:

Textures, Sprites, and Fonts Chapter 5 Textures, Sprites, and Fonts

This Chapter What is textures, why textures How to map and control Addressing efficiency: loading and memory Faking animation with textures Displaying fonts (text) with textures This is our text solution

Texture Mapping A Texture: Fancy word for “an image” Texture Mapping: Fancy word for pasting an “image” on a geometry Texel: pixels of a texture WARNING: for WebGL (and many hardware) Texture resolution must be of powers of 2 E.g., 16 x 32, or 2 x 512, or 512x512 1023x1025: is a BAD resolution for WebGL

Why Texture Mapping Represent “objects” Ease of control/manipulate Cheap, easy, with high quality Typically: specifically drawn by artists Ease of control/manipulate We know how to control a geometry Control of “objects” can be simply modifying the corresponding transform (Renderable!)

Texture Mapping Considerations Texture external to the engine: Loading must occur When to load, what happens when done? Textures with Transparency The Alpha channel File format: jpg and png Memory concerns (lots of textures) Size of image file (texture) Sharing of the same texture

A Word about “Transparency” or Alpha Color = [R, G, B, A] (e.g., [1, 0, 0, 1] for red) A: the Alpha Channel Typically for Alpha Blending Colors C1 = [R1, G1, B1, A1], C2 = [R2, G2, B2, A2] Blending the colors: Result = C1 * A1 + C2 * (1 – A1) This is the default WebGL blending Or Result = C1 * (1 – A1) + C2 * A1

How to texture map? Map: from one coordinate system to another! Texture Coordinate System (UV Coordinate) Just as NDC and WC, independent of pixel (or texel resolution) Constant range 0 < U < 1 0 < V < 1 Always cover the entire texture

Mapping UV to the Model Texture mapping: Associate UV positions with corresponding geometric positions Define UV values at vertices in Model Space!! Communicate this association to the WebGL