添加紋理基本概念Basic texturing concepts

早期電腦產生的 3D 影像,雖然普遍對當代而言算先進,但通常會有具光澤的塑膠感。Early computer-generated 3D images, although generally advanced for their time, tended to have a shiny plastic look. 其缺乏可讓 3D 物件看起來逼真且複雜的標記類型,例如磨損、裂縫,指紋及指尖。They lacked the types of markings-such as scuffs, cracks, fingerprints, and smudges-that give 3D objects realistic visual complexity. 紋理在加強電腦產生之 3D 影像的真實性方面,變得愈來愈受歡迎。Textures have become popular for enhancing the realism of computer-generated 3D images.

在日常的使用中,文字紋理是指物件的平滑或粗糙度。In its everyday use, the word texture refers to an object's smoothness or roughness. 不過,在電腦圖形中,紋理是像素色彩的點陣圖,讓物件具有紋理的外觀。In computer graphics, however, a texture is a bitmap of pixel colors that give an object the appearance of texture.

因為 Direct3D 紋理為點陣圖,所以任何點陣圖都可套用至 Direct3D 原始物件。Because Direct3D textures are bitmaps, any bitmap can be applied to a Direct3D primitive. 例如,應用程式可以建立並操控似乎具備木紋圖樣的物件。For instance, applications can create and manipulate objects that appear to have a wood grain pattern in them. 草地、泥土和岩石可套用至形成山丘的一組 3D 原始物件。Grass, dirt, and rocks can be applied to a set of 3D primitives that form a hill. 結果為逼真的山坡。The result is a realistic-looking hillside. 您也可以添加紋理來建立效果,例如路旁的路標、懸崖的岩石層,或地板大理石的外觀。You can also use texturing to create effects such as signs along a roadside, rock strata in a cliff, or the appearance of marble on a floor.

此外,Direct3D 支援更進階的添加紋理技術,例如紋理混合 (選擇性搭配透明度) 及光線對應。In addition, Direct3D supports more advanced texturing techniques such as texture blending-with or without transparency-and light mapping. 參閱紋理混合使用紋理進行光線對應See Texture blending and Light mapping with textures.

如果您的應用程式建立硬體抽象層 (HAL) 裝置或軟體裝置,其可以使用 8、16、24、32、64 或 128 位元紋理。If your application creates a hardware abstraction layer (HAL) device or a software device, it can use 8, 16, 24, 32, 64, or 128-bit textures.

相關主題Related topics

紋理Textures