3.8 KiB
3.8 KiB
User Guide: Features
This document outlines the key features of the Asset Processor Tool.
Core Processing & Classification
- Preset-Driven: Uses JSON presets (
presets/) to define rules for different asset suppliers (e.g.,Poliigon.json). - Multi-Asset Input Handling: Correctly identifies and processes multiple distinct assets contained within a single input
.zip,.rar,.7zarchive, or folder, creating separate outputs for each. - File Classification: Automatically identifies map types (Color, Normal, Roughness, etc.), models, explicitly marked extra files, and unrecognised files based on preset rules.
- Variant Handling: Map types listed in
RESPECT_VARIANT_MAP_TYPES(inconfig.py, e.g.,"COL") always receive a numeric suffix (-1,-2, etc.). Numbering priority uses preset keyword order first, then alphabetical filename sorting as a tie-breaker. Other map types never receive a suffix. - 16-bit Prioritization: Correctly identifies and prioritizes 16-bit variants defined in preset
bit_depth_variants(e.g.,*_NRM16.tif), ignoring the corresponding 8-bit version (marked asIgnoredin GUI).
- Variant Handling: Map types listed in
- Map Processing:
- Resizes texture maps to configured resolutions (e.g., 4K, 2K, 1K), avoiding upscaling.
- Handles Glossiness map inversion to Roughness.
- Applies bit-depth rules (
respectsource orforce_8bit). - Saves maps in appropriate formats (JPG, PNG, EXR) based on complex rules involving map type (
FORCE_LOSSLESS_MAP_TYPES), resolution (RESOLUTION_THRESHOLD_FOR_JPG), bit depth, and source format. - Calculates basic image statistics (Min/Max/Mean) for a reference resolution.
- Calculates and stores the relative aspect ratio change string in metadata (e.g.,
EVEN,X150,Y125).
- Channel Merging: Combines channels from different maps into packed textures (e.g., NRMRGH) based on preset rules (
MAP_MERGE_RULESinconfig.py). - Metadata Generation: Creates a
metadata.jsonfile for each asset containing details about maps, category, archetype, aspect ratio change, processing settings, etc. - Output Organization: Creates a clean, structured output directory (
<output_base>/<supplier>/<asset_name>/). - Optimized Classification: Pre-compiles regular expressions from presets for faster file identification.
Interface & Automation
- Dual Interface: Provides both a user-friendly GUI and a powerful CLI.
- Parallel Processing: Utilizes multiple CPU cores for faster processing (configurable via
--workersin CLI or GUI control). - Skip/Overwrite: Can skip processing if the output already exists or force reprocessing (
--overwriteflag / checkbox). - Directory Monitor: Includes
monitor.pyscript for automated processing of assets dropped into a watched folder. - Responsive GUI: Uses background threads (
QThread,ProcessPoolExecutor,ThreadPoolExecutor) to keep the UI responsive during intensive operations. - GUI Features:
- Drag-and-drop input (ZIPs / folders).
- Integrated preset editor panel.
- Configurable output directory field with browse button.
- Enhanced live preview table showing predicted file status.
- Toggleable preview mode (detailed file list vs simple asset list).
- Toggleable log console panel.
- Progress bar, cancellation button, clear queue button.
Integration
- Blender Integration: Optionally runs Blender scripts (
create_nodegroups.py,create_materials.py) after asset processing to automate node group and material creation in specified.blendfiles. Available via both CLI and GUI.- GUI Controls: Checkbox to enable/disable Blender integration and input fields with browse buttons for target
.blendfiles.
- GUI Controls: Checkbox to enable/disable Blender integration and input fields with browse buttons for target
- Docker Support: Includes a
Dockerfilefor containerized execution.