I am a bit stuck with the terrain on my cesium scene. I am loading the world terrain (assetID 1) from cesium ion, and it is communicating correctly as far as I can tell in the network tab. I see cors pre-flight requests going out, and then I see the requests for the terrain texture data. I even get a reply back with what I believe is terrain texture data.
When i use googlePhotorealistic3DTiles it seems fine, but thats not the dataset I’d like to use.
Is there perhaps a better way to do this than this?
this.cesiumScene.globe = new Globe();
let defaultTerrain = new Terrain(CesiumTerrainProvider.fromIonAssetId(1));
this.cesiumScene.setTerrain(defaultTerrain);
I want to use the scene directly where I can, and don’t make a viewer for this. The viewer does too much for my simple need.
I am developing on localhost:8443, if that matters but I don’t think it would.
Does anyone have any pointers to help me out?
I have seen there a good many posts about this, and they seem to suggest network related issues, or quota limits but those seem fine to me.
this.cesiumScene.globe = new Globe();
let defaultTerrain = await createWorldTerrainAsync({
requestVertexNormals: true, // This enables terrain lighting
requestWaterMask: true, // This enables water effects if any
});
this.cesiumScene.terrainProvider = defaultTerrain;
This also has the same behavior, except I see what looks to be water reflections on the blue surface, but still looks strange.
I managed to get the terrain and the imagery and the buildings all loaded now!
this.cesiumScene.globe = new Globe();
this.cesiumScene.terrainProvider = await createWorldTerrainAsync();
this.cesiumScene.imageryLayers.addImageryProvider(
await IonImageryProvider.fromAssetId(3),
);
try {
//this.tileset = await createGooglePhotorealistic3DTileset();
this.tileset = await createOsmBuildingsAsync();
I am using a scene only, and so the normal ways to set this with the viewer do not apply to me.
Whew! Glad that sorted out.
I believe the problem with my initial request was the way I was trying to assign the terrain/imagery. I now believe terrain is more about the shape of the land, and the imagery is actually what I needed to show.
Thanks for the forum! Hope this answers someone else’s questions about the blue earth.