ostapas at February 3rd, 2008 23:35 — #1
let's say I have many 3d models which I would like to import to 3d engine. The problem is, their texture sizes are not power of 2(128*128, 256*256, ...) and the engine only accepts these. Anyone knows a method, tool or software how to batch-resize (or slice) and "restick" the textures without distortion?
fireside at February 4th, 2008 00:30 — #2
Gimp does batch processing, but you need a script. Take a look at this page. If you scroll down there is a link for window's binaries.
reedbeta at February 4th, 2008 00:57 — #3
You can also use the ImageMagick toolkit to do batch image processing. It's very powerful, but all command-line - no GUI.
ostapas at February 4th, 2008 01:38 — #4
Thanks for your reply. However, simply resizing textures to standart sizes(256*256, 512*512,...) does not solve the problem, as they are mapped on 3d model, so when I view the model with resized textures, they look stretched, skewed, whirled, rotated, stripped, wrinkled and so on I hope you understand it, my modelling, texturing and English knowledge are not really strong.
hovermonkey at February 4th, 2008 08:01 — #5
You'd be better off padding out your textures to powers of 2, but then you need to change your texture coordinates in the model as well. Also you need to split triangles which wrap around the edge of the texture. I don't know of any tool that does this though, unfortunately. What 3D model format are you using as input to the engine? Which engine is it?
hawkwind at February 4th, 2008 08:11 — #6
Can't you just remap the u,v's of the model to fit a resized texture ? I'm told
that both Max and Maya will do this (I'm not an artist)
fireside at February 4th, 2008 08:21 — #7
Thanks for your reply. However, simply resizing textures to standart sizes(256*256, 512*512,...) does not solve the problem, as they are mapped on 3d model, so when I view the model with resized textures, they look stretched, skewed, whirled, rotated, stripped, wrinkled and so on
I hope you learned your lesson. Use powers of two!!!!! They look different because they have been resized and there's nothing you can do about that. They still should fit because texture mapping works on a percentage of 1, so the size shouldn't technically change other than the fact that the image has been resized and somewhat distorted. It might be better to go larger rather than smaller, but nothing is going to work perfectly because they are pixels. Also, the better the image algorithm the better it will work. If your images weren't at least square, though, you're pretty much dead meat. You can resize to 256 * 512, too, they don't have to be square, just powers of two, but if it's not close to the right size it's going to look bad. You can probably find a directx engine where you can get away with it.
ostapas at February 4th, 2008 10:55 — #8