});

Photogrammetry Reconstruction

Optimize .GLB model size

Reduce glb asset file size:
1) compress png use imagick:
install:
winget install ImageMagick.ImageMagick -e --silent --accept-package-agreements --accept-source-agreements

Use JPEG to compress:

ls *.png | % {
magick "$($_.FullName)" -strip -sampling-factor 4:2:0 -quality 30 "$($_.Directory)\$($_.BaseName).jpg"
}

Then replace all .png to .jpg in the gltf file (essentially a json)

The process can fully automated with https://gltf-transform.dev/
But the compatibility is pretty bad, neither PPT or online viewer can parse it.

2) Faces
Simplify mesh first, originally 160,984 -> shift+D then Esc duplicate
Select object -> Pressure {Tab} -> A (select All) -> M (Merge by distance) with setting to resonable distance -> Reduce to 8,600 faces.

This does not work for reconstruction models, size almost the same, because they are already using jpeg. The number of surfaces are also not decreasing.
Can first decimate then merge then clean up but generally not much to decrease as I guess these reconstructed models are already very optimized.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.