-
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
Partial translucency on globe #8752
Comments
There are some pretty hacky ways to do this with the globe translucency PR, like using an imagery cutout on the opaque layer and adding another imagery layer with alpha. var viewer = new Cesium.Viewer('cesiumContainer', {
orderIndependentTranslucency : false
});
var scene = viewer.scene;
var globe = scene.globe;
globe.baseColor = Cesium.Color.TRANSPARENT;
globe.undergroundColor = undefined;
var layers = viewer.imageryLayers;
var imageryBaseLayer = layers.get(0);
var defaultImageryLayerCutout = Cesium.Rectangle.fromDegrees(-90, 20, -70, 40);
imageryBaseLayer.cutoutRectangle = defaultImageryLayerCutout;
var alphaImagery = Cesium.createWorldImagery();
var alphaLayer = layers.addImageryProvider(alphaImagery);
alphaLayer.alpha = 0.5; |
This was added to the API in #8726, no longer need to use the hacky code above. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This PR #8726 is going to add support for globe translucency so you can visualize underground data.
It was requested on the forum to be able to turn on this translucency just for an area of the globe, instead of the whole thing: https://community.cesium.com/t/viewing-tiles-under-surface-imagery-obscures-tiles/9290/2. The use case there is that you have a house, and want to show what's underneath the house but still keep the surrounding ground solid.
In the meantime, the workaround to accomplish this would be to use clipping planes on the globe .
The text was updated successfully, but these errors were encountered: