The issue is that it appears very small and you can hardly navigate around it
That’s a bit surprising, because the model is, in fact not too small. It is huge. But this, in turn, can have undesirable effects on the navigation and placement of the model.
The following shows two models, rendered in gltf.report, with the “Metadata” tab open:
Apparently, something went wrong with the optimization in gltf.report. The optimization itself should usually not change the size of the model. But I just tried it out: The instance step of the default optimization in gltf-report seems to change the size of the model for some reason.
So when running the default optimization, but omitting the instance call, then the result should stil have the proper size
import { dedup, flatten, instance, join, palette, prune, resample, simplify, sparse, textureCompress, weld } from '@gltf-transform/functions';
import { MeshoptSimplifier } from 'meshoptimizer';
/**
* Example optimization pipeline implemented with the glTF Transform API.
* Some optimizations, including KTX2 compression, require Node.js or CLI
* environments. See https://gltf-transform.dev/ for full functionality.
*/
await document.transform(
// Remove duplicate meshes, materials, textures, etc.
dedup(),
// Create GPU instancing batches for meshes used 5+ times.
//instance({ min: 5 }),
// Create palette textures for compatible groups of 5+ materials.
palette({ min: 5 }),
// Reduce nesting of the scene graph; required for join().
flatten(),
// Join compatible meshes.
join(),
// Weld (index) all mesh geometry, removing duplicate vertices.
weld(),
// Simplify mesh geometry with meshoptimizer.
simplify({
simplifier: MeshoptSimplifier,
error: 0.0001,
ratio: 0.0,
lockBorder: true,
}),
// Losslessly resample animation frames.
resample(),
// Remove unused nodes, textures, materials, etc.
prune(),
// Create sparse accessors where >80% of values are zero.
sparse({ ratio: 0.2 }),
// Resize all textures to ≤1K and convert to WebP.
textureCompress({ targetFormat: 'webp', resize: [1024, 1024] }),
);
I have not yet tried uploading this to Cesium ion, but it might work better now.
Unfortunately, the model is very repetitive and did benefit greatly from instancing. (With instancing, the resulting model had ~15 MB. Without instancing, it has ~36MB). Maybe there is a way to make the instancing work, but one might need more time for investigating this.
BTW: The fact that instance seems to change the size of the model looks like a bug for me. I’ll consider bringing this up in gltf-report (or glTF-Transform, which is used for that optimization).