celestiary / web

Astronomical simulator of solar system and local stars
https://celestiary.github.io/
42 stars 2 forks source link

Atmospheres #8

Open pablo-mayrgundter opened 3 years ago

pablo-mayrgundter commented 3 years ago

Could be bounded exponential fog to start with, but would like to use a good refraction model.

Found this:

https://stackoverflow.com/questions/31955731/how-to-make-an-atmosphere-using-threejs

But there's also the work of the guy at google for Earth/Maps:

http://www-evasion.imag.fr/people/Eric.Bruneton/ https://www.youtube.com/watch?v=0I7Af2Ev5iQ

pablo-mayrgundter commented 3 years ago

Bruneton work looks to require a refactoring to use three's shader system. Searching for alternatives, found this:

https://github.com/wwwtyro/glsl-atmosphere

Also has its own low-level gl system, but easier to read.

Was referenced from this huge list of gfx links: https://github.com/Gforcex/OpenGraphic

pablo-mayrgundter commented 3 years ago

https://github.com/wwwtyro/glsl-atmosphere

Have this shader integrated into a test threejs scene. Next up will be getting perspective right.

Here's some nice refs for that:

https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-16-accurate-atmospheric-scattering https://www.shadertoy.com/view/lslXDr https://stackoverflow.com/questions/28014922/is-it-possible-to-make-realistic-n-body-solar-system-simulation-in-matter-of-siz/28020934#28020934

pablo-mayrgundter commented 3 years ago

James Burke is open to using shared source for atmosphere and terrain on Mars Society VR work in 2021: https://youtu.be/5zG4F3a1BFM?t=168

mgreter commented 2 years ago

Maybe use https://github.com/THRASTRO/thrastro-shaders ? Demo: http://www.ocbnet.ch/thrastro-shaders/demo/demo-atmosphere.html And in case you didn't see it yet: https://www.ocbnet.ch/solsys-preview-latest :)

pablo-mayrgundter commented 2 years ago

Wow, solsys is very nice. Thanks for the pointer! Do you know who's working on it or where the code project is? I'm happy to collaborate!

And thx for the shader link too.. yeah, atmospheres and accurate orbits are top of my priority list, tho has been a while since I've had time.

mgreter commented 2 years ago

It's all my work (started about 7 years ago) and unfortunately I haven't yet made it to publish all the code. But some parts are already on GitHub (the shaders being the latest part that I published). Others are:

https://github.com/mgreter/astro.js https://github.com/mgreter/ephem.js https://github.com/mgreter/three.app

pablo-mayrgundter commented 2 years ago

Oh cool :) Well, astro looks like something I could use right off. I'll take a look next time I have a coding session!

I actually work in Zurich sometimes. I'd love to get coffee... I'll say Hi on twitter.

pablo-mayrgundter commented 1 year ago

Hi again! Your twitter DMs are disabled for me. I'm in Zurich for the month. Would you like to meet and talk code sometime?

pablo-mayrgundter commented 1 year ago

This would be amazing:

"THOR is the first open-source general circulation model (GCM) developed from scratch to study the atmospheres and climates of exoplanets, free from Earth- or Solar System-centric tunings"

https://arxiv.org/abs/1911.13158.. one of https://github.com/exoclime