Page 2 of 2

Re: Image Tool Batch Converter

Posted: 31 Aug 2008, 12:16
by TSR2
PeteH wrote:Thanks guys.

Garry,

DM's Batch Converter AFAIK only converts certain textures from 32 bit to DXT3.

Paul,

I can't find - Texturing Aircraft Models - Appendix 1: Imagetool Switches - in the SDK. Can you point me in the right direction please? Is there something I need to install from within the SDK?
I assume from what you say that there is a facility for configuring Imagetool to Batch Convert.

Thanks,

Pete
As with most programs, run imagetool from the command prompt and suffix it with the -? switch to get a list of the options...

Code: Select all

E:\Program Files (x86)\Microsoft Games\FSX SDK\SDK\Environment Kit\Terrain SDK>imagetool.exe -?
Note the space between imagetool.exe and the switch

Here is the list below...
---------------------------
Imagetool
---------------------------
Usage:
imagetool [flags] [inputfiles]

Where flags are:
-o [string] Specify output file name
-batch Force batch processing
-verbose Verbose output [DEFAULT]
-brief Brief output
-nogui No GUI
-nobeep Turns off batch file beeping
-tga Output files are in targa (tga) format
-dds Output files are in DirectX (dds) format
-bmp Output files are in bitmap (bmp) format [DEFAULT]
-imgui Output format is to be used by IMGUI
-auto Output format is picked automatically
-DXT1 Output format is compressed DXT1
-DXT3 Output format is compressed DXT3
-DXT5 Output format is compressed DXT5
-PTC [Q,[Qa]] Output format is compressed PTC
-32 Output format is 32-bit
-24 Output format is 24-bit
-4444 Output format is 16-bit (4444)
-1555 Output format is 16-bit (1555)
-565 Output format is 16-bit (565)
-8 Output format is 8-bit palletized [DEFAULT]
-1 Output format is 1-bit monochrome
-detail Output format is to be used as a detail texture
-gauge Output format is to be used in a flight sim gauge
-terrain Output format is to be used as a generic terrain tile
-terrainphoto Output format is to be used as terrain photo scenery
-border Create a 1 pixel border around the image
-hasborder The image already contains a 1 pixel border
-lm The image is a light map
-tile The image self tiles
-fold Fold the Edge colors for clamped textures
-vflip Vertical flip
-mip Generate mip maps [DEFAULT]
-addmip [file] Add custom mip maps
-nomip Do not generate mip maps
-dither Use Floyd-Steinberg dithering when reducing color depth
-nodither Do not use any dithering when reducing color depth
-invert Invert the alpha channel
-createalpha Create the alpha channel using the RGB value of the (0,0) pixel
-warning Enable warnings (FS specific) [DEFAULT]
-nowarning Disable warnings
-verify Verify that the image matches the given settings
-stop Show a warning dialog (only used with -verify) [DEFAULT]
-nostop Do not show a warning dialog (only used with -verify) [DEFAULT]
-alpha Allow alpha in the bitmap (only used with -verify)
-noalpha Do not allow alpha in the bitmap (only used with -verify)
-e [string] File extension to use given by [string]
-r Recursively traverse the sub directories
-? [string] Help on the topic given by [string]
-fallback Builds a fallback texture that can be loaded much faster than the base image.
-redCorrection Modifies the red component of colors in the mip chain
-blueCorrection Modifies the blue component of colors in the mip chain
-greenCorrection Modifies the green component of colors in the mip chain
-RedInAlpha Put the red channel in the alpha channel and zero out red

Batch processing only occurs if one of the command line options is supplied; otherwise,
the images are opened in imagetool for manual processing.

---------------------------
OK
---------------------------

Re: Image Tool Batch Converter

Posted: 31 Aug 2008, 16:58
by nigelb
So something like this with the first part being changed for your path to imagetool.exe

C:\Progra~1\FS2004~1\TERRAI~1\Terrai~1\imagetool -batch -DXT3 -mip -alpha *.bmp
ren *.mip *.bmp


That will take DXT3 files with no mips and create mips. It saves them as *.mip (* = whatever the texture file name)
and preserves the original texture file. If you then zip the originals (just in case) and rename all the *.mip files to *.bmp you should now have a texture file with 9 levels of mip.

There probably is a more elegant way of doing it to avoid renaming extensions and maybe someone knows how to do that.

STUPID I don't!

N II

Re: Image Tool Batch Converter

Posted: 31 Aug 2008, 17:50
by Garry Russell
Don't forget all Texture have mips whether they are saved with mips or not

The mips we talk about via that little box in DXTBMP are "Forced mipmaps"

Those 9 layers of mips are there either way.....if you follow :think:

Garry

Re: Image Tool Batch Converter

Posted: 31 Aug 2008, 23:52
by nigelb
:think:
Good point, Gary! I suppose we should refer to them as hidden mips rather than no mips.