Recent Topics

52, you can download Pro model and use Altizure Desktop to convert to a variety of 3D data formats. This tutorial will walk you through how to convert the altizure professional model to 3dtiles format and then give you a preliminary demonstration in Cesium.

Download the Pro Model:下载作品-仅限专业项目 Download Altizure Desktop: Dowload Demo Model: Cesium Information: Data Format Conversion

Open Altizure Desktop, set the input path (the 3D data location of the downloaded photogrammetric model) and output path, click ok to start the conversion.

The 3dtiles that have been well converted can be loaded directly from cesium:

Create Cesium Object to Load the Model to the Scene

Basic Steps to Load 3dtiles into Cesium

Initialize the viewer. Load 3dtiles (set the tileset.json path). After the load is complete, move the perspective to the model area. If the y-z axis of the model reverses , click Model Rotation.

Here is a basic example of Cesium loading 3dtiles, with reference to cesium version 1.62. After downloading and unzipping, copy the folder of 3dtiles to the root directory of the case, modify the tileset.json path, and the hosting service can be demonstrated:
Basic code for loading demo:

<body> <div id="cesiumContainer"></div> <script> // initialize the viewer var viewer = new Cesium.Viewer('cesiumContainer', { shadows: false }); // let the model not occluded by terrain viewer.scene.globe.depthTestAgainstTerrain = false; // load 3dtiles var tileset = new Cesium.Cesium3DTileset({ url: './cyt_3dtiles_3/tileset.json' }); // after loaded, zoom to the model extent tileset.readyPromise.then(function (tileset) { viewer.scene.primitives.add(tileset); viewer.zoomTo(tileset, new Cesium.HeadingPitchRange(0.0, -0.5, tileset.boundingSphere.radius * 2.0)); }).otherwise(function (error) { console.log(error); }); </script> </body>

As for the model rotation, the internal model matrix of cesium is relative to the center of the earth, it is necessary to translate the model to the center of the ball -> and rotate the model -> to the original position.
Code for Rotating the Model 90 Degrees around the X-axis:

// rotate the model if necessary var rootTransform = tileset._root.transform; var rootTransformInv = Cesium.Matrix4.inverse(rootTransform, new Cesium.Matrix4()); // write x, y, z rotate degrees here var rotateMatrix = Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(90))) var modelMatrix = new Cesium.Matrix4() Cesium.Matrix4.multiply(rootTransform, rotateMatrix, modelMatrix) Cesium.Matrix4.multiply(modelMatrix, rootTransformInv, modelMatrix) tileset.modelMatrix = modelMatrix

Note: This code needs to write in the tileset.readyPromise.then . If you want to rotate other angles,modify Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(90)) .

Load Altizure Model in Cesium:

Model Rotation Outcome:

Host/Release Cesium Applications

The developed cesium project needs to be hosted to the server or published locally so that we can browse the results.
Cesium was tested that it can't not properly be released under certain methods, such as python-m SimpleHTTPServer. But it is verified that Cesium project could be accessed normally through nginx or iis hosting . The service hosting cesium requires only basic static file hosting.

nginx Windows Hosting Tutorial: nginx Linux Hosting Tutorial: nginx Mac Hosting Tutorial: