Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS475 Game Development Basic Texture Mapping Roger Webster, Ph.D. D&E Communications Computer Science Wing Caputo Hall Dept.

Similar presentations


Presentation on theme: "CS475 Game Development Basic Texture Mapping Roger Webster, Ph.D. D&E Communications Computer Science Wing Caputo Hall Dept."— Presentation transcript:

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

8

9

10

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

14

15 Texture Decaling Using alpha-Channel transparency for bullet holes on walls and or glass

16

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.


Download ppt "CS475 Game Development Basic Texture Mapping Roger Webster, Ph.D. D&E Communications Computer Science Wing Caputo Hall Dept."

Similar presentations


Ads by Google