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

Make Globe Transparent with Hex Bins - View Attached Image #178

Open
gianniszonia opened this issue Jun 28, 2024 · 2 comments
Open

Make Globe Transparent with Hex Bins - View Attached Image #178

gianniszonia opened this issue Jun 28, 2024 · 2 comments

Comments

@gianniszonia
Copy link

gianniszonia commented Jun 28, 2024

Hi! Thank you so much for the globe, it is truly amazing and i also donated some money to you for your hard work :)

I am trying to make the globe background image transparent so that I can see the bars (hex bins) on the other side of the globe too (see image at the very bottom). I am making my image a bit transparent but it does not seem to work because the actual globe is black.

I tried everything such as using globeMaterial and making the globe transparent with lower opacity but then i end up with this which shows the bars starting from the center of the globe.

GlobeOld 2

I also tried using using a background image of just the land on the earth using this image - https://commons.wikimedia.org/wiki/File:Land_shallow_topo_alpha_2048.png - but all I achieve is seeing just the land and then black everywhere else.

The funny thing is that I managed to do it years ago but I lost my code and I can not find it. And it shouldn't be difficult because i was much worse in Javascript back then. I have included a picture of the globe I created back then so that you can see what i mean by Transparent Globe.

GlobeOld

@gianniszonia
Copy link
Author

@vasturiano Any ideas? :)

@vasturiano
Copy link
Owner

@gianniszonia thanks for reaching out and sorry for the delay in responding here.

I've just made a change in the underlying lib three-globe which solves this issue altogether. It uses conditions in the side material fragment shaders that hides the portion of the bins underneath the surface of the globe.

So, if you upgrade your dependency tree to use v2.34.2 of the three-globe module you should have this issue solved.

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