Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.1.0
Mesh Palettizer Core
Core library for 3D model texture palette optimization
Purpose
- Extract colors from mesh textures and materials
- Generate optimized palettes via perceptual clustering
- Build color palettes and remap mesh UVs
- Support multi-mesh scenes with shared textures
Layout
src/
βββ context.md # This file
βββ __init__.py # Main API: convert_meshes()
βββ preprocessing/ # Texture detail removal
βββ extraction/ # Color extraction from meshes
βββ palette/ # Palette generation and mapping
βββ atlas/ # Palette texture creation
βββ mesh/ # UV remapping
Scope
- In-scope: Mesh processing, color quantization, UV mapping
- Out-of-scope: File I/O, API calls, web interface
Entrypoints
convert_meshes(mesh_list, atlas_size, face_sampling_ratio, simplify_details, detail_sensitivity, scene_metadata)- Main API- Returns:
ConversionResultwith processed meshes, palette, and scene metadata
Dependencies
- Internal: All submodules
- External: numpy, trimesh, PIL, scikit-learn, scipy