TexOps Addon / Extension

TexOps

TexOps is a comprehensive texture operations toolkit for Blender’s Image Editor, providing professional-grade tools for texture packing, map conversion, and image manipulation. All tools are accessible from a dedicated “TexOps” panel in the Image Editor sidebar.

Features


Image Tools

Basic image manipulation operations with undo support, available directly in the Image Editor.

Mode Selection

  • Current: Edit the active image in the Image Editor.
  • Batch: Process all images in a folder.

Invert Operations

  • RGB: Invert red, green, and blue channels.
  • RGBA: Invert all four channels including alpha.
  • R / G / B / A: Invert individual channels independently.

Clear Operations

  • R / G / B / A: Set individual channels to zero (black).
  • Grayscale: Convert image to grayscale using luminance weights.

Flip / Mirror

  • Flip H / Flip V: Mirror entire image horizontally or vertically.
  • L / R / T / B: Mirror one half onto the other (Left→Right, Right→Left, Top→Bottom, Bottom→Top).

Rotate

  • -90 / 180 / +90: Rotate image by specified degrees.

Resize

  • Lock Aspect: Maintain aspect ratio when changing dimensions.
  • Width / Height: Target dimensions in pixels.
  • Method: Nearest, Bilinear, or Bicubic interpolation.
  • Get Size: Copy current image dimensions to the resize fields.

Crop

  • L / R / T / B: Number of pixels to remove from each edge.

Offset (Wrap)

  • X / Y: Shift image with wrapping (useful for checking seamless tiling).

Scale (Tile)

  • Percent: Scale and tile the image within its original dimensions.

Undo System

  • Undo / Redo: Per-image undo history (up to 20 states) for all operations.

RGBA Toggles

Channel visibility controls added to the Image Editor tool header for quick channel isolation and inspection.

Channel Buttons (R / G / B / A)

  • Click: Toggle individual channel visibility on/off.
  • Shift+Click: Isolate channel (displays as grayscale, all other channels hidden).
  • Shift+Click Again: Return to showing all channels.

Transparency Toggle

  • Texture Icon: Toggle alpha transparency display (checkerboard background vs. opaque).

Behavior

  • Disabled channels display as black (zero contribution).
  • Isolated channels display as grayscale for accurate value inspection.

Channel Packer

Pack multiple grayscale textures into the RGBA channels of a single image.

Main Controls

  • Input Mode (Single/Batch): Process individual images or entire folders.
  • Channel Slots (R/G/B/A): Assign any loaded image to each output channel.
  • Channel Source Dropdown: Select which channel (R/G/B/A/Gray) to extract from each input image.
  • Constant Values: Use 1.0 (white) or 0.0 (black) as channel inputs instead of images.

Output Options

  • Lock Aspect: Maintain aspect ratio when resizing.
  • Output Dimensions: Set custom width/height (0 = match input).
  • Format/Depth: Choose output format (PNG, TGA, TIFF, EXR) and bit depth (8/16/32).

Bit Packer

Pack multiple textures into a single image using bit subdivision—store 2, 4, or 8+ textures per channel by quantizing each to fewer bits.

Bit Mode

  • 8-bit: Up to 8 textures per channel (1-bit each) or fewer at higher quality.
  • 16-bit: Up to 16 textures per channel with more bit allocation options.
  • 32-bit: Up to 32 textures per channel, EXR output only.

Per-Channel Configuration

  • Texture Count: Select how many textures to pack into each RGBA channel (0-8/16/32).
  • Layout: Choose bit distribution (e.g., 4 x2 = two 4-bit textures, 8 = one 8-bit texture).
  • Input Slots: Assign images and source channels per texture slot.

Additional Options

  • Dithering: None, Ordered (Bayer), Noise, or Blue Noise to reduce banding artifacts.
  • Batch Mode: Automatically pack folders of sequentially-named textures.

Resolution Packer

Reduce texture resolution by splitting an image into quadrants and packing them into RGBA channels with optional bit-packing for extreme compression.

Reduction Modes

  • 1/2: 2×2 grid → 4 quadrants at full bit precision (one per channel).
  • 1/4: 4×4 grid → 16 quadrants bit-packed (4 per channel).
  • 1/8: 8×8 grid → 64 quadrants bit-packed (16 per channel, 16/32-bit only).

Bit Mode

  • 8-bit / 16-bit / 32-bit: Controls precision per quadrant and available reduction modes.

Use Cases

  • Extreme VRAM savings (e.g., 2048×2048 → 256×256 with 1/8 mode).

Map Converter

Convert and derive PBR texture maps from height and normal maps.

Height Map Conversions

  • Height → Normal: Generate normal map with adjustable strength (negative inverts).
  • Height → AO: Horizon-based ambient occlusion approximation.
  • Height → Cavity: Extract fine surface detail.
  • Height → Slope: Generate slope mask (white=steep, black=flat).

Normal Map Conversions

  • Normal → AO: Approximate occlusion from normal variance.
  • Normal → Curvature: Extract convex/concave information.
  • Normal → Cavity: Extract surface cavities.
  • Normal → Height: Integrate normals back to height (iterative solver).

Normal Map Utilities

  • Normal DX ↔ GL: Convert between DirectX and OpenGL conventions.
  • Normal XY → XYZ: Derive Z channel from XY-only normal maps.
  • Normal + AO → Bent Normal: Combine normal and AO into bent normal.

Parameters

  • Strength: Intensity multiplier (negative values invert direction).
  • Radius: Sample radius for AO/cavity calculations.
  • Normal Format: Output as OpenGL (Y+ up) or DirectX (Y+ down).

Seamless Generator

Convert non-tiling textures into seamless/tileable textures using edge blending that preserves the center content.

Algorithm

  • Two-pass edge blending: horizontal edges blended first, then vertical.
  • Shifted copies of the image are blended at edges using smoothstep falloff.
  • Center of the texture remains largely unchanged.

Parameters

  • Blend Zone: Size of edge blend region as fraction of image (5-50%). Higher values create smoother transitions but affect more of the image center.

Pre-Averaging

  • Intensity: Strength of brightness normalization (0-100%). Evens out lighting variations across the image to reduce visible seams from uneven illumination.
  • Radius: Size of local averaging window. Larger values normalize over bigger areas.

Preview

  • Preview Tiling: Generate a 2×2 tiled preview to visually check for seams before saving.

Dilation

Expand RGB colors into transparent (alpha) regions—essential for preventing UV seam artifacts and mip-map bleeding in game engines.

How It Works

  • Iteratively fills transparent pixels with averaged colors from neighboring opaque pixels.
  • Continues until all transparent areas are filled or max distance is reached.

Parameters

  • Alpha Threshold: Pixels with alpha above this value are considered opaque (source for dilation).
  • Edge Offset: Erode (negative) or dilate (positive) the initial mask before processing. Useful for pulling colors inward or pushing them out.
  • Max Distance: Maximum pixels to dilate outward (0 = fill entire image).
  • Style: Square (8-connected, faster) or Diamond (4-connected, smoother diagonals).

Alpha Mode

  • Fill Alpha: Set dilated pixels to fully opaque (alpha = 1).
  • Keep Alpha: Preserve original alpha values.
  • Remove Alpha: Output RGB only (no alpha channel).

Preview

  • Preview Mask: Visualize the alpha mask that will be used for dilation.

PBR Validator

Validate and correct PBR textures against physically-based rendering standards for the metallic workflow.

Input

  • Albedo Image: Base color texture (sRGB).
  • Packed Image: Combined metallic/roughness texture.
  • Channel Mapping: Specify which channels contain roughness and metallic data.

Validation Checks

  • Albedo: Luminance must be within valid ranges for metals (bright, 180-255 sRGB) vs. non-metals (mid-range, 50-240 sRGB).
  • Metallic: Should be binary (0 or 1) except in valid transition zones (dust, coatings).
  • Roughness: Should avoid pure extremes (not exactly 0 or 1).

Validation Options

  • Strict: Use tighter albedo tolerances (industry standard).
  • Transitions: Allow metallic gradients where surface gradients exist (physically valid for mixed materials).
  • Gradient: Show severity of violations as gradient instead of binary mask.

Validation Output

  • RGB visualization: Red = albedo issues, Green = metallic issues, Blue = roughness issues.

Auto-Correction

  • Clamps albedo to valid luminance ranges.
  • Snaps metallic to binary 0/1 with smooth transitions.
  • Clamps roughness away from pure extremes.
  • Preserves alpha channels and saves corrected textures.

Rasterizer

Rasterize Blender Curve objects and SVG files to texture images with anti-aliasing, fill, and color support.

Input Types

  • Curve: Single Blender curve object.
  • Collection: All curves in a collection (layered back-to-front by Z order).
  • Batch: Process all SVG files in a folder.

Rasterization Settings

  • Line Width: Stroke width as percentage of image size.
  • Margin: Padding around the shape in pixels.
  • Fill: Fill closed shapes (vs. stroke only).
  • Antialiasing: Smooth edges with anti-aliasing.
  • Force B&W: Ignore material colors, output white shapes.
  • Quality: Curve subdivision quality (higher = smoother curves).
  • Background: Background color with alpha support.

Color Extraction

  • Automatically extracts colors from curve materials (Principled BSDF, Diffuse, Emission).
  • Falls back to object viewport color if no material assigned.

Use Cases

  • Convert vector logos to textures.
  • Rasterize procedural curve-based designs.
  • Batch process SVG assets for game engines.

SDF Generator

Generate Signed Distance Fields from images, curves, or SVG files using the Jump Flooding Algorithm for fast, accurate results.

Input Types

  • Image: Binary/grayscale image with threshold control.
  • Curve: Single Blender curve object.
  • Collection: Multiple curves combined into one SDF.
  • Batch: Process folders of images and SVG files.

Distance Range

  • Inner Distance: Maximum distance computed inside shapes (pixels).
  • Outer Distance: Maximum distance computed outside shapes (pixels).
  • Presets: Signed (equal inner/outer), Unsigned (outer only), Inner only, Outer only.

Edge Behavior

  • Edge Mode: None, Falloff (fade at image edges).
  • Edge Bevel: Round corners of the edge boundary.
  • Edge Falloff: Distance over which edge fades.
  • Edge Margin: Inset from image border.
  • Edge Blend: Multiply, Smooth Min, or Smooth Max blending.

Curve Settings

  • Curve Margin: Padding around curves in output.
  • Curve Quality: Subdivision quality for smooth curves.

Preview Tools

  • Preview Threshold: See binary mask before generating SDF.
  • Preview Edge: Visualize edge falloff settings.

MSDF Generator

Generate Multi-channel Signed Distance Fields from Blender curves for superior edge and corner quality.

What is MSDF?
Unlike standard SDF which uses a single channel, MSDF encodes distance information across RGB channels with edge-aware coloring. This preserves sharp corners and fine details that would be lost in regular SDF, making it ideal for text and complex shapes.

Input Types

  • Curve: Single Blender curve object.
  • Collection: Multiple curves combined into one MSDF.
  • Batch: Process all SVG files in a folder.

Parameters

  • Range: Distance field radius in pixels (how far from edges to compute).
  • Margin: Padding around the shape in output image.
  • Angle Threshold: Corner detection angle (affects edge coloring).
  • Invert: Swap inside/outside (useful for cut-out shapes).
  • Quality: Curve subdivision quality for smoother results.

Edge Coloring

  • Automatically assigns colors to edges following the MSDF algorithm.
  • Adjacent edges at corners share exactly one channel for proper median reconstruction.
  • Single-edge contours use white (all channels).

Output

  • RGB image where median(R, G, B) reconstructs the distance field.
  • Superior quality for text, icons, and shapes with sharp corners.

CSM Generator

Generate Cone Step Mapping textures from height maps for efficient parallax occlusion rendering in real-time graphics.

What is CSM?
Cone Step Mapping pre-computes “safe step” distances for ray marching, allowing much faster convergence than traditional parallax occlusion mapping. The cone ratio at each pixel indicates how far a ray can safely travel without missing surface details.

Anisotropic Sectors

  • 1 Sector: Isotropic (omnidirectional) cone ratios—fastest to generate, works for all viewing angles equally.
  • 2 Sectors: Two directional cones (e.g., horizontal/vertical split).
  • 3 Sectors: Three directional cones packed into RGB.
  • 4 Sectors: Four directional cones packed into RGBA (most accurate, no room for height).

Algorithm Options

  • Relaxed: Improved accuracy by sampling intermediate points along rays (recommended).
  • Robust: Applies 3×3 minimum filter to prevent bilinear interpolation artifacts.

Height Packing

  • Pack Height: Include original height map in output (only available with 1-3 sectors).
  • Height Channel: Place height in First or Last channel position.

Parameters

  • Search Radius: Maximum pixel distance to search for occluders (higher = more accurate, slower).
  • Input Channel: Which channel to read height data from (R/G/B/A/Gray).

Output

  • 1-4 channel image depending on sector count and height packing.
  • Each channel stores cone ratios (0-1) for its angular sector.

Unpacker

Reverse packing operations—extract individual textures from packed images.

Modes

  • Channel Split: Extract R/G/B/A channels as separate grayscale images.
  • Bit Unpack: Reverse bit-packing using matching bit mode and layout settings.
  • Resolution Unpack: Reconstruct full-resolution image from resolution-packed RGBA.

Bit Unpack Configuration

  • Bit Mode (8/16/32): Must match the original packing bit depth.
  • Per-Channel Layout: Set texture count and bit layout for each channel.
  • Suffix Fields: Custom naming for each extracted texture.

Resolution Unpack Configuration

  • Bit Mode: Must match original packing settings.
  • Reduction Mode (1/2, 1/4, 1/8): Must match original reduction level.

Common Features

Batch Processing

  • Most tools support batch mode for processing entire folders of images with progress indication and automatic output naming.

Batch Overwrite Protection

  • When batch processing with the output folder set to the same location as the input folder (or left empty), a confirmation dialog warns that original files will be overwritten. This prevents accidental data loss.

Format Support

  • Input: PNG, TGA, TIFF, EXR, JPEG, BMP, and other Blender-supported formats.
  • Output: PNG, TGA, TIFF, EXR with configurable bit depth (8/16/32-bit).

Smart Color Mode

  • Output images automatically use the optimal color mode (BW/RGB/RGBA) based on actual content, reducing file sizes when full color or alpha isn’t needed.

Non-Destructive Workflow

  • All operations create new images rather than modifying originals, with customizable output names, suffixes, and destination folders.

Support the Developer!

Download for Free!

Find a bug? Let me know!

3 Likes

Hoooooooly , such tools are a godsend! LOL even bent normal, just by this I dare to claim that you are hyped about S&box engine.