Page 1 of 3

Milky Way

Posted: 16.11.2011, 00:31
by abramson
I like Cosmographia a lot, and when I saw it I immediately wanted to have a photoreallistic rendering of the Milky Way in Celestia. I searched for an appropriate addon without success, which I found weird, being sucha simple thing. So I made it.

mw1.jpg

Of course this makes sense only from the vicinity of the solar system. It is implemented with a spherical model with a full sky image of the Milky Way done by the ESO, from which I removed the stars. You cannot fly around like crazy, but for presentations, still pictures and such, it works great.

I have uploaded it to the Motherlode (soon available), and also to my Celestia page (available after midnight today).

From the README:

This Celestia add-on provides a realistic rendering of the Milky Way as seen from the vicinity of the solar system.

DETAILS

The effect is achieved by a simple spherical model. The ASCII mw.cmod is used by default. Additionaly you will find mw.3ds and mw-bin.cmod. All of them are geodesic spheres, the 3ds made with Anim8or, the cmods converted with Chris' tools. Use the one you like best.

The sphere is centered at the solar system barycenter and has 10 light years in diameter. The effect only makes sense in the neighborhood of the solar system, so there is no point in making it bigger. Besides, with such a small model, one can still enjoy the standard "blobs" rendering of the Milky Way when the viewpoint is far away.

The texture is based on a panoramic view of the whole sky credited to ESO/S. Brunier (http://www.eso.org/public/images/eso0932a/). I removed the brightest stars and the planets mostly automatically, a few by hand. I reduced brightness and saturation to make it more closely resemble a visual appearance instead of a long exposure. By the way, the panorama is magnificent, go have a look at it.

I oriented the model by hand as best as I could, so the alignement is approximate. I tried the settings of other whole sky models (such as WMAP), but it wasn't quite right, and I don't know why. It may be a misalignement in the ESO panorama I used. So I fixed it by hand by aligning stars (which were then removed from the texture). You are free to make it better if you please.

To change the alignement (tricky!), edit mw.dsc and comment out (with #) the command "Clickable False". Then start Celestia in verbose mode:
> celestia --verbose > align.log
Enter edit mode with @
Select the model with <enter> mw <enter>
Rotate around X and Y with ctrl+shift+left button+drag
Rotate around Z with ctrl+shift+right button+drag
Save with !
Exit Celestia
Read orientation and rotation in align.log
Beware that the format of the vector in the dsc is different from the one saved by the edit mode (it made me mad).

ISSUES

There are a number of depth sorting problems that I couldn't solve to full satisfaction. Currently I get the model in front of the standard Milky Way (which is good), behind the Small Magellanic Cloud (which is bad) but in front of the Large one (which is good). Also, the Sag dSph gets in front (which is weird). Off-disk galaxies have behave strangely, and for that reason I have kept the 3 models and 2 textures: a jpg with pitch black background, and a png with transparency. Check the behavior in your system and use the one that pleases you best.

Re: Milky Way

Posted: 16.11.2011, 11:00
by Josedav
This new rendering of the milky way for Celestia is great :!:
Much appreciation for this fine contribution...
Joseph

Re: Milky Way

Posted: 16.11.2011, 11:28
by selden
Nick Risinger recently completed photography of the entire night sky. See http://skysurvey.org/

Nick's images are available under a Creative Commons license, unlike similar images by Axel Mellinger, which are viewable at http://canopus.physik.uni-potsdam.de/~a ... ophot.html

Re: Milky Way

Posted: 16.11.2011, 15:11
by abramson
Nick's panorama is also great.

The ESO image is also distributed with a CC license, (CC) BY, so I was free to modify it (substantially, by removing the stars, niente meno). Commercial use is allowed, but I prefer to give it away with a (CC) BY-SA-NC.

G

Re: Milky Way

Posted: 16.11.2011, 17:18
by DOJOMO
An excellent addon. Creates a sense realism to solar system views.
Many thanks,

DoJoMo

Re: Milky Way

Posted: 16.11.2011, 20:23
by chris
Very nice work removing all those stars. The result is great!

I tried adjusting the alignment a bit, but I haven't been able to get it exactly right yet...

--Chris

Re: Milky Way

Posted: 16.11.2011, 23:22
by abramson
chris wrote:Very nice work removing all those stars. The result is great!
Chris, you did it first in Cosmographia!

OT: Cosmpographia doesn't work quite well in my computer. I cannot use the "right-drag" to turn objects. Ctrl-F also doesn't work, and I suspect many other input methods. I don't know why. I compile it with QT Creator and run it from within QT Creator (I don't know any other way to run it, if I run the executable from the OS, it crashes due to lack of QT libraries. I have no previous experience with QT applications, and honestly haven't looked much into it...).

Guillermo

Re: Milky Way

Posted: 17.11.2011, 00:01
by t00fri
Guillermo,

NICE!

Here is another gorgeous view with your MW add-on:
Click on image by all means!
mw_saturn_small.jpg


Chris, you did it first in Cosmographia!

Actually, ChrisL's MW method is interesting: he obtained the MW image by summing
brightnesses of stars in the USNO's NOMAD catalog!

Fridger

Re: Milky Way

Posted: 17.11.2011, 00:56
by t00fri
Guillermo,

here is a 'cute' effect from your MW-add-on that we of course both understand:

m4_n6144_test.jpg


In the top image, you see the nice constellation of "huge"-sized glaring Antares along with the two globular clusters: M4 (bright, yellowish) and the dim, bluish NGC 6144:

That top image was taken without your MW-addon. In the bottom view of the same constellation --taken with your MW addon--, you can see almost the same.

***Except NGC 6144 is missing***

Cheers,
Fridger

Re: Milky Way

Posted: 17.11.2011, 01:07
by abramson
Yea, that sorting problem is a pity. For some time I was mad at the lack of NGC 253, because it is one of my favorite galaxies. I made this model several months ago and was reluctanct to distribute it just because of this. I finally gave in, because it looks just nice in a wide view.
G

Re: Milky Way

Posted: 17.11.2011, 18:12
by chris
t00fri wrote:Actually, ChrisL's MW method is interesting: he obtained the MW image by summing
brightnesses of stars in the USNO's NOMAD catalog!

Yes... With this method, perfect alignment is easy, and there's no need to manually remove stars--a simple apparent magnitude filter is all that's required. But there are two drawbacks, which you've probably already noticed:

1. Dust and gas aren't shown. The Orion Nebula--and probably other nebulae--are visible in Guillermo's map and not in mine.
2. Uneven sky coverage. As I understand it, the faint stars in NOMAD are largely from the USNO-B catalog, which was created by scanning photographic plates that were apparently not uniformly exposed. The borders between plates are visibile in many areas of my Milky Way map.

I'd like to try my Milky Way script using another catalog as input, but haven't found one available for download that has enough stars. At least 100 million seem to be necessary for a good result, and the more the better.

--Chris

Re: Milky Way

Posted: 17.11.2011, 19:14
by abramson
HOW I REMOVED STARS
It's easier than it looks like. Needless to say, it is advisable to take each step in a separate layer, so it's easy to recover the previous version if you do something you are not satisfied with. And even to blend different effects separately.

* Take ESO panorama. It's a high quality 6K TIF image found here: http://www.eso.org/public/images/eso0932a/

* Remove dust and scratches with Photoshop (radius 2-4, threshold 5-20, a piacere).

* Remove remaining stars by hand (bright ones, an also planets and some open and globular clusters; you can leave some nebulosity around the Pleiades just for coolness), using the clone stamp. Don't worry about off-disk stars.

* Gaussian blur a little (radius ~0.5).

* Stretch ad libitum with curves or histogram.

* Desaturate a little. Or don't, if you dare.

* Paint black most of the sky, away from Milky Way and Magellanic Clouds. Use some feathering (and care) close to the Milky Way & Clouds nebulosity, for a smooth effect.

* Save as psd, then resize at will and save as png or jpg.

NOTE: For orientation, it's (obviously) better to use the original image, and align the model with Celestia stars. Once satisfied, use the starless one in the model.

Re: Milky Way

Posted: 17.11.2011, 21:19
by t00fri
abramson wrote:Yea, that sorting problem is a pity. For some time I was mad at the lack of NGC 253, because it is one of my favorite galaxies. I made this model several months ago and was reluctanct to distribute it just because of this. I finally gave in, because it looks just nice in a wide view.
G

Guillermo,

after some more thorough inspection of your mw.png, I am quite sure that the "vanishing" of some DSO objects was due to your inadequate alpha-channel mask. Here is a simple procedure, that mostly (or completely?) resolves the problem:

I use GIMP and start from your 4k RGBA mw.png:
  • extract the three RGB channels (individually) and throw away your alpha mask.
  • duplicate the RGB image and convert the copy to grayscale. After some optional enhancements of brightness+contrast, it will serve as a perfect alpha mask.
  • make a new RGBA composite using this new alpha mask and the original RGB image channels.
  • use it in your add-on.

Here it is for further experiments:
++++++++++++++++++++++++++++++++++++++++++
http://forum.celestialmatters.org/userpix/mw.png.zip
++++++++++++++++++++++++++++++++++++++++++
All missed globulars and NGC 253 are now visible.
Here is a Cosmographia type image with the modified mw.png:

[Click on image by all means!
mw_solsystem.jpg

EDIT:
Note that I have replaced both mw.png.zip above and the image by somewhat brighter versions. The increased transparency tends to cause a dimmer rendering of the MW.

Fridger

Re: Milky Way

Posted: 17.11.2011, 21:24
by abramson
Thanks, good idea. I'll do it. That transparency evolved in untraceable ways, even through different programs. I'll have plenty of time this summer, we are living in an almost permanent cloud of volcanic ash, so not much true astronomy is possible...

Re: Milky Way

Posted: 18.11.2011, 07:53
by bh
It's not showing for me... I really am disappointed with this mac's Celestia performance.... grrr.

Re: Milky Way

Posted: 18.11.2011, 12:27
by abramson
bh wrote:It's not showing for me... I really am disappointed with this mac's Celestia performance.... grrr.
Watch out: you need Nebulae visible. Check your rendering parameters, or switch with ^ (that is "shift+6 <space>" in some keyboards).
G

Re: Milky Way

Posted: 18.11.2011, 13:41
by bh
Yep... my nebs are on.

Re: Milky Way

Posted: 18.11.2011, 18:20
by t00fri
Guillermo,

I was looking further into the problematics of achieving a precise alignment of your MW add-on.

At first, the alignment appears in principle straightforward, if one uses a version of mw.png that still displays some original stars. HOWEVER, in practice one notices a number of substantial distortions, such that it soon becomes apparent that a perfect (overall) alignment is simply impossible with only the degrees of freedom you enumerated for the alignment task.. (rotations around (x,y,z))

So I asked myself e.g. what parameters influence the apparent distance of stars wrapped on the add-on sphere as compared to the corresponding real stars from stars.dat.. I rarely use add-ons, so I am not too knowledgable here. It's certainly not the size of the model sphere in mw.dsc (set arbitrarily to 10 ly).

Do you know the answer?

An obvious observation is a simple relation between RA and DEC that needs to hold for points lying in the galactic plane. In terms of galactic coordinates (l,b), the galactic plane corresponds to galactic latitude b=0. From the well-known transformation equations to equatorial coordinates (l,b) <=> (alpha, delta) it immediately follows that

tan(delta) = tan(62.6 deg) * sin(alpha - 282.25 deg);

It's e.g. satisfied by the official RA, DEC coordinates of the galactic center (modulo small corrections):

# galactic center direction
---------------------------------
$ra = "17 45 37.224"; #IAU 1959
$dec = "-28 56 10.23"; #IAU 1959

Fridger

Re: Milky Way

Posted: 18.11.2011, 18:25
by abramson
That's the first thing I tried. It didn't work well. I presumed bad calibration of the panorama image. So I gave up and aligned by hand.

Re: Milky Way

Posted: 18.11.2011, 19:40
by Cham
You should also notice that the spherical model on which the picture is pasted is very crude. From a distance, we easily see the limited amount of triangles. Texture distortions are inevitable with a crude sphere.

I suggest that you considerably rise the resolution of the sphere.

Also, I suggest that you duplicate the mesh and flip its normals, so we can see the texture on both sides of the spherical model. It may be usefull to see the galactic plane while the observer is outside the sphere.

The sphere could also use a radius of 1000 LY, to give a better feel of scale while we move around.

You should make the model invisible by default and use a CELX script to toggle it ON/OFF, as I do with all my nebulae addons (sprite based models and flat billboards). The script can also be used to show more informations, as the location of major nebulae, for example.