-
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
Sun lighting option for Models and 3D Tilesets #6160
Conversation
@lilleyse, thanks for the pull request! Maintainers, we have a signed CLA from @lilleyse, so you can review this at any time.
I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
1dc6d80
to
8edacbc
Compare
8edacbc
to
2a0d36a
Compare
Other than the point cloud lighting, I'm not 100% sure that we want this change - for "directionless" lighting I would rather go with AO + irradiance environment maps. A light on the camera doesn't always produce good results for edge on geometry. |
I suppose - it is easy enough to deprecate. Consider renaming it to |
6c1c50f
to
18aebcc
Compare
Updated. Originally I went with |
Thanks again for the pull request! Looks like this pull request hasn't been updated in 30 days since I last commented. To keep things tidy should this be closed? Perhaps keep the branch and submit an issue?I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
Closing for now - we can restart this later if there is more need, but it will probably be a scene wide option for #6553. |
Congratulations on closing the issue! I found these Cesium forum links in the comments above: https://groups.google.com/forum/#!topic/cesium-dev/vIMLLYxYx4g If this issue affects any of these threads, please post a comment like the following:
I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
@lilleyse if you haven't already, probably a good idea to link to that branch (and all parked branches) from an issue. |
@lilleyse why did you park this on your fork instead of our repo? And yes, please open an issue in this repo if one doesn't already exist |
I didn't want to keep a stale branch around, but still wanted somewhere to look at the code later. Should I push the branch here instead? This issue is being tracked in #6553 |
@lilleyse yes, I think that's preferred so it would be easy for anyone (not necessarily just you) to pick it back up and start working on it if there's an interest. So yeah, I would make a branch in this repo and add a link to it in #6553 so anyone interested in seeing the work on it would be able to find it. |
Ok, I restored the branch and updated the link in #6553. |
If a model uses the
KHR_materials_common
extension or is a 2.0 PBR model, the shaders we generate use the Cesium sun as the light source.This PR adds an
enableLighting
option toCesium3DTileset
,Model
, andModelInstanceCollection
that controls whether models are shaded based on the sun direction (the default) or based on the camera direction. The latter is better when the sun is on the opposite side of the globe and the model just appears black.This options also controls lighting for point clouds that contain normals.
The reason
enableLighting
can't be changed dynamically is we still don't have a good way of recompiling shaders for models. Until then this will need to stay as a constructor parameter.TODO
gltf-pipeline PR: CesiumGS/gltf-pipeline#346
For https://groups.google.com/forum/#!topic/cesium-dev/vIMLLYxYx4g