-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Use b3dm tilesets for classification #6033
Merged
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
27972ff
Add option to make a b3dm tileset classify another tileset.
bagnell b4f367a
Add a separate pass for classification on both terrain and 3D Tiles. …
bagnell e7ec3be
Optimize b3dm classification fragment shader.
bagnell 2b0f52f
Initial rework.
bagnell f1ab457
Remove unneeded code.
bagnell 33ff56e
Only create classification commands. Only create basic vertex and fra…
bagnell 7fe3e37
Only use position and batch id attributes.
bagnell b3993b5
Remove more unneeded code.
bagnell cc7a228
Remove shader parsing.
bagnell fad8860
Remove unused uniform semantics.
bagnell a2a1e2f
Mostly working. Needs clean up. There are issues with model matrices,…
bagnell 0d2f1e1
Fix model matrix.
bagnell 6981a68
Fix rebatching and remove derived commands.
bagnell e1218d7
Clean up.
bagnell 9173555
Fix test.
bagnell c1ad375
Revert Sandcastle example.
bagnell b448116
Remove mesh support from vector tiles.
bagnell f15d07f
Add Geometry tile.
bagnell 1f8fb07
Remove geometry from vector tile.
bagnell 9c054da
Update point cloud classification example. Tweak geometry tile to pre…
bagnell db85153
Update Vector tile specs.
bagnell 124d290
Add Geometry3DTileContent tests.
bagnell 1fe9fc8
Remove height reference.
bagnell 8eabdad
Remove more unneeded code.
bagnell 67cdf82
Fix failing test.
bagnell 15b58e4
Remove unused cache.
bagnell 0cefab9
Remove more unneeded code.
bagnell 3e88765
Fix broken test again.
bagnell bc232cd
Clamp volumes to the far plane.
bagnell 764267a
Add Sandcastle example.
bagnell 00f1792
Updates from review.
bagnell 3ffd232
Merge branch 'vector-tiles' into b3dm-class
bagnell d377603
Update CHANGES.md after merge.
bagnell eb07e44
Update Sandcastle tileset url.
bagnell ea49b72
Remove node hierarchy.
bagnell 12283c4
Update doc.
bagnell 79ed093
Add tests. Fix quantization extension. Remove some more unneeded code.
bagnell 0ab3156
Merge branch 'b3dm-class' into vector-split
bagnell 5fdf1ad
Fix after merge.
bagnell 772a9c3
Updates from review.
bagnell 9fbc848
Merge branch 'b3dm-class' into vector-split
bagnell 612c5f5
Update CHANGES.md.
bagnell 618a892
Merge pull request #6034 from AnalyticalGraphicsInc/vector-split
pjcozzi d566de4
Remove some code expecting multiple primitives. Move glTF checks to c…
bagnell 045e458
Only create one primitive.
bagnell 6e57010
Don't parse shaders since they are generated.
bagnell 15380ef
Remove runtimeNode.
bagnell 92709e8
Create only one uniform map.
bagnell 36b2b53
Factor out common code.
bagnell a4c4506
Factor out gltf semantic uniforms.
bagnell 5232f88
Remove unused requires.
bagnell 029abad
Pass debug settings to the vector primitive.
bagnell 1fa1976
Add ClassificationModel tests.
bagnell 8f389cb
Update restrictions in the doc.
bagnell 5f4ed4c
Merge branch 'vector-tiles' into b3dm-class
bagnell 2385d20
Update function name.
bagnell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
85 changes: 85 additions & 0 deletions
85
Apps/Sandcastle/gallery/3D Tiles Photogrammetry Classification.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <!-- Use Chrome Frame in IE --> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
<meta name="description" content="Sample photogrammetry and classification datasets both rendered with 3D Tiles."> | ||
<meta name="cesium-sandcastle-labels" content="Showcases, 3D Tiles"> | ||
<title>Cesium Demo</title> | ||
<script type="text/javascript" src="../Sandcastle-header.js"></script> | ||
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script> | ||
<script type="text/javascript"> | ||
require.config({ | ||
baseUrl : '../../../Source', | ||
waitSeconds : 60 | ||
}); | ||
</script> | ||
</head> | ||
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html"> | ||
<style> | ||
@import url(../templates/bucket.css); | ||
</style> | ||
<div id="cesiumContainer" class="fullSize"></div> | ||
<div id="loadingOverlay"><h1>Loading...</h1></div> | ||
<div id="toolbar"></div> | ||
<script id="cesium_sandcastle_script"> | ||
function startup(Cesium) { | ||
'use strict'; | ||
//Sandcastle_Begin | ||
var viewer = new Cesium.Viewer('cesiumContainer'); | ||
|
||
var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ | ||
url : 'https://beta.cesium.com/api/assets/1458?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxYmJiNTAxOC1lOTg5LTQzN2EtODg1OC0zMWJjM2IxNGNlYmMiLCJpZCI6NDQsImFzc2V0cyI6WzE0NThdLCJpYXQiOjE0OTkyNjM4MjB9.1WKijRa-ILkmG6utrhDWX6rDgasjD7dZv-G5ZyCmkKg' | ||
})); | ||
|
||
tileset.readyPromise.then(function() { | ||
var boundingSphere = tileset.boundingSphere; | ||
viewer.camera.viewBoundingSphere(boundingSphere, new Cesium.HeadingPitchRange(0.0, -0.5, boundingSphere.radius)); | ||
viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY); | ||
}).otherwise(function(error) { | ||
throw(error); | ||
}); | ||
|
||
var classification = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ | ||
url: 'https://beta.cesium.com/api/assets/3486?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZjM4MjljZi0xNTAzLTQ0MzctODhlZi0zOTU3Njg5ODA1Y2QiLCJpZCI6OCwiaWF0IjoxNDgxODI5ODMyfQ.dYlV8_PoXcFNlPHGook5kMzuJMS-Bb9DCMzI1mFVvgE', | ||
classificationType : Cesium.ClassificationType.CESIUM_3D_TILE | ||
})); | ||
|
||
classification.readyPromise.then(function() { | ||
classification.style = new Cesium.Cesium3DTileStyle({ | ||
color : 'rgba(255, 0, 0, 0.5)' | ||
}); | ||
}).otherwise(function(error) { | ||
throw(error); | ||
}); | ||
|
||
var nonClassification = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ | ||
url: 'https://beta.cesium.com/api/assets/3486?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZjM4MjljZi0xNTAzLTQ0MzctODhlZi0zOTU3Njg5ODA1Y2QiLCJpZCI6OCwiaWF0IjoxNDgxODI5ODMyfQ.dYlV8_PoXcFNlPHGook5kMzuJMS-Bb9DCMzI1mFVvgE', | ||
show : false | ||
})); | ||
nonClassification.readyPromise.then(function() { | ||
nonClassification.style = new Cesium.Cesium3DTileStyle({ | ||
color : 'rgba(255, 0, 0, 0.5)' | ||
}); | ||
}).otherwise(function(error) { | ||
throw(error); | ||
}); | ||
|
||
Cesium.when.join(classification.readyPromise, nonClassification.readyPromise).then(function() { | ||
Sandcastle.addToggleButton('Show classification', true, function(checked) { | ||
classification.show = checked; | ||
nonClassification.show = !checked; | ||
}); | ||
}); | ||
//Sandcastle_End | ||
Sandcastle.finishedLoading(); | ||
} | ||
if (typeof Cesium !== "undefined") { | ||
startup(Cesium); | ||
} else if (typeof require === "function") { | ||
require(["Cesium"], startup); | ||
} | ||
</script> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this tileset look like without classification. Is it worth adding a comment to say to comment out the
classificationType
line to see the geometry used to classify?The other option is to create two tilesets, one with and without the classification, and then change their
show
via a checkbox, but that could make the example too complex.