Skip to content
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

Add ambient light at nighttime #1379

Open
j9liu opened this issue Mar 25, 2024 · 5 comments
Open

Add ambient light at nighttime #1379

j9liu opened this issue Mar 25, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@j9liu
Copy link
Contributor

j9liu commented Mar 25, 2024

On our community forum, many users have been confused by the pitch black screen when they view locations on the other side of the world. They interpret this as data being missing or things not rendering, when in reality this is due to the time zone settings on CesiumSunSky.

Additionally, some users have wanted night time views, but CesiumSunSky doesn't offer good nighttime visualization out-of-the-box. There's at least an old thread with some workarounds / material changes that can be used for better visualization (thanks @argallegos! 😄): https://community.cesium.com/t/easiest-way-to-make-a-night-time-scene/17582/.

But it would be nice if there was just some ambient lighting during the night, so people could at least see a silhouette or dimly lit part of their scene. This could be an adjustable setting that scales how bright the ambient light is. It's doesn't adhere to the realistic sun model, but judging from a good number of forum posts, this would improve usability and reduce user confusion.

@j9liu j9liu added the enhancement New feature or request label Mar 25, 2024
@magiclamb
Copy link

Completely agree with Janine. A nighttime ambient mode would be incredibly useful. Since for usability in unreal in a real-time setting we've had to either turn off the day cycle (which is a very useful feature) or be left with not being able to access the dark side of the earth.
So an ambient light during night time that resembles a moonlit sky would be fantastic!
And Janine's suggestion for having variables in control of the light level and other relevant details for the night mode would also be great.
We're putting in a demo application that we've worked on for 4 months for work in 2 weeks for the deadline and if we get approved we'll have the green light to keep working on it and releasing a game that has cesium as a core system. It would be awesome if at least a first version of this was put out soon so we could showcase it (being optimistic haha)!
Also thanks for the effort you guys have put in, we've been impressed consistently by the features built in 🍻

@csciguy8
Copy link
Contributor

+1 for this.

I encountered this problem when creating scenes from C++ code (performance tests). For locations very far from me (like Japan), the scene started out as completely black. I changed the time zone to fix it. Although looking back, I probably should have just set the time, and ideally the time zone would get set automatically based on where I am.

Regardless, having some ambient lighting in this case would have been less disorienting.

Also, not sure if the SkyLight would help us here, but here's a related issue,
#1173

@gianni35011
Copy link

I completely agree, The pitch-black night-side rendering causes a lot of unnecessary concern. Some basic ambient lighting, even if not strictly physically accurate, would be a huge win.

A built-in option with adjustable brightness would be the ideal solution in my opinion.

@r-veenstra
Copy link

r-veenstra commented Mar 27, 2024

  1. Would it make sense to automatically update the time zone of a Cesium Sun Sky based on lat/lon changes? Seems like this may reduce the scenarios where users enter a new lat/lon and find themselves in the dark?

  2. This is a common problem not just with Cesium, but also the base Unreal SunSky. One potential solution I found:

Add a second directional light to represent the moon, or in our case it could just be generic light from above

  • Set the Intesity to something low. I used 5000 lux.

  • Set the Light Color to a blueish tint. I used (B=255,G=181,R=164,A=255)

  • Set the lights Atmosphere Sun Light Index to 1, this way it contributes to the Sky Atmosphere (giving us a nice dull blue night sky). This also ensures this night light will be calculated in the SkyLight used for indirect lighting, contribute to fog, etc.

  • Set Atmosphere Sun Disk Color Scale to 0,0,0,0, otherwise you'll get a second sun rendering in the sky at night

This is the result from my very quick test

image

Disclaimer that this was a 5 minute test and is no way meant to represent a physically based accurate setup. Better configurations may be found in threads such as this one.

@kring
Copy link
Member

kring commented Mar 30, 2024

Would it make sense to automatically update the time zone of a Cesium Sun Sky based on lat/lon changes?

I think so! We have an issue for it:
#1258

This is the result from my very quick test

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants