Skip to content

Latest commit

Β 

History

77 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ChannelSmith

Texture Channel Packing/Unpacking Tool for Game Development

Status Version Python Platform License: MIT Tests


πŸ“– What is ChannelSmith?

ChannelSmith is a desktop application that allows game developers and technical artists to efficiently manage texture channel packing. It reduces texture memory usage by combining multiple grayscale maps (Roughness, Metallic, Ambient Occlusion, etc.) into a single RGBA image.

Key Features

βœ… Pack multiple grayscale textures into one RGBA image
βœ… Unpack existing packed textures to extract individual channels
βœ… Repack textures with different template formats (e.g., ORM β†’ ORD)
βœ… Replace individual channels without recreating entire textures
βœ… Smart defaults for missing texture channels
βœ… Template system with predefined and custom packing configurations

Benefits

  • πŸ“‰ Reduce memory usage by ~75% (4 textures β†’ 1)
  • ⚑ Faster loading times in game engines
  • πŸ”„ Flexible workflows for different engine requirements
  • 🎯 Industry-standard templates (ORM, ORD)

πŸ“₯ Download & Run

Standalone Executable (Easiest)

No Python required! Download the latest release:

Platform Download
Windows 10+ ChannelSmith-Windows.zip
macOS 12+ ChannelSmith-macOS.zip
Linux ChannelSmith-Linux.tar.gz

Extract and double-click to run. Browser opens automatically.

See full installation guide β†’


πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)

Installation

  1. Clone or download the project:

    git clone <repository-url>
    cd ChannelSmith
  2. Create virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt

Usage - Web UI (Recommended) 🌐

ChannelSmith features a modern web-based interface with Flask backend and Tailwind CSS styling!

Windows

Double-click launch_web_ui.bat or run:

python -m channelsmith

macOS / Linux

Make scripts executable (first time only):

chmod +x launch_web_ui.sh launch_simple.sh install.sh

Then run the launcher:

./launch_web_ui.sh

Or for setup first time:

./install.sh

The browser opens automatically at http://localhost:5000

Web UI Features

  • 🎨 Modern Dark Theme - Professional Tailwind CSS design
  • πŸ–±οΈ Drag-and-Drop - Upload images by dragging to zones
  • πŸ‘οΈ Live Preview - See channels in real-time as you upload
  • πŸ“₯ Download Results - Get packed or unpacked images instantly
  • πŸš€ No External Tools - Everything in your browser

Web UI Workflow

Pack Textures:

  1. Open http://localhost:5000 (auto-opens in browser)
  2. Stay on "Pack Channels" tab
  3. Select template (ORM, ORD, etc.)
  4. Drag or click to upload Red, Green, Blue channels
  5. (Alpha channel optional)
  6. Click "Pack Texture"
  7. Download packed PNG immediately

Unpack Textures:

  1. Switch to "Unpack Texture" tab
  2. Upload your packed texture
  3. Select correct template
  4. Click "Unpack Texture"
  5. Download extracted channels as individual PNG files

Complete Testing Guide

See WEB_UI_TESTING.md for:

  • Automated API tests (22 tests, all passing)
  • Manual testing workflows
  • Edge case testing
  • Browser compatibility
  • Performance benchmarks

Programmatic API (Python)

For automation or scripting:

from channelsmith.core.packing_engine import pack_texture_from_template
from channelsmith.templates.template_loader import load_template
from channelsmith.utils.image_utils import load_image, save_image

# Load template
template = load_template("channelsmith/templates/orm.json")

# Load individual texture maps
ao_map = load_image("textures/ao.png")
roughness_map = load_image("textures/roughness.png")
metallic_map = load_image("textures/metallic.png")

# Pack into single texture
textures = {
    'ambient_occlusion': ao_map,
    'roughness': roughness_map,
    'metallic': metallic_map
}

packed = pack_texture_from_template(textures, template)

# Save result
save_image(packed, "output/material_orm.png")

πŸ“š Documentation

Installation & Getting Started

  • INSTALL.md ⭐ START HERE - Complete installation guide (3 methods)
  • SETUP.md - Environment setup for developers
  • cs_wiki.md - User guide with workflows and FAQs (also in-app)

Testing & Development

Release Information


πŸ—οΈ Project Structure

ChannelSmith/
β”œβ”€β”€ channelsmith/               # Main package
β”‚   β”œβ”€β”€ core/                  # Packing/unpacking engine
β”‚   β”œβ”€β”€ api/                   # Flask REST API (NEW)
β”‚   β”‚   β”œβ”€β”€ app.py            # Flask app factory
β”‚   β”‚   β”œβ”€β”€ routes.py         # API endpoints (pack, unpack, templates)
β”‚   β”‚   └── utils.py          # Image utilities & validation
β”‚   β”œβ”€β”€ frontend/              # Web UI
β”‚   β”‚   β”œβ”€β”€ index.html        # Single-page app
β”‚   β”‚   β”œβ”€β”€ styles.css        # Tailwind CSS styling
β”‚   β”‚   └── app.js            # Vanilla JavaScript logic
β”‚   β”œβ”€β”€ templates/             # Template JSON files & loader
β”‚   └── utils/                 # Utilities
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ test_api/             # API endpoint tests
β”‚   β”œβ”€β”€ test_core/            # Core engine tests
β”‚   └── ...
β”œβ”€β”€ docs/                      # Documentation
β”œβ”€β”€ WEB_UI_TESTING.md          # Web UI testing guide (NEW)
β”œβ”€β”€ SETUP.md                   # Installation guide
β”œβ”€β”€ requirements.txt           # Python dependencies
└── README.md                  # This file

πŸ› οΈ Development Status

Current Phase: Post-Beta with Web MVP ✨

Goal: Deliver production-ready web UI with full pack/unpack workflows

Progress:

  • βœ… Core packing/unpacking engine (Alpha - Complete)
  • βœ… Template system with ORM/ORD templates
  • βœ… Web UI MVP - Flask REST API + Tailwind CSS frontend (NEW)
  • βœ… Full pack/unpack workflows
  • βœ… Drag-and-drop support
  • βœ… Live preview with Base64 encoding
  • βœ… Browser auto-launch
  • βœ… API tests (22 comprehensive tests, all passing)
  • βœ… Core tests (207 tests, all passing, no regressions)
  • πŸ”„ Advanced features (batch processing, custom templates UI)

Test Coverage:

  • Core Engine: 207 tests βœ“
  • REST API: 22 tests βœ“
  • Total: 229 tests passing

Roadmap

  • Alpha: Core engine βœ…
  • Beta: Web MVP with Flask + Tailwind βœ…
  • RC: Bug fixes, performance optimization, advanced features
  • v1.0: Production release

πŸ§ͺ Running Tests

# Run all tests
pytest

# Run with coverage report
pytest --cov=channelsmith --cov-report=html

# Run specific test file
pytest tests/test_core/test_packing_engine.py

🀝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md for:

Code of conduct Development setup Coding standards Pull request process Testing requirements

This project is licensed under the MIT License - see LICENSE for details.


πŸŽ“ For Developers

First Time Setup

  1. Read SETUP.md for environment setup
  2. Read CLAUDE.md for architecture overview
  3. Check ALPHA_TASKS.md for current tasks
  4. Review docs/MVP_Documentation.md for full specs

Development Workflow

  1. Activate virtual environment: source venv/bin/activate
  2. Create feature: Work on dev branch
  3. Write tests first (TDD approach)
    • Core logic: tests/test_core/
    • API endpoints: tests/test_api/
  4. Format code: black channelsmith/
  5. Run tests: pytest tests/ (expect 229+ passing)
  6. Run API tests specifically: pytest tests/test_api/ -v
  7. Commit: git commit -m "feat(scope): description"

Testing the Web UI

See WEB_UI_TESTING.md for complete guide including:

  • Quick start (2 minutes)
  • Automated API tests
  • Manual testing workflows
  • Edge case testing
  • Browser compatibility

Code Standards

  • File naming: snake_case
  • Type hints: Required on all functions
  • Docstrings: Google style, required on all public APIs
  • Testing: pytest, >80% coverage target
  • Formatting: black
  • Linting: pylint

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details. Copyright (c) 2026 Giuseppe Alfano


πŸ“ž Contact


Status: WebUI - Beta

Version: 0.3.0 Last Updated: February 9, 2026


Made with ❀️ by lod0it & Claude

About

Python3 webUI - Texture Channel Packer/Unpacker

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages