hi,
I have a gltf model that needs to be statically displayed many (tens of) thousand times on the surface of the globe. I'm looking into ways to ensure the best possible performance.
what I am currently doing is (in a loop):
———————
const locationMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(
Cesium.Cartesian3.fromDegrees(pos.lng, pos.lat)
);
const rotationMatrix = Cesium.Matrix3.fromRotationZ(randomRotation);
const rotationMatrix4 = Cesium.Matrix4.fromRotationTranslation(
rotationMatrix,
undefined,
undefined
);
const modelMatrix = new Cesium.Matrix4();
Cesium.Matrix4.multiply(
locationMatrix,
rotationMatrix4,
modelMatrix
);
const model = Cesium.Model.fromGltf({
url: './model/plane.gltf',
modelMatrix,
scale: 1.0,
});
scene.primitives.add(model);
———————
from what I can tell, the model file is only requested once, and cached, so that's not an issue. but is there also a way to create instances of the model in a combined geometry, similar to what is described here?
http://cesiumjs.org/tutorials/Geometry-and-Appearances/#combining-geometries
thanks a lot in advance.