For the first point:
One way of making the model “completely illuminated” is to set its rending mode to UNLIT
. The following is based on your sandcastle - search for UNLIT
to see how this setting is applied:
(EDIT: Note that this does not run by clicking on it. You’ll have to update the URL for the glob2.glb
to point to the location where you are storing it. I just served this model locally for the test)
For the second point: That tileset is a bit difficult to handle. Running it through the validator reports
{
"type": "BOUNDING_VOLUMES_INCONSISTENT",
"path": "/root/content/boundingVolume",
"message": "The content bounding volume is not contained in the tile bounding volume: box [1.6576313692536457,1.998931497380089,1.9619739159359053,1.306964486837387,0,0,0,1.3108945488929749,0,0,0,1.3078360557556152] is not within box [2.389803008,2.389803008,2.389803008,2.389803008,0,0,0,2.389803008,0,0,0,2.389803008]",
"severity": "ERROR"
},
(It reports many more errors for the B3DM files - but fortunately, CesiumJS can still render them, so these are not important right now).
The globe/geometry in this model seems to be slightly moved (so the center of the globe is not at the origin), and slightly rotated (so the axis of the globe is not vertical, i.e. not aligned with the actual “axis of the earth” in Cesium). It might be possible to adjust this somehow. I just tried this, by setting the modelMatrix
of the tileset like this:
let modelMatrix = Cesium.Matrix4.clone(Cesium.Matrix4.IDENTITY);
const translation = new Cesium.Cartesian3(
-0.14250405027398783,
-0.19573526155451182,
4.4114972896192555);
modelMatrix = Cesium.Matrix4.multiplyByUniformScale(
modelMatrix,
6000000,
new Cesium.Matrix4());
modelMatrix = Cesium.Matrix4.multiplyByTranslation(
modelMatrix,
translation,
new Cesium.Matrix4());
const tileset = new Cesium.Cesium3DTileset({
url: "https://web.natur.cuni.cz/gis/glob/Apps/SampleData/Cesium3DTiles/glob/tileset.json",
debugShowBoundingVolume: true,
modelMatrix: modelMatrix
});
But there are some problems with that. The rotation is not correct, and there are some rendering issues (i.e. the geometry disappearing), which are probably related to the wrong bounding volumes - I’d have to spend more time to investigate this further…