question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider adding an unlit mode for 3D Tilesets

See original GitHub issue

All 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.

NYC_default

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:

one

two

three

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:open
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Kennnyoungcommented, Oct 3, 2021

this feature would be a very nice addon to the existing features, currently in need of this as well

1reaction
agillilandcommented, Jun 14, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Consider adding an unlit mode for 3D Tilesets #7870 - GitHub
An implementation of this would I think just use a separate shader instead of tacking onto the PBR shader. All reactions.
Read more >
Unlit Mode in packaged game - Unreal Engine Forums
When I package the game (Windows) I am unable to view with unlit mode. Here's what I have tried so far: added r.ForceDebugViewModes=1...
Read more >
Create an unlit scene - Cesium for Unreal
I want to set 3dfiles no light mode and Only the simulation model is in lighting mode. It's like pressing F2 in edit...
Read more >
UE4 Setting Up With Unlit Mode - YouTube
Just a quick video showing how you can use Unlit mode to start setting up your unreal scene with no pre-built lighting!
Read more >
Tilemap Renderer Modes - Unity - Manual
To correctly sort and render Tile Sprites on an Isometric Z as Y Tilemap, the Transparency Sort Axis must be set to a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found