CesiumGS / CesiumGS/cesium

EDL doesn't work with translucent styles

Open
#8,550 4 comments 0 reactions 0 assignees View on GitHub
category - 3d tiles category - graphics type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

EDL looks great when all alpha values are 1.0:
![image](https://user-images.githubusercontent.com/3451886/72641178-82489200-3937-11ea-8da8-277d9c9bc4a2.png)

But it doesn't work at all if any of the points have a transparency:
![image](https://user-images.githubusercontent.com/3451886/72641214-942a3500-3937-11ea-95dc-43db68b8123e.png)

```js
var viewer = new Cesium.Viewer('cesiumContainer', {
terrainProvider: Cesium.createWorldTerrain()
});

// A ~10 billion point 3D Tileset of the city of Montreal, Canada captured in 2015 with a resolution of 20 cm. Tiled and hosted by Cesium ion.
var tileset = viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(28945),
pointCloudShading: {
attenuation: true,
maximumAttenuation: 2
}
})
);

// Fly to a nice overview of the city.
viewer.camera.flyTo({
destination : new Cesium.Cartesian3(1223285.2286828577, -4319476.080312792, 4562579.020145769),
orientation : {
direction : new Cesium.Cartesian3(0.63053223097472, 0.47519958296727743, -0.6136892226931869),
up : new Cesium.Cartesian3(0.7699959023135587, -0.4824455703743441, 0.41755548379407276)
},
easingFunction: Cesium.EasingFunction.QUADRATIC_IN_OUT
});

Sandcastle.addDefaultToolbarButton('Opaque style', function() {
var styleObject = {
color:{
conditions:[
["${Classification} === 1","rgb(47,14,159)"],
["true","rgb(200,200,200)"]
]}};

tileset.style = new Cesium.Cesium3DTileStyle(styleObject);
});

Sandcastle.addToolbarButton('Translucent style', function() {
var styleObject = {
color:{
conditions:[
["${Classification} === 1","rgba(47,14,159,0.8)"],
["true","rgb(200,200,200)"]
]}};

tileset.style = new Cesium.Cesium3DTileStyle(styleObject);
});
```

Contributor guide

Open the contributing guide

Research direction

Start with the supplied Cesium Viewer reproduction using the Montreal 3D Tileset and compare the opaque and translucent style cases. Trace the EDL rendering path for styled point clouds; done means translucent styles render correctly with EDL while preserving the opaque behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.