OpenStreetMap and terrain

OpenStreetMap when viewed above a certain distance has a nice terrain shading. However once you go below a certain distance the terrain shading disappears. Would it be possible to retain this shading even when you get close to the terrain?

Looks like the OSM dataset doesn’t include the shading after a certain zoom level. Cesium has lighting for the terrain itself, which you could use. Check out

http://cesiumjs.org/2014/10/07/STK-World-Terrain-updated/

This will also change dynamically as the sun rotates around the globe.

Patrick

It’s odd, I don’t see that terrain shading at any zoom level when I look at the map at http://www.openstreetmap.org/
Thanks for the link, I’ll be sure to check it out!

OK, the name threw me off. The menu says ‘MapQuest OpenStreetMap’ which are different maps.
http://www.mapquest.com/

http://www.openstreetmap.org/

It’s using Mapquest tiles, which do remove terrain shading below a certain zoom. There’s another menu setting that’s simply ‘OpenStreetMap’, which is in fact OpenStreetMap tiles.

The World Terrain Lighting does a good job at showing the terrain with plain color textures:

I assume the shading is proportional to the angle the sun rays strike it. Perhaps when only the moon is visible it could do the same as with the sun, but use a smaller shading range. Maybe one day there could be Terrain shadows as well.

When I first saw the Moon I was quite surprised. Usually you either see nothing or very bright grey colors (white) when looking up at the Moon from Earth’s surface. Also it seems that the Moon is rendered after the atmosphere, making it oddly more visible when you’re close to the Earth’s surface.

I assume the shading is proportional to the angle the sun rays strike it

Yes.

Maybe one day there could be Terrain shadows as well.

Yes. We have a good plan for this, but no short-term priority yet.

Patrick

Hi, I am also a new one, could you please guide to resolve the above reported issue. I need to implement Sun and Moon Shading functionality, please help me to implement using OL3Cesium.

Thanks
Virendra

Hello,

Multiple light sources in Cesium, including the moon, is something we’d like to tackle in the future! In the meantime, there are some workaround depending on what you are trying to do, see Issue #6553. Could you provide more context for your use case?

If this question is specifically about ol-cesium, our team doesn’t support that project, so you should ask the maintainer of the project.

Thanks!

Gabby

Hi Gabby,
Thanks for the reply. We need to add Sun shade and Moon Shade on Cesium Globe based on user input date, time and zone. Both functionalities, we need to implement separately. Could you please guide how we can achieve this.

Thanks
Virendra

Sun lightning on the globe is enabled with the following:

scene.globe.enableLighting = true;

``

Also, sun ad moon highlights are seen when you turn on the water mask, which allows water to reflect light more realistically. See this example.

If you needed to change how the lighting work on the globe for either the sun or the moon, you could change the shader code in GlobeFS.glsl or GlobeVS.glsl.