Page 1 of 1

past a big pict on many mesh

Posted: Wed May 10, 2006 10:24 pm
by husqvarna
Ola,

I have a big picture to past over a big model. Many mesh.

For the moment, the image is repeated on each polygon.

Is it possible to continue the same image on many poygones? Or must I cut the image??

Thanks

Posted: Wed May 10, 2006 11:20 pm
by hybrid
You just have to set texture coordinates correctly. If all faces have the full 0..1 range then the texture is repeated al the time. Instead, your top-left vertex should have 0.0,1.0 and the bottom right 1.0,0.0 and all the others the interpolated values. Better use a UV mapper for this purpose.

Posted: Thu May 11, 2006 9:48 am
by husqvarna
sorry but... what mean this range of value?

what represent 0.0 / 0.1 and 1.0 / 0.0, a position in the picture ?

Posted: Thu May 11, 2006 9:15 pm
by hybrid
The complete texture is put into a texture coord space going from 0.0 to 1.0 in both axes. Each vertex is assigned a texture coord which maps that vertex to the location within the texture. The texture fragment that is used to color a face is determined by all texture coords of the vertices of the polygon/face. Because textures are often repeated several times you can also use coordinates other than 0.0 to 1.0 which just wrap around, so 1.2 is the same as 0.2.