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

bad light on the Tile-engine globe #225

Open
zmalol-geo opened this issue Jan 26, 2025 · 2 comments
Open

bad light on the Tile-engine globe #225

zmalol-geo opened this issue Jan 26, 2025 · 2 comments

Comments

@zmalol-geo
Copy link

zmalol-geo commented Jan 26, 2025

I try to use the globe with OSM https://globe.gl/example/tile-engine/
The ambient light is incorrect here as the sun never gets in zenith over the North Pole ;)
I try to override this light in three.js with something resonable like the light/sun at coordinates lon 0 lat 10, but I can't fix it. Would you like to change lights in this nice globe?

@vasturiano
Copy link
Owner

@zmalol-geo the ambient light does not have a direction it affects everything the same. It's the directional light that has an angle of incidence, but that's not the intent of that light to mimic the position of the sun. For that purpose it would actually need to rotate around depending on the time of day.

In any case, you can modify the angle of this directionall light easily via the .lights() accessor. So, something like this:

myGlobe.lights()[1].position.set(0, 0, 1)

This will set it directly above the (0, 0) coordinates (prime meridian crossing the equator).

@zmalol-geo
Copy link
Author

Thanks!
I added myGlobe.lights()[1].position.set(0, 0.3, 1) which makes the gobe looking more natural.

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

No branches or pull requests

2 participants