GPlates / gplates-app

GPlates Mobile App
https://www.gplates.org
2 stars 0 forks source link

add a setting option to show/hide stars in the background #31

Closed michaelchin closed 2 years ago

michaelchin commented 2 years ago

Initially brought up by @nickywright in https://github.com/GPlates/gplates-app/issues/8#issuecomment-1120607721

  • Additional option: Show/Hide stars. Assuming we have stars in the background sky, which I really hope we do!
yiyanw commented 2 years ago

how about this?

https://user-images.githubusercontent.com/31875861/169949239-14e93f9c-2e19-403d-bb2b-863d884f9ad4.mp4

@michaelchin @nickywright

michaelchin commented 2 years ago

how about this?

Did you comment the wrong issue?

yiyanw commented 2 years ago

Did you comment the wrong issue?

I tried some starry background, please check the link.

michaelchin commented 2 years ago

Did you comment the wrong issue?

I tried some starry background, please check the link.

OK, now I see the stars are moving and twinkling. Nice.

jcannon-gplates commented 2 years ago

Yeah nice. Just out of interest, how is that done? Looks like a few images rotating at different rates. Or is each star drawn individually as points. And how do the stars twinkle? Is it modulating the intensity of each rotating image (or points).

michaelchin commented 2 years ago

@yiyanw If you like, I can give you the background colour issue https://github.com/GPlates/gplates-app/issues/34 since you have already looked into it.

yiyanw commented 2 years ago

@yiyanw If you like, I can give you the background colour issue https://github.com/GPlates/gplates-app/issues/34 since you have already looked into it.

ok, I can handle that.

yiyanw commented 2 years ago

Yeah nice. Just out of interest, how is that done? Looks like a few images rotating at different rates. Or is each star drawn individually as points. And how do the stars twinkle? Is it modulating the intensity of each rotating image (or points).

yes, you are right. there are a bunch of lighting points cyclically moving with random speed and radius. Stars will re-render for every frame, and it will randomly change the alpha value before rendering to mimic twinkle behaviors

you can find the source code here https://help.fanruan.com/finereport-en/doc-view-3043.html

nickywright commented 2 years ago

I never thought I'd say this, but it might be too much for the stars? They're super awesome, but the movement could be a little too much or distracting for some?

I more meant just having the static stars (e.g. similar to ArcGIS earth app/Google Earth Pro/GPlates desktop app), as the gplates portal doesn't have any and I thought that's the basis for much of this.

yiyanw commented 2 years ago

I more meant just having the static stars (e.g. similar to ArcGIS earth app/Google Earth Pro/GPlates desktop app), as the gplates portal doesn't have any and I thought that's the basis for much of this.

Ok, I will try the static version later.

michaelchin commented 2 years ago

I never thought I'd say this, but it might be too much for the stars? They're super awesome, but the movement could be a little too much or distracting for some?

I more meant just having the static stars (e.g. similar to ArcGIS earth app/Google Earth Pro/GPlates desktop app), as the gplates portal doesn't have any and I thought that's the basis for much of this.

Maybe we can have a setting option to allow users to configurate the stars. By default, it will use the static stars. Users can choose to disable the star or choose to use the twinkle one. I guess the twinkle stars should be just for fun. Some school children might want to play.

michaelchin commented 2 years ago

This star or background feature should not be a super high priority matter.

nickywright commented 2 years ago

I never thought I'd say this, but it might be too much for the stars? They're super awesome, but the movement could be a little too much or distracting for some? I more meant just having the static stars (e.g. similar to ArcGIS earth app/Google Earth Pro/GPlates desktop app), as the gplates portal doesn't have any and I thought that's the basis for much of this.

Maybe we can have a setting option to allow users to configurate the stars. By default, it will use the static stars. Users can choose to disable the star or choose to use the twinkle one. I guess the twinkle stars should be just for fun. Some school children might want to play.

The option sounds like a great idea! I do really like the twinkling ones and agree that they are fun (just worried they'll be really distracting if you were to also watch an animation (e.g. age grids) on top) and @yiyanw you've done a really awesome job with them.