Modified THM Editor by ValeroK


Info

Program Developeri-love-kfc (Original Author)
ValeroK
Described Version1.1
Discussion ForumAp-pro forum topic

About

The THM Editor from i-love-kfc was taken as the basis, finalized and fixed. Allows you to work with .thm files.

thm-editor-by-valerok centered

Features

  • Supports 99% of thm parameters

Functionality

Hotkeys

  • F4 - Open file
  • F5 or Ctrl+S - Save file
  • F6 - Save as

Buttons

ButtonDescription
LoadLoads the selected .thm
SaveSave .thm
Save AsSave as .thm
ExitExit
ButtonDescription
Import DDS ParamsAdjust .thm to the texture format (texture format can be set incorrectly, so sometimes it is worth adjusting it manually)
Generate THM for textureWhen you select a basic texture, the program creates a thm with basic properties for it (if a texture with the prefix _bump is found, the thm will set all the necessary flags for using bumps)

Edit flags

CheckboxDescriptionExtra
Generate Mip MapsEnables MIP-map generation
Has AlphaTakes into account the alpha channel of the map
Binary AlphaAlpha map will use 1 bit
Alpha Border
Color BorderIn this mode, a color arbitrarily specified by the user is used for the area outside the texture coordinate range
Fade To ColorFade to choosed color
Fade To AlphaFade to alpha
Dither ColorEnables Dither Coloring
Dither Each MIP LevelEnables Dither Coloring on each MIP level
Diffuse DetailDetail Map texture will be used
Implicit Lighted
Detail BumpDetail Map will use its own Bump Map

Texture type

FieldDescription
Image2D texture
Cube MapIs a method of environment mapping that uses the six faces of a cube as the map shape
Bump MapBump Map
Normal MapNormal Map
TerrainTerrain Map

Texture compression formats

FieldDescription
DXT1Compression without alpha channel support
ADXT1Compression with alpha channel support
DXT3
DXT5Compression with alpha channel support
4444aka D3DFMT_A4R4G4B4
Color and alpha texture format, 4 bit per channel
1555aka D3DFMT_A1R5G5B5
A pixel occupies 16 bits (2 bytes) and contains color and transparency information in the following format:
5 bits for the red channel (R)
5 bits for the green channel (G)
5 bits for the blue channel (B)
1 bit for the alpha channel (A)
565aka D3DFMT_R5G6B5
Each pixel occupies 16 bits (or 2 bytes) and contains color information in the following distribution:
5 bits for the red channel (R)
6 bits for the green channel (G)
5 bits for the blue channel (B)
RGBCompression without alpha channel support
RGBACompression with alpha channel support
NVHSNVIDIA High Compression (NVidia Texture Format (GEForce 3))
NVHUNVIDIA High-Quality Texture Compression (NVidia Texture Format)
A88-bit alpha only DirectX Format
L88-bit luminance only DirectX Format
A8L816-bit using 8 bits each for alpha and luminance DirectX Format

Bump Mode

FieldDescription
NoneNone
UseUse Bump mapping method
Use ParallaxUse Parallax mapping method

MIP Filter

Tip

Different algorithms of MIP-map filtering

FieldDescriptionPreview
BoxSimplest MIP-map generation algorithm.
However, the box filter has a number of limitations that can be quite noticeable with certain textures. For example, if a texture contains very narrow features (e.g., lines), then aliasing artifacts may be very pronounced
CubicGeneration with weighted sum of eight pixels.
The advantage of the cubic filter over the box is that it can have negative side lobes (weights) which help maintain sharpness while reducing the image. This can help reduce some of the blurring effect of filtering with mipmaps
Point(aka Nearest-neighbor interpolation)
Uses only one pixel from the mipmap
This is a simple and fast texture filtering method that works well in some cases, but can create visual artifacts and reduce image quality in more complex scenes.
Triangle
QuadraticThis method offers a balance between quality and performance
It uses an interpolation method that is based on quadratic equations. Instead of just selecting one pixel (as in Point), this method considers three pixels - one from the selected mipmap level and the two closest to it - to greatly improve the smoothness of the transition of color values.
Advanced
Catrom
Mitchell
Gaussian
Sinc
Bessel
Hanning
Hamming
Blackman
KaiserIncrease readability of textures by increasing sharpness and contrast

Material

Tip

Different shading algorithms

FieldDescription
OrenNayar BlinOren-Nayar shading is a lighting model used in computer graphics to render matte (rough) surfaces with respect to their micro geometry.
Blinn shading uses a combination of diffuse and specular light reflection to achieve a more realistic image of shiny objects.
Blinn PhongBlinn shading uses a combination of diffuse and specular light reflection to achieve a more realistic image of shiny objects.
Phong shading model can achieve good visual results, making objects appear more three-dimensional and realistic, but at the same time it cannot always accurately reproduce lighting effects on more complex or uneven surfaces.
Phong MetalPhong shading model can achieve good visual results, making objects appear more three-dimensional and realistic, but at the same time it cannot always accurately reproduce lighting effects on more complex or uneven surfaces.
Metal shading is focuses on the realization of materials imitating metallic surfaces.
Metal OrenNayarMetal shading is focuses on the realization of materials imitating metallic surfaces.
Oren-Nayar shading is a lighting model used in computer graphics to render matte (rough) surfaces with respect to their micro geometry.

Checkboxes

  • SOC format - SoC format of *.thm

Fields

FieldDescription
Border Color
Fade Color
Fade Amount
Material WeightShading model weight (0.0 - 1.0)
Detail ScaleDetail Map Scale
Texture WidthTexture Width
Texture HeightTexture Height
Fade Delay
Bump HeightBump Map Height
Detail namePath to Detail Map
Bump namePath to Bump Map
Normal Map namePath to Normal Map

Sources

Source Code of Original THM Editor by i-love-kfc

Source Code of Modified THM Editor by ValeroK