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

Added Draco support to point clouds #6559

Merged
merged 35 commits into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9cfba49
Added Draco loading to pnts
lilleyse Apr 25, 2018
c5870f8
Updated CHANGES.md
lilleyse May 3, 2018
ccc04ee
Merge branch 'master' into point-clouds-draco
lilleyse May 7, 2018
706a918
Combine point cloud and model into the same draco loader
lilleyse May 7, 2018
f618fb0
Formatting updates
lilleyse May 8, 2018
4ef9401
Tweaked CHANGES.md
lilleyse May 8, 2018
929ce88
Change names of test data, update link in Sandcastle demo
lilleyse May 8, 2018
b153553
Merge branch 'master' into point-clouds-draco
lilleyse May 8, 2018
845846c
Removed isPointCloud parameter
lilleyse May 8, 2018
a79b93f
Revert changes in #6558
lilleyse May 8, 2018
054fc5b
Remove decodeDracoPointCloud
lilleyse May 8, 2018
4156778
Merge branch 'master' into point-clouds-draco
lilleyse May 11, 2018
ebd98ca
Revert a79b93f
lilleyse May 11, 2018
8e551be
Update Draco format
lilleyse May 22, 2018
2f940d7
Support 8-bit Draco quantized points
lilleyse May 23, 2018
a552a9f
Fix when batch table doesn't exist
lilleyse May 23, 2018
99040bc
Fix for batched points
lilleyse May 23, 2018
4951e17
Adjustments to support a mix of draco and non-draco properties
lilleyse May 25, 2018
c54add9
Update tilesets and specs
lilleyse May 25, 2018
258ebf8
Remove IE checks
lilleyse May 25, 2018
0376b5d
Changed .include to .indexOf in some tests
lilleyse May 25, 2018
bea4f5b
Fix bad CHANGES.md merge
lilleyse May 25, 2018
0c303b9
Updates
lilleyse May 30, 2018
d264443
Merge branch 'master' into point-clouds-draco
lilleyse Jun 18, 2018
4dd4334
Merge branch 'master' into point-clouds-draco
lilleyse Jun 19, 2018
52eac03
Merge branch 'master' into point-clouds-draco
lilleyse Jun 22, 2018
dc74460
Fix bad merge
lilleyse Jun 22, 2018
41962c3
Merge branch 'master' into point-clouds-draco
lilleyse Jul 2, 2018
a67704e
Fix CHANGES.md bad merge again
lilleyse Jul 2, 2018
d9c3dee
Set isQuantized and isOctEncoded after Draco decode
lilleyse Jul 5, 2018
3e96229
Fix tilesets
lilleyse Jul 5, 2018
8efda1b
Destroy decoder
lilleyse Jul 5, 2018
c7948c4
Merge branch 'master' into point-clouds-draco
lilleyse Jul 5, 2018
9e502b7
Update draco files
lilleyse Jul 6, 2018
620d975
Move draco object creation
lilleyse Jul 8, 2018
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
3 changes: 3 additions & 0 deletions Apps/Sandcastle/gallery/3D Tiles Formats.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@
}, {
name: 'PointCloudBatched',
resource: Cesium.IonResource.fromAssetId(3878)
}, {
name: 'PointCloudDraco',
resource: Cesium.IonResource.fromAssetId(4702)
}
],
selectedTileset: undefined,
Expand Down
21 changes: 15 additions & 6 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ Change Log
* KML and GeoJSON now use `PolylineGraphics` instead of `CorridorGraphics` for polylines on terrain. [#6706](https://github.com/AnalyticalGraphicsInc/cesium/pull/6706)

##### Additions :tada:
* Added support for polylines on terrain [#6689](https://github.com/AnalyticalGraphicsInc/cesium/pull/6689) [#6615](https://github.com/AnalyticalGraphicsInc/cesium/pull/6615)
* Use the `clampToGround` option for `PolylineGraphics` (polyline entities).
* Requires depth texture support (`WEBGL_depth_texture` or `WEBKIT_WEBGL_depth_texture`), otherwise `clampToGround` will be ignored. Use `Entity.supportsPolylinesOnTerrain` to check for support.
* Added `GroundPolylinePrimitive` and `GroundPolylineGeometry`
* Added support for Polylines on Terrain via the `Entity` API [#6689](https://github.com/AnalyticalGraphicsInc/cesium/pull/6689)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the changes here and below needed?

Copy link
Contributor Author

@lilleyse lilleyse Jun 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part of the same bad merge. Fixed.

* Use the `clampToGround` option for `PolylineGraphics`.
* Requires depth texture support (`WEBGL_depth_texture` or `WEBKIT_WEBGL_depth_texture`), otherwise `clampToGround` will be ignored.
* Added `Entity.supportsPolylinesOnTerrain` for checking if the current platform supports `clampToGround`.
* Added `GroundPolylinePrimitive` and `GroundPolylineGeometry` for rendering polylines on terrain via the `Primitive` API. [#6615](https://github.com/AnalyticalGraphicsInc/cesium/pull/6615)
* Requires depth texture support (`WEBGL_depth_texture` or `WEBKIT_WEBGL_depth_texture`).
* Use `GroundPolylinePrimitive.isSupported` to check for support.
* `PostProcessStage` has a `selected` property which is an array of primitives used for selectively applying a post-process stage. [#6476](https://github.com/AnalyticalGraphicsInc/cesium/pull/6476)
* The `PostProcessStageLibrary.createBlackAndWhiteStage` and `PostProcessStageLibrary.createSilhouetteStage` have per-feature support.
* Added support for loading Draco compressed Point Cloud tiles for 2-3x better compression. [#6559](https://github.com/AnalyticalGraphicsInc/cesium/pull/6559)
* Added CZML support for `zIndex` for `corridor`, `ellipse`, `polygon`, `polyline` and `rectangle`. [#6708](https://github.com/AnalyticalGraphicsInc/cesium/pull/6708)
* Added CZML `clampToGround` option for `polyline`. [#6706](https://github.com/AnalyticalGraphicsInc/cesium/pull/6706)

Expand Down Expand Up @@ -63,8 +67,13 @@ Change Log
* Added `PostProcessStageLibrary` which contains several built-in stages that can be added to the collection.
* Added `PostProcessStageComposite` for multi-stage post-processes like depth of field.
* Added a new Sandcastle label `Post Processing` to showcase the different built-in post-process stages.
* Added `zIndex` for ground geometry, including corridor, ellipse, polygon and rectangle entities. [#6362](https://github.com/AnalyticalGraphicsInc/cesium/pull/6362)
* Added `Rectangle.equalsEpsilon` for comparing the equality of two rectangles [#6533](https://github.com/AnalyticalGraphicsInc/cesium/pull/6533)
* Added `Rectangle.equalsEpsilon` for comparing the equality of two rectangles [#6533](https://github.com/AnalyticalGraphicsInc/cesium/pull/6533)
* Added `zIndex` for ground geometry, including corridor, ellipse, polygon and rectangle entities. [#6362](https://github.com/AnalyticalGraphicsInc/cesium/pull/6362)
* Added support for materials on terrain entities (entities with unspecified `height`) and `GroundPrimitives`. [#6393](https://github.com/AnalyticalGraphicsInc/cesium/pull/6393)
* Only available for `ClassificationType.TERRAIN` at this time. Adding a material to a terrain `Entity` will cause it to behave as if it is `ClassificationType.TERRAIN`.
* Requires depth texture support (`WEBGL_depth_texture` or `WEBKIT_WEBGL_depth_texture`), so materials on terrain entities and `GroundPrimitives` are not supported in Internet Explorer.
* Best suited for notational patterns and not intended for precisely mapping textures to terrain - for that use case, use `SingleTileImageryProvider`.
* Added `GroundPrimitive.supportsMaterials` and `Entity.supportsMaterialsforEntitiesOnTerrain`, both of which can be used to check if materials on terrain entities and `GroundPrimitives` is supported. [#6393](https://github.com/AnalyticalGraphicsInc/cesium/pull/6393)

##### Fixes :wrench:
* Fixed a bug causing custom TilingScheme classes to not be able to use a GeographicProjection. [#6524](https://github.com/AnalyticalGraphicsInc/cesium/pull/6524)
Expand Down
15 changes: 14 additions & 1 deletion Source/Scene/DracoLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ define([
* Schedules decoding tasks available this frame.
* @private
*/
DracoLoader.decode = function(model, context) {
DracoLoader.decodeModel = function(model, context) {
if (!DracoLoader.hasExtension(model)) {
return when.resolve();
}
Expand Down Expand Up @@ -245,6 +245,19 @@ define([
return when.all(decodingPromises);
};

/**
* Decodes a compressed point cloud. Returns undefined if the task cannot be scheduled.
* @private
*/
DracoLoader.decodePointCloud = function(parameters) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe update decode to decodeModel to disambiguate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

var decoderTaskProcessor = DracoLoader._getDecoderTaskProcessor();
if (!DracoLoader._taskProcessorReady) {
// The task processor is not ready to schedule tasks
return;
}
return decoderTaskProcessor.scheduleTask(parameters, [parameters.buffer.buffer]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other decode function encapsulated the DracoLoader._taskProcessorReady logic and never return undefined. Can we make these two function consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While different than decodeModel, I think the simplicity suits the point cloud decoder better. Model has more of an infrastructure around decoding and watches for loadResources.finishedDecoding rather than the result of the promise, which would sometimes be undefined.

};

/**
* Caches a models decoded data so it doesn't need to decode more than once.
* @private
Expand Down
2 changes: 1 addition & 1 deletion Source/Scene/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -4281,7 +4281,7 @@ define([
}

if (!loadResources.finishedDecoding()) {
DracoLoader.decode(this, context)
DracoLoader.decodeModel(this, context)
.otherwise(getFailedLoadFunction(this, 'model', this.basePath));
}

Expand Down
Loading