The tricky purpose of defining the give-and-take "texture" is that it tin ship away hold upward both a substantive AND a verb. That is, y'all utilisation a texture file (like the icon at left) to texture an object. The procedure of texturing tin ship away hold upward idea of every bit clothing an object. No object inwards a Direct3D game is specially interesting without roughly coloring or texture applied to it, together with textures are the most mutual agency of adding realism to our favorite games.
To sympathise how a 3D object is textured, visit the SkyCop ship below. Every Direct3D object starts every bit a wireframe model having a sure enough let on of vertices. Each vertex (think point) consists of a set (x, y, z) value together with a texture coordinate (u, v) value. The texture coordinate points to a set inwards the texture file; the signal referenced inwards the texture file is called a texel (short for texture element). Direct3D is able to roll the texture onto the object past times using a universal address system for texture coordinates; the values gain from 0.0 to 1.0 inclusive, both horizontally together with vertically. As y'all tin ship away come across inwards the icon above, the top-left texel is represented past times texture coordinate (0.0, 0.0) together with extends to the bottom-right texel at coordinate (1.0, 1.0).
So to map the tip of the SkyCop ship amongst the dark-green tip inwards the image, nosotros say Direct3D to map the vertex at the tip of the ship amongst horizontal u = 0.5 together with vertical v = 0.0. Similarly, nosotros map the left together with correct wing tips amongst (0.0, 0.5) together with (1.0, 0.5) respectively. Are y'all starting to come across how the texture is wrapped onto the wireframe model?
I was planning to push clit the SkyCop background texturing method, merely this postal service is already getting lengthy together with I yell back I convey to a greater extent than to larn on environs mapping to acquire it done "the correct way" first. Note that this postal service barely touched the basics of texture-mapping. There's a lot to a greater extent than to larn almost how textures tin ship away hold upward used to practise cool effects, together with this volition probable hold upward the focus of upcoming posts.
0 Response to "Texturing Fundamentals"
Post a Comment