   texture mapping
  hi ,i'm trying to learn texture mapping.in the examples i find on internet ,usually surfaces a cube or triangle is covered with the same picture.how can i cover each surface with different pictures ?and the more important question is: how can i cover the objects like car or tree ? thank you   
  These examples are usually focusing on the programming side of using textures and therefore use straightforward primitives as you mentioned. Of such primitives logical texture coordinates can be pre-computed or logically deduced. For more complex shapes, you would normally use a modelling package to create the model and assign its texture coordinates (texture mapping) and then export it to an intermediate file, as it is hard to auto-generate them onto the shape. Then your program would load the file (with the coordinates) and apply the map realtime.Illco   ;  Complex objects like cars and trees are made up, as you know, from many triangles or squares.  Each corner point on every triangle or square can have two 'uv' coordinates.  These numbers represent x and y locations on a texture.Effectively, what the computer then does is cuts out a part of your texture defined by the x & y coodinates and then stretches them across the points that are used to represent your triangle or square.  For a complex object that is composed of say 1000 triangles, there will therefore be 1000 parts of a texture that are cut and pasted on each triangle.   