Wanted to share a tool that a student of mine made for batch converting mipmaps. It's a modification of the script by Luca Fiorentini, but this new GUI further streamlines the conversion process, taking into account linearlizing diffuse textures as well as working with exr displacement maps, using DWA compression to keep the file sizes reasonable.
The motivation for the updated script is that linearizing of diffuse textures should happen before mip-map generation, otherwise the apparent intensity of texture values will change as the object approaches or recedes from the camera. So the script linearizes all the diffuse textures with maketx before it converts them to mipmaps, rather than doing a gamma correct on them in Maya. This leads to a second issue: The linearized file will need to be 16bit instead of 8bit to avoid banding. This would normally result in a significant increase in the file size, so we use DWA compression which keeps the file size reasonable. This is all done based on naming conventions, so if a texture name matches the provided string, it will be linearized. The default string here is "_dif_" which matches the naming convention we use for diffuse textures, but you can of course fill in any string.
I'd welcome feedback on how it could be improved as well as any problems folks run into, but want to stress that this is "as is" shareware with zero warranty or support. Here's the manpage I made for it with a link to download the Maya python script:
http://docs.sharktacos.com/texture/mipmap.html
Hopefully folks will find it useful!
The motivation for the updated script is that linearizing of diffuse textures should happen before mip-map generation, otherwise the apparent intensity of texture values will change as the object approaches or recedes from the camera. So the script linearizes all the diffuse textures with maketx before it converts them to mipmaps, rather than doing a gamma correct on them in Maya. This leads to a second issue: The linearized file will need to be 16bit instead of 8bit to avoid banding. This would normally result in a significant increase in the file size, so we use DWA compression which keeps the file size reasonable. This is all done based on naming conventions, so if a texture name matches the provided string, it will be linearized. The default string here is "_dif_" which matches the naming convention we use for diffuse textures, but you can of course fill in any string.
I'd welcome feedback on how it could be improved as well as any problems folks run into, but want to stress that this is "as is" shareware with zero warranty or support. Here's the manpage I made for it with a link to download the Maya python script:
http://docs.sharktacos.com/texture/mipmap.html
Hopefully folks will find it useful!
Comment