Spaces:
Sleeping
Sleeping
File size: 1,120 Bytes
346b70f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# 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: `ConversionResult` with processed meshes, palette, and scene metadata
## Dependencies
- Internal: All submodules
- External: numpy, trimesh, PIL, scikit-learn, scipy |