CesiumGS / cesium-unreal

Bringing the 3D geospatial ecosystem to Unreal Engine
https://cesium.com/platform/cesium-for-unreal/
Apache License 2.0
945 stars 296 forks source link

Add ambient light at nighttime #1379

Open j9liu opened 7 months ago

j9liu commented 7 months ago

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! :smile:): 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.

magiclamb commented 7 months ago

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 commented 7 months ago

+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, https://github.com/CesiumGS/cesium-unreal/issues/1173

gianni35011 commented 7 months ago

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 commented 7 months ago
  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

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 commented 7 months ago

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: https://github.com/CesiumGS/cesium-unreal/issues/1258

This is the result from my very quick test

Nice!