ACCESS-NRI / ACCESS-Vis

Visualisation examples and resources, including open-source 3D vis for ACCESS-NRI releases
Apache License 2.0
1 stars 0 forks source link

Interactive viewer does not keep sun position. #15

Closed max-anu closed 3 weeks ago

max-anu commented 3 weeks ago

When using the interactive window, if the sun is set at a given time and the earth is rotated. the sun does not also rotate. I.e. if it is sunny on one side of the earth, and the earth is rotated, the opposite side will then be sunny too.


lv.set_properties(lightpos=accessvis.sun_light())
lv.window((600,600))```
rbeucher commented 3 weeks ago

@OKaluza

OKaluza commented 3 weeks ago

This is expected, sun_light() with no args returns a relative sun light which stays with the camera, the args allow providing a datetime or hour/minute etc for a fixed sun position.

It is explained in the sun_light docstring and in more detail in this notebook under ''More on lighting adjustments": https://github.com/ACCESS-NRI/ACCESS-Visualisation-Recipes/blob/main/03-Blue-Marble-Earth-Model-from-Satellite-Data.ipynb

max-anu commented 3 weeks ago

It works correctly. I thought sun_light() did current time, but you need to pass now=True as an argument.