Download presentation
Presentation is loading. Please wait.
Published byReynold Stafford Modified over 8 years ago
1
CS475 Game Development Basic Texture Mapping Roger Webster, Ph.D. Roger.Webster@millersville.edu D&E Communications Computer Science Wing Caputo Hall Dept. of Computer Science Millersville University Millersville, PA 17551 http://cs.millersville.edu/~webster/
2
Topics Covered Texture mapping basics Texture coordinates Texture specifications Alpha-Channel Textures Decaling or Multi-Pass Textures –Bullet holes on walls
3
Overview of Texture Mapping Texture mapping allows images to be attached to polygons. Texture maps are composed of rectangular arrays of data. Each element of an array is called a texel. One-, two-, and three-dimensional textures may be used. Two-dimensional textures are most common.
4
Texture Coordinates Texture coordinates given notation (s, t) for 2D textures Lower-left corner of a texture is (0, 0). Upper-right corner of a texture is (1, 1).
5
Texture Coordinates Specify texture coordinates with a set texture coordinate call every time a vertex is specified.
6
Alpha-Channel Textures Using Adobe Photoshop you can set the transparency via the AlphaChannel : Here 0 = transparent in the opacity.bmp file
7
Texture Alpha-Channel
11
Lancaster Street Car Project
12
Texture Decaling Textures can be multi-passed for effects like: bullet holes on walls blood splatter
13
Texture Decaling
15
Texture Decaling Using alpha-Channel transparency for bullet holes on walls and or glass
17
Summary Texture mapping involves “attaching” images to polygons. Map textures onto polygons with texture coordinates. Textures can be alpha channeled and multi-passed for effects.
18
XNA Books Chad Carter, Microsoft XNA Unleashed: Graphics and Game Programming for Xbox 360 and Windows, Sams Publishing, Indianapolis, In, 2008. Professional XNA Game Programming for Xbox 360 and Windows, Benjamin Nitschke Wrox (Wiley) 2007 Other books.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.