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

Invertable classification with alpha #5755

Merged
merged 35 commits into from
Sep 18, 2017
Merged

Invertable classification with alpha #5755

merged 35 commits into from
Sep 18, 2017

Conversation

bagnell
Copy link
Contributor

@bagnell bagnell commented Aug 15, 2017

Adds Scene.invertClassification and Scene.invertClassificationAlpha. When Scene.invertClassification is set to true, any 3D Tiles geometry that intersects classification volumes will be drawn opaque while geometry that does not intersect the volume will be drawn translucent with the alpha set to Scene.invertClassificationAlpha.

I'm open to different names for these properties.

@pjcozzi @lilleyse The derived commands approach doesn't seem very clean. Another option would be to add new passes.

@cesium-concierge
Copy link

@bagnell thanks for the pull request!

I noticed that CHANGES.md has not been updated. If this change updates the Cesium API in any way, fixes a bug, or makes any non-trivial update, please add a bullet point to CHANGES.md and bump this pull request so we know it was updated. For more info, see the Pull Request Guidelines.

I am a bot who helps you make Cesium awesome! Thanks again.

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 19, 2017

At first glance names seem OK.

Are you sure this should be a scene-level setting? Perhaps we need a way to composite a primitives/tilesets into a micro pass that has these settings (which also answers your derived commands question and might also be able to fix #5676)?

Copy link
Contributor

@pjcozzi pjcozzi left a comment

Choose a reason for hiding this comment

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

I didn't look at this closely given the potential of micro-passes. Let discuss that with @lilleyse on Monday.

}));

var classification = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url : 'http://localhost:8002/tilesets/meshTest/'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you put this - or something like this - on beta.cesium.com?

* The alpha of unclassified 3D Tile geometry when {@link FrameState#invertClassification} is <code>true</code>.
* @type {Number}
*/
this.invertClassificationAlpha = undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this default to 1.0 instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or maybe not since only the Scene default matters...

@bagnell
Copy link
Contributor Author

bagnell commented Sep 18, 2017

I'm merging this. What needs reviewing is now in #5836.

@bagnell bagnell merged commit 94fa13d into vector-tiles Sep 18, 2017
@bagnell bagnell deleted the invertable-style branch September 18, 2017 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants