MeshPalettizer / src /context.md
dylanebert's picture
initial commit
346b70f

A newer version of the Gradio SDK is available: 6.1.0

Upgrade

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