Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document additional limitations of 3D Tiles classification #11739

Merged
merged 4 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
##### Additions :tada:

- Vertical exaggeration can now be applied to a `Cesium3DTileset`. Exaggeration of `Terrain` and `Cesium3DTileset` can be controlled simultaneously via the new `Scene` properties `Scene.verticalExaggeration` and `Scene.verticalExaggerationRelativeHeight`. [#11655](https://github.com/CesiumGS/cesium/pull/11655)
- Added documentation for `Cesium3DTileset.classificationType` and `Model.classificationType` to clarify additional requirements. The classification tileset must be watertight, and the receiving tileset/terrain must be opaque. [#11739](https://github.com/CesiumGS/cesium/pull/11739)
ptrgags marked this conversation as resolved.
Show resolved Hide resolved

##### Fixes :wrench:

Expand Down
4 changes: 4 additions & 0 deletions packages/engine/Source/Scene/Cesium3DTileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -1635,6 +1635,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* <li>The glTF cannot contain morph targets, skins, or animations.</li>
* <li>The glTF cannot contain the <code>EXT_mesh_gpu_instancing</code> extension.</li>
* <li>Only meshes with TRIANGLES can be used to classify other assets.</li>
* <li>The meshes must be watertight.</li>
* <li>The <code>POSITION</code> semantic is required.</li>
* <li>If <code>_BATCHID</code>s and an index buffer are both present, all indices with the same batch id must occupy contiguous sections of the index buffer.</li>
* <li>If <code>_BATCHID</code>s are present with no index buffer, all positions with the same batch id must occupy contiguous sections of the position buffer.</li>
Expand All @@ -1644,6 +1645,9 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* Additionally, classification is not supported for points or instanced 3D
* models.
* </p>
* <p>
* The 3D Tiles or terrain receiving the classification must be opaque.
* </p>
*
* @memberof Cesium3DTileset.prototype
*
Expand Down
12 changes: 8 additions & 4 deletions packages/engine/Source/Scene/Model/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ import StyleCommandsNeeded from "./StyleCommandsNeeded.js";
* @internalConstructor
*
* @privateParam {ResourceLoader} options.loader The loader used to load resources for this model.
* @privateParam {ModelType} options.type Type of this model, to distinguish individual glTF files from 3D Tiles internally.
* @privateParam {ModelType} options.type Type of this model, to distinguish individual glTF files from 3D Tiles internally.
* @privateParam {object} options Object with the following properties:
* @privateParam {Resource} options.resource The Resource to the 3D model.
* @privateParam {boolean} [options.show=true] Whether or not to render the model.
Expand Down Expand Up @@ -154,7 +154,7 @@ import StyleCommandsNeeded from "./StyleCommandsNeeded.js";
* @privateParam {string|number} [options.instanceFeatureIdLabel="instanceFeatureId_0"] Label of the instance feature ID set used for picking and styling. If instanceFeatureIdLabel is set to an integer N, it is converted to the string "instanceFeatureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
* @privateParam {object} [options.pointCloudShading] Options for constructing a {@link PointCloudShading} object to control point attenuation based on geometric error and lighting.
* @privateParam {ClassificationType} [options.classificationType] Determines whether terrain, 3D Tiles or both will be classified by this model. This cannot be set after the model has loaded.

*
* @see Model.fromGltfAsync
*
Expand Down Expand Up @@ -192,7 +192,7 @@ function Model(options) {
* When this is the identity matrix, the model is drawn in world coordinates, i.e., Earth's Cartesian WGS84 coordinates.
* Local reference frames can be used by providing a different transformation matrix, like that returned
* by {@link Transforms.eastNorthUpToFixedFrame}.
*
*
* @type {Matrix4}

* @default {@link Matrix4.IDENTITY}
Expand Down Expand Up @@ -1550,11 +1550,15 @@ Object.defineProperties(Model.prototype, {
* <li>The glTF cannot contain morph targets, skins, or animations.</li>
* <li>The glTF cannot contain the <code>EXT_mesh_gpu_instancing</code> extension.</li>
* <li>Only meshes with TRIANGLES can be used to classify other assets.</li>
* <li>The position attribute is required.</li>
* <li>The meshes must be watertight.</li>
* <li>The POSITION attribute is required.</li>
* <li>If feature IDs and an index buffer are both present, all indices with the same feature id must occupy contiguous sections of the index buffer.</li>
* <li>If feature IDs are present without an index buffer, all positions with the same feature id must occupy contiguous sections of the position buffer.</li>
* </ul>
* </p>
* <p>
* The 3D Tiles or terrain receiving the classification must be opaque.
* </p>
*
* @memberof Model.prototype
*
Expand Down