Sign in to follow this  
Guest

Removing alpha channel from DXT3 textures

Recommended Posts

AI aircraft repaints tend to be in a wide variety of image formats: 8 bit, 32 bit, DXT1, DXT3, with or without mipmaps, with or without alpha channel...I like them to be *all* in DXT1, mipmapped, *no* alpha channel. :-)This would release about 700 kB harddisk space for each of the hundreds of repaints. Any ideas of a mass conversion procedure, especially the alpha channel removal?Regards,Claudius

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I know you can run ImageTool from the command line, and that there is batch processing capability. How? I haven't got a clue. But at least that should get you started looking in the right direction. Dick Ludowise (Rhumbaflappy) over in the scenery forum has mentioned doing some batch work on scenery tiles in ImageTool. Maybe he could be of assistance.

Share this post


Link to post
Share on other sites

Hi Claudius.If you open imagetool from the commandline ( dos ) as:imagetool -?...you'll get the info you need for batch processing.Try this ( after you've backed up your images to a different folder! )imagetool -batch -DXT1 -mip -noalpha *.bmpSave that lines as a 'DXT1.bat' file, and put it in a folder with the images to convert, along with imagetool. Then doubleclick on the 'DXT1.bat' file. Should be a done deal...I think the output will be *.mip...... just change the .mip extension to .bmpOr do this in the batch file:imagetool -batch -DXT1 -mip -noalpha *.bmpren *.mip *.bmpDick

Share this post


Link to post
Share on other sites

Dick and Bill,thanks a lot! I'll try this later.Now this only needs to walk recursively through all the aircraft texture folders.... Back to DOS. :-)Claudius

Share this post


Link to post
Share on other sites

imagetool -batch -DXT1 -mip -noalpha -r *.bmpren *.mip *.bmpthe '-r' is recursive directories.:)Dick

Share this post


Link to post
Share on other sites

OMG!! You have NO idea how much work you just saved me. I normally convert my dxt3 files to 32 bit targas then work on them...then save back to dxt3 with alpha channel no mipmaps for my artwork. I had been doing this by hand, but now you have just AUTOMATED the process for me. I cant thank you enough.I wrote a bat file that will do as I just wrote above.Friggin FANTASTIC STUFF.imagetool -batch -DXT3 -nomip -alpha *.tgaren *.mip *.bmp

Share this post


Link to post
Share on other sites

That's it! I need glasses. :-)However, converting everything to DXT1 doesn't seem to be a good idea. Usually I add mipmaps to every texture and never noticed anything regarding picture quality. But now, by converting back to DXT1, a lot of color banding appears. I just wanted to strip the alpha channel to gain some kB, without deterioration in picture quality...The process: DXT3 (alpha) -> 24 bit (RGB,no alpha) -> DXT3 (no alpha) gives *no* reduction in file size. I wonder why?I think I'll have to do some testing.Claudius

Share this post


Link to post
Share on other sites

Hi Claudius,The aircrafts are better with alpha and mipmaps.But if you don't want it, just run imagetool, open the DXT1 file, select format 34-Bits and save as targa.tga on your disk.Close the DXT1 file do not save. Open your saved 34Bit targa file,select format DXT1 and save it where it was the first time.Your DXT1 file has no mipmaps more.That's all.Regards,Cees

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this