Phase 3 — High-Resolution Texturing (Metashape + 3DSC Scripts)
This phase applies high-resolution textures to the segmented tiles produced in Phase 2 — Mesh Segmentation (Blender + 3DSC). Texturing happens in Agisoft Metashape via the 3DSC for Metashape script package, which computes the optimal number of textures per tile using the Demetrescu-d’Annibale formula (see Texture resolution formula).
3.1 Prepare Metashape Project
Create a clean Metashape project for texturing:
Open original Metashape project (located in
05_RB/02_PROCESSING/metashape/)File > Save As with a new name in the same folder:
Original:
05_RB/02_PROCESSING/metashape/project.psxNew:
05_RB/02_PROCESSING/metashape/project_texturing.psx
Optional: Remove unnecessary chunks to simplify
Ensure you have:
Aligned cameras
Sparse point cloud
NO mesh in the chunk (we’ll import tiles)
EM Structure Locations
Raw photos:
05_RB/01_RAW/photos/Metashape projects:
05_RB/02_PROCESSING/metashape/Import tiles from:
05_RB/03_Model_Library/[ModelName]/meshpoly/Export textures to:
05_RB/03_Model_Library/[ModelName]/meshpolytex/
For the complete file-by-file location guide, see File locations — Digital Replica reference.
Photo Selection Strategy
For optimal texturing quality:
Use a subset of high-quality photos for texturing
Separate “geometry photos” (many, all angles) from “texture photos” (fewer, optimal lighting)
Avoid blurred images
Ensure consistent lighting
3.2 Install 3DSC for Metashape Scripts
Download 3DSC for Metashape from GitHub:
Extract to a known location (e.g., Desktop)
The package contains several Python scripts:
import_multiple_models.py- Import mesh tilestexturize_it.py- Automatic texturingexport_multiple_models.py- Export textured resultsrename_chunks.py- Utility script
3.3 Import Mesh Tiles
In Metashape, go to Tools > Run Script
Select
import_multiple_models.pyWhen prompted, select the
05_RB/03_Model_Library/[ModelName]/meshpoly/folderThe script will:
Create one chunk per tile
Import each OBJ into its chunk
Maintain naming structure
Fig. 23 [SCREENSHOT: Metashape workspace showing multiple chunks, one per tile]
Note
The script reads all OBJ files from the selected folder. Ensure only the segmented tiles are present in meshpoly/ before running the import.
3.4 Automatic Texturing
Now apply high-resolution textures using the texture formula:
Tools > Run Script
Select
texturize_it.pyThe script calculates the optimal number of textures per tile using the Demetrescu-d’Annibale texture resolution formula. For a complete derivation and worked examples, see Texture resolution formula.
Texture Settings
The script automatically configures:
Texture size: 4096×4096 px (adjustable)
Mapping mode: Generic
Blending mode: Mosaic
Enable hole filling
Enable ghosting filter
Wait for texture generation (can take several minutes per tile)
Fig. 24 [SCREENSHOT: Metashape showing textured tile preview]
3.5 Export Textured Tiles
Tools > Run Script
Select
export_multiple_models.pySet export folder to
05_RB/03_Model_Library/[ModelName]/meshpolytex/If using georeferenced coordinates, provide shift file
The script exports:
OBJ files (mesh geometry)
MTL files (material definitions)
PNG textures (high-resolution)
Fig. 25 [SCREENSHOT: File explorer showing meshpolytex folder in EM structure with OBJ, MTL, PNG files]
Storage Considerations
The meshpolytex folder can be quite large (500 MB - 2 GB for typical models).
Store on NAS if available (as per EM guidelines for 05_RB)
Consider creating a cloud link rather than direct sync
Keep local copy for active work, archive to NAS when complete
See also
Previous step: Phase 2 — Mesh Segmentation (Blender + 3DSC)
Next step: Phase 4 — LOD Generation (Blender + 3DSC)
Formula details: Texture resolution formula
Tool reference: 3DSC for Metashape — tool reference