-
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
Consider adding an unlit mode for 3D Tilesets #7870
Comments
Full git diff for the above lighting model, it's just about 4 lines of code in 4 files:
An implementation of this would I think just use a separate shader instead of tacking onto the PBR shader. |
Another situation where unlit makes sense in this forum thread where the timeline is used to advance a dynamic simulation, but the sun's day/night cycle creates an undesirable lighting effect. |
Very supportive, will this be included in the new version? |
@astroschen glad to hear it! Is your use case also for untextured 3D buildings or other things? It's unlikely to make it into the release on Monday but if we can reach consensus on a good approach here it's very likely to make it into the release right after that. |
ok Thanks @OmarShehata ! |
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. |
This came up again on the forum. Here the requested solution is to be able to render outlines. |
Rendering outlines is also requested again here on the forum. |
this feature would be a very nice addon to the existing features, currently in need of this as well |
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.
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:
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 (#7652), or perhaps, this use case is a reason to add support for custom shaders on 3D Tiles.
Potentially related to #7803.
The text was updated successfully, but these errors were encountered: