The Blog

[Release] LSDxt DXT Compressor 3.0

The third version of my DXT compressor is now available for release here.

Texture addressing modes and new filters are the main additions this time, along with alternative command-line options to make it more compatible with existing tools.

Changes:
Added quadratic and B-Spline filters.
Added alternative commands (bc1, bc1a, bc2, bc3, f, g, clamp, mirror, repeat, wrap, reflect, and nomips).
Added wrap and mirror addressing modes.

 

Here is a list of the commands:

-file <path> Input file to process.  There can be multiple of these.
-outfile <path> Output file for the last -file input.  By default, if no output file is specified, the default for any given input is the same as the input path but with a .dds extension.  This allows to optionally override this default.
-dxt1c | bc1 Exports as DXT1 (color only).
-dxt1a | bc1a Exports as DXT1 (1-bit alpha).
-dxt2 Exports as DXT2.
-dxt3 | bc2 Exports as DXT3.  Default.
-dxt4 Exports as DXT4.
-dxt5 | bc3 Exports as DXT5.
-A8B8G8R8 Exports as uncompressed A8B8G8R8 format.
-G16R16 Exports as uncompressed G16R16 format.
-A2B10G10R10 Exports as uncompressed A2B10G10R10 format.
-A1R5G5B5 Exports as uncompressed A1R5G5B5 format.
-R5G6B5 Exports as uncompressed R5G6B5 format.
-A8 Exports as uncompressed A8 format.
-A8R8G8B8 Exports as uncompressed A8R8G8B8 format.
-X8R8G8B8 Exports as uncompressed X8R8G8B8 format.
-X8B8G8R8 Exports as uncompressed X8B8G8R8 format.
-A2R10G10B10 Exports as uncompressed A2R10G10B10 format.
-R8G8B8 Exports as uncompressed R8G8B8 format.
-X1R5G5B5 Exports as uncompressed X1R5G5B5 format.
-A4R4G4B4 Exports as uncompressed A4R4G4B4 format.
-X4R4G4B4 Exports as uncompressed X4R4G4B4 format.
-A8R3G3B2 Exports as uncompressed A8R3G3B2 format.
-A8L8 Exports as uncompressed A8L8 format.
-L16 Exports as uncompressed L16 format.
-L8 Exports as uncompressed L8 format.
-A4L4 Exports as uncompressed A4L4 format.
-quick When used with a DXT format, low quality and high speed are used for the compression.  Deprecated.
-quality_normal When used with a DXT format, medium quality and speed are used for the compression.  Deprecated.
-quality_production When used with a DXT format, high quality and low speed are used for the compression.  Deprecated.
-quality_highest When used with a DXT format, maximum quality and lowest speed are used for the compression.  Deprecated.
-prescale <int> <int> Rescales the image(s) to this size before converting.
-rescale <nearest | hi | lo> Rescales the image(s) to nearest, next-highest or next-lowest power of two.
-rel_scale <float> <float> Relative scale of the original image(s). 0.5 is half size.  Default is 1.0 1.0
-RescaleBox Rescales the image using a box filter.  Default.
-RescaleTent Rescales the image using a bilinear filter.
-RescaleQuadratic Rescales the image using a quadratic filter.
-RescaleKaiser Rescales the image using a Kaiser filter.
-RescaleLanczos3 Rescales the image using a Lanczos3 filter.
-RescaleLanczos4 Rescales the image using a Lanczos4 filter.
-RescaleLanczos6 Rescales the image using a Lanczos6 filter.
-RescaleLanczos8 Rescales the image using a Lanczos8 filter.
-RescaleLanczos12 Rescales the image using a Lanczos12 filter.
-RescaleLanczos64 Rescales the image using a Lanczos64 filter.
-RescaleMitchell Rescales the image using a Mitchell filter.
-RescaleCatrom Rescales the image using a Catmull-Rom filter.
-RescaleBSpline Rescales the image using a B-Spline filter.
-RescaleBlackman Rescales the image using a Blackman filter.
-RescaleGaussian Rescales the image using a Gaussian filter.
-RescaleBell Rescales the image using a Bell filter.
-Box A box filter will be used for mipmaps.
-Tent A bilinear filter will be used for mipmaps.
-Quadratic A quadratic filter will be used for mipmaps.
-Kaiser A Kaiser filter will be used for mipmaps.  Default.
-Lanczos3 A Lanczos3 filter will be used for mipmaps.
-Lanczos4 A Lanczos4 filter will be used for mipmaps.
-Lanczos6 A Lanczos6 filter will be used for mipmaps.
-Lanczos8 A Lanczos8 filter will be used for mipmaps.
-Lanczos12 A Lanczos12 filter will be used for mipmaps.
-Lanczos64 A Lanczos64 filter will be used for mipmaps.
-Mitchell A Mitchell filter will be used for mipmaps.
-Catrom A Catmull-Rom filter will be used for mipmaps.
-BSpline A B-Spline filter will be used for mipmaps.
-Blackman A Blackman filter will be used for mipmaps.
-Gaussian A Gaussian filter will be used for mipmaps.
-Bell A Bell filter will be used for mipmaps.
-f <box | quadratic | bspline | mitchell | lanczos | kaiser> Selects the type of filter that will be used for rescaling. This is a short alternative to the -Rescale* set of commands. “lanczos” here is equivalent to -RescaleLanczos64.
-clamp <int> <int> Clamps the image width and height between the given values.
-nomipmap | nomips If specified, mipmaps are not generated.
-nmips <int> Specifies the maximum number of mipmaps to generate.
-rgbe Specifies that the input image(s) is/are in linear space already.
-flip Flips the image vertically.
-swap Swaps the R and B channels.
-norm Normalizes the image for each mipmap level.  Used for normal maps.
-weight <float> <float> <float> Specifies the weights to be used during DXT compression.  Defaults are 0.212639005871510 0.715168678767756 0.072192315360734.
-gamma | g <float> Specifies the gamma to use during resampling and mipmap generation.  Any negative values cause it to use the full IEC 61966-2-1 compliant conversion rather than a pow() approximation (all values below 0 are treated equally).  Default is -2.2 (full standard conversion).
-clamp Specifies to use the clamp-type texture address mode for filtering.
-repeat | wrap Specifies to use the repeat-type texture address mode for filtering.
-mirror | reflect Specifies to use the mirror-type texture address mode for filtering.
-alpha_threshold <int> Specifies the cut-off for DXT1a alpha.  Values below this point are treated as alpha = 0.  Valid range is 0 to 255.
-pause Pauses the console after completing the operation.

 

Examples:

“LSDxt x64.exe” -file “image.png” -nmips 5 Creates image.dds with a maximum of 5 mipmap levels.  DXT3 format is used.
“LSDxt x64.exe” -file “image0.png” -file “image1.png” Creates image0.dds and image1.dds.  DXT3 format is used.
“LSDxt x64.exe” -file “image0.png” -file “image1.png” -outfile “main.dds” Creates image0.dds and main.dds.  DXT3 format is used.
“LSDxt x64.exe” -file “image.png” -rescale hi -ResampleBox -Blackman Rescales the image to the next-highest power-of-2 if it is not already a power-of-2.  The rescale uses a box filter while mipmaps use a Blackman filter.  DXT3 format is used.
“LSDxt x64.exe” -file “image.png” -weight 0.3086 0.6094 0.082 Creates a DXT3 image named image.dds with custom RGB weights of 0.3086 0.6094 0.082.

 

Many more commands will follow in future releases, including options for converting heightmaps to normal maps, fading alpha levels in mipmaps, sharpening mipmaps, etc.

 

 

L. Spiro

About L. Spiro

L. Spiro is a professional actor, programmer, and artist, with a bit of dabbling in music. || [Senior Core Tech Engineer]/[Motion Capture] at Deep Silver Dambuster Studios on: * Homefront: The Revolution * UNANNOUNCED || [Senior Graphics Programmer]/[Motion Capture] at Square Enix on: * Luminous Studio engine * Final Fantasy XV || [R&D Programmer] at tri-Ace on: * Phantasy Star Nova * Star Ocean: Integrity and Faithlessness * Silent Scope: Bone Eater * Danball Senki W || [Programmer] on: * Leisure Suit Larry: Beach Volley * Ghost Recon 2 Online * HOT PXL * 187 Ride or Die * Ready Steady Cook * Tennis Elbow || L. Spiro is currently a GPU performance engineer at Apple Inc. || Hyper-realism (pencil & paper): https://www.deviantart.com/l-spiro/gallery/4844241/Realism || Music (live-played classical piano, remixes, and original compositions): https://soundcloud.com/l-spiro/

1 Awesome Comments So Far

Don't be a stranger, join the discussion by leaving your own comment
  1. Dv
    March 27, 2015 at 10:17 AM #

    “L. Spiro currently makes video games…”

    No, you don’t “make video games”. You are just part of it. These oversimplified self-descriptions are stupid.

    Why for God’s sake have you changed your ‘about’ text to this? Do you not care about the games you have worked on previously anymore? Don’t you consider yourself a veteran of the game industry anymore?

Leave a Comment

Remember to play nicely folks, nobody likes a troll.