Consider adding an unlit mode for 3D Tilesets
See original GitHub issueAll 3D models in CesiumJS will use the PBR shader. This works great for models that define PBR materials and/or have metallic/roughness texture etc.
But for simple, untextured geometry, as is common when representing 3D buildings in CityGML, the buildings often blend together and it’s hard to discern any boundaries. Below is the default view in the NYC Sandcastle at 9:13 pm.
It looks better if you move the timeline so the sun angle changes, but there’s always going to be an angle at which things look washed out this way.
I was playing around with the idea of having an unlit mode, where the building colors are just based on their normals (I think this is why the untextured buildings in Google Maps look nice, plus heavily constraining the camera angle). I added a small modification to the PBR shader to do this, which can be turned on in the tileset constructor:
var tileset = new Cesium.Cesium3DTileset({
url: '<url>',
useSimpleLighting: true
});
Here’s a few comparison shots of what it looks like:
I think drawing lines around the edges would help a lot, but I’m not sure how easy that is here/if the batched geometry makes it harder. This would be a step towards supporting custom shaders on 3D Tiles (https://github.com/AnalyticalGraphicsInc/cesium/issues/7652), or perhaps, this use case is a reason to add support for custom shaders on 3D Tiles.
Potentially related to https://github.com/AnalyticalGraphicsInc/cesium/issues/7803.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9 (5 by maintainers)
Top GitHub Comments
this feature would be a very nice addon to the existing features, currently in need of this as well
I would definitely be in support of some improvements to the shading on untextured geometries. My primary use case is to use cesium for buildings and I have noticed this problem on several occasions where the lighting looks very flat and it’s hard to distinguish between the different features in the scene.
Anything that would provide a nicer looking default with a bit more contrast would be welcomed.