From metashape-mcp
Guides UV mapping, texture atlas generation, color calibration, and quality optimization in Metashape MCP server for 3D meshes. Used after mesh building, covers blending modes, ghosting filter, and artifacts.
npx claudepluginhub jenkinsm13/claude-plugins --plugin metashape-mcpThis skill uses the workspace's default tool permissions.
Generate photo-realistic texture atlases for 3D meshes in Metashape. Covers UV mapping, texture generation, color calibration, and quality optimization. This skill is used AFTER mesh building and BEFORE export.
Guides dense reconstruction in Metashape MCP: builds depth maps, point clouds, meshes, textures, DEMs, orthomosaics post-alignment with optimal GPU/CPU settings via blocking MCP calls.
Guides Adobe Substance 3D Painter workflows for PBR material creation, web-optimized texture export to Three.js, Babylon.js, Unity, Unreal, and Python API batch automation.
Loads, configures, and optimizes Three.js textures including UV mapping, cubemaps, environment maps, color space, wrapping, and filtering. Use for images, materials, HDR, or texture workflows.
Share bugs, ideas, or general feedback.
Generate photo-realistic texture atlases for 3D meshes in Metashape. Covers UV mapping, texture generation, color calibration, and quality optimization. This skill is used AFTER mesh building and BEFORE export.
get_model_stats() should return data)clean_model first)build_uv(
mapping_mode="generic",
texture_size=8192
)
UV mapping modes:
| Mode | Best For | Trade-offs |
|---|---|---|
generic | General purpose, arbitrary geometry | Good balance of distortion and coverage |
adaptive_orthophoto | Terrain, aerial surveys | Optimized for top-down viewing |
orthophoto | Flat surfaces, DEM overlay | Only works for near-planar geometry |
camera | Single-camera texturing | Uses one camera's projection |
For road corridors: generic is the right choice. The geometry is too complex (walls, overhangs, road surface) for orthophoto modes.
build_texture(
blending_mode="natural",
texture_size=8192,
ghosting_filter=True
)
You may also pass anti_aliasing, or if you are baking from another
model (e.g. you decimated a high‑res mesh and want to reuse its texture)
include source_model_key=<int>, transfer_texture=True, and
source_data="model". When using a source model the blending mode must
be "mosaic" to avoid assertion errors in Metashape 2.3+.
If colors look inconsistent across the mesh:
calibrate_colors(
source_data="model"
)
Run this BEFORE build_texture for best results. Color calibration normalizes brightness/color across cameras — critical for long corridors captured over varying lighting conditions.
This is the most important texture decision. Each mode produces dramatically different results.
Default: always use "natural" unless the user explicitly requests otherwise.
build_texture(blending_mode="natural", ...)
build_texture(blending_mode="mosaic", ...)
build_texture(blending_mode="average", ...)
max: Brightest camera value per texel. Useful for detecting features.min: Darkest camera value. Rarely useful.| Output | Recommended Size | Why |
|---|---|---|
| Game engine (Unreal/Unity) | 8192 | VRAM budget sweet spot |
| Web viewer (Cesium, Sketchfab) | 4096 | Bandwidth constraints |
| Film/VFX | 16384 | Maximum detail for close-up renders |
| Preview/testing | 2048–4096 | Fast generation |
| Print (orthophoto poster) | 16384 | DPI requirements |
VRAM budget reality:
For 80 tiles at 8192: ~20 GB texture memory. Most game engines stream/LOD this, but it's worth knowing.
build_texture(ghosting_filter=True, ...)
What it does: Detects and removes texture contributions from cameras that captured moving objects (vehicles, pedestrians, shadows).
Always enable for road corridors. Vehicles and pedestrians appear in multiple camera views at different positions — without ghosting filter, they create blurred/duplicated artifacts on the road surface.
When to disable: Static indoor scenes, objects on turntables, anything without moving elements.
If the mesh was modified (decimated, cleaned, split) after initial texturing:
# UV map may be invalid after mesh changes — rebuild
build_uv(mapping_mode="generic", texture_size=8192)
build_texture(blending_mode="natural", texture_size=8192, ghosting_filter=True)
If only small edits were made and UV is still valid:
# Just rebuild texture, keep existing UV
build_texture(blending_mode="natural", texture_size=8192, ghosting_filter=True)
Pro tip: if you ever need to bake a texture from a previous chunk or
model (for example, transferring a high‑res atlas onto a decimated mesh)
use the source_model_key/transfer_texture parameters described above.
| Cause | Fix |
|---|---|
| Texture size too low | Increase to 8192 or 16384 |
| Blending mode is "average" | Switch to "mosaic" or "natural" |
| Camera resolution too low for mesh detail | Accept or decimate mesh |
| Cameras not well-aligned (high reproj error) | Re-optimize alignment |
| Cause | Fix |
|---|---|
| "mosaic" blending with inconsistent exposure | Switch to "natural", or run calibrate_colors first |
| Lighting changed during capture (dawn→day) | Run calibrate_colors, or split into lighting-consistent chunks |
| Cause | Fix |
|---|---|
| Moving objects (cars, people) | Enable ghosting_filter=True |
| Camera positions slightly wrong | Re-optimize alignment, check reprojection error |
| Cause | Fix |
|---|---|
| Auto-exposure changes during capture | calibrate_colors(source_data="model") |
| White balance shifts | Color calibration, or manual white balance in RAW processing |
| Vignetting from fisheye lens | Calibration should handle this; check sensor calibration |
When exporting tiles for Blender/game engine, each tile gets its own texture atlas. For consistent look:
calibrate_colors ONCE on the full meshOr, if tiling is done in Blender:
The handoff-coordinator agent manages this round-trip.
calibrate_colors(source_data="model")
build_uv(mapping_mode="generic", texture_size=8192)
build_texture(blending_mode="natural", texture_size=8192, ghosting_filter=True)
build_uv(mapping_mode="adaptive_orthophoto", texture_size=8192)
build_texture(blending_mode="natural", texture_size=8192, ghosting_filter=False)
build_uv(mapping_mode="generic", texture_size=16384)
build_texture(blending_mode="natural", texture_size=16384, ghosting_filter=False)
build_uv(mapping_mode="generic", texture_size=4096)
build_texture(blending_mode="natural", texture_size=4096, ghosting_filter=False)