past a big pict on many mesh

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
husqvarna
Posts: 39
Joined: Thu Mar 09, 2006 9:37 am

past a big pict on many mesh

Post 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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
husqvarna
Posts: 39
Joined: Thu Mar 09, 2006 9:37 am

Post 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 ?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Post Reply