3D graphics eBook - Course Materials Repository
3D graphics eBook - Course Materials Repository
3D graphics eBook - Course Materials Repository
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Texel 211<br />
change the location from a three-element vector to a two-element vector with values ranging from zero to one (uv). [3]<br />
These values are multiplied by the resolution of the texture to obtain the location of the texel. When a texel is<br />
requested that is not on an integer position, texture filtering is applied.<br />
Clamping & Wrapping<br />
When a texel is requested that is outside of the texture, one of two techniques is used: clamping or wrapping.<br />
Clamping limits the texel to the texture size, moving it to the nearest edge if it is more than the texture size.<br />
Wrapping moves the texel in increments of the texture's size to bring it back into the texture. Wrapping causes a<br />
texture to be repeated; clamping causes it to be in one spot only.<br />
References<br />
[1] Andrew Glassner, An Introduction to Ray Tracing, San Francisco: Morgan–Kaufmann, 1989<br />
[2] Linda G. Shapiro and George C. Stockman, Computer Vision, Upper Saddle River: Prentice–Hall, 2001<br />
[3] Tomas Akenine-Moller, Eric Haines, and Naty Hoffman, Real-Time Rendering, Wellesley: A K Peters, 2008<br />
Texture atlas<br />
In realtime computer <strong>graphics</strong>, a texture atlas is a large image, or "atlas" which contains many smaller sub-images,<br />
each of which is a texture for some part of a <strong>3D</strong> object. The sub-textures can be rendered by modifying the texture<br />
coordinates of the object's uvmap on the atlas, essentially telling it which part of the image its texture is in. In an<br />
application where many small textures are used frequently, it is often more efficient to store the textures in a texture<br />
atlas which is treated as a unit by the <strong>graphics</strong> hardware. In particular, because there are less rendering state changes<br />
by binding once, it can be faster to bind one large texture once than to bind many smaller textures as they are drawn.<br />
For example, a tile-based game would benefit greatly in performance from a texture atlas.<br />
Atlases can consist of uniformly-sized sub-textures, or they can consist of textures of varying sizes (usually restricted<br />
to powers of two). In the latter case, the program must usually arrange the textures in an efficient manner before<br />
sending the textures to hardware. Manual arrangement of texture atlases is possible, and sometimes preferable, but<br />
can be tedious. If using mipmaps, care must be taken to arrange the textures in such a manner as to avoid sub-images<br />
being "polluted" by their neighbours.<br />
External links<br />
• Texture Atlas Whitepaper [1] - A whitepaper by NVIDIA which explains the technique.<br />
• Texture Atlas Tools [2] - Tools to create texture atlases semi-manually.<br />
• Practical Texture Atlases [3] - A guide on using a texture atlas (and the pros and cons).<br />
References<br />
[1] http:/ / download. nvidia. com/ developer/ NVTextureSuite/ Atlas_Tools/ Texture_Atlas_Whitepaper. pdf<br />
[2] http:/ / developer. nvidia. com/ content/ texture-atlas-tools<br />
[3] http:/ / www. gamasutra. com/ features/ 20060126/ ivanov_01. shtml