View Full Version : texture atlas

05-21-2011, 06:43 AM
I'm trying to create a texture atlas for group meshes and create some massive batch.
for do this I must convert generic images to power of two images(because atlas program needs poweroftwo images).
i have creates the a function that return the smallest poweroftwo int from the width or height of the generic image.
Now i have a doubt:
these image are extracted from a sketchup model and have some texture coord,for mantain the correct texture mapping ,i must resize the image or i can add some empty space at the power of two image for preserve the correct texture coord?
the texture atlas generator return an offset width and an offset height for each texture in the atlas;
these offsets are from 0(begin of images )and 1 (end of image ), is sufficent to add the offset to the texcoord for mantain the texture mapping?
and if i have some values in the texcoord that are from 0 to 47.1323?
is possible to translate all to range 0-1 ?
how ?