as I announced 2 days ago in the Dev list, here comes my Globular Cluster package for general testing!
This package runs on my own development version since a fairly long time (together with quite a few further extensions ). For a first preview in May of this year, see my thread in the shatters.net forum:
viewtopic.php?f=10&t=12421&start=0
However, there are some important and more recent additions, to which I'll turn in a few moments.
I am planning to write a Blog or similar at our CelestialMatters site, entitled "Anatomy of a Globular Cluster Simulation", that exposes the interesting, non-trivial underlying theoretical framework in some detail. Throughout, I have managed to stay VERY close to Ivan King's successful scenario during the coding stage.
For general testing, I have generated a patch against the current SVN-4446 version. For VERY easy testing, I include as well a complete Windows executable archive via a setup.exe installer. Never mind, you can install and remove this package in parallel with your existing Celestia installation. The installation directory is called Celestia-glob and the version Celestia-1.6.0preF1.
Before turning to some technicalities, let me summarize some important new features:
- I managed to return consistently to a neat alpha-blending approach that I had originally started with.
The blending is between a dominating single central "cloud" sprite at low resolution and many individual star sprites if the resolution becomes high enough. I had earlier discarded this approach, because of a complex 2d - 3d mixup problematics that I discussed in May,
viewtopic.php?f=10&t=12421&start=0,
when Chris L also suggested to use alpha blending.
The trick that finally allowed me to succeed without compromising Ivan King's theory (!!), will be detailed in my forthcoming theoretical discussion at Celestial Matters.
The blending now works very smoothly. Here is a little video for those who don't want to build the new code.
(probably, you need to download the file and play it locally!!)
Globular Cluster News, MPEG-4 AVI Video (20MB) - While the globular color profile is still somewhat simplified, i.e generic, I modelled the colors pretty well from the best photo we got about globular clusters (M 80) from Hubble. Here is a direct comparison:
First the best available true-color shot (Hubble):
You nicely see the big orange "Red Giant" stars, as well as the "Blue Strugglers" further out...
Next, the present Celestia rendering (I see that the image quality is deteriorated by strong rescaling!)
Again, note the Red Giants and Blue Strugglers further out.
Here is another larger-scale shot of 47 Tuc (top left) that is resolved already into stars and a smaller globular (bottom right) that is not yet resolved at this scale. 47 Tuc is the second brightest globular in the sky, bordering our SMC dwarf galactic neighbor that you see in the right half of the image. - The globular data file, data/globulars.dsc, now includes ALL 150 officially accepted globular clusters in our MIlky Way galaxy. All scientific sources are listed in the boiler plate of my globulars.dsc file. Note that the included axis-angle data will eventually be unavoidable for implementing non-spherical cluster morphologies and orientation. Despite all clusters being still spherically symmetric, I used these angle-axis data already to map the globular frame to the skyplane. While this can be done also inside the code, it's a nice check for the forthcoming extensions...
- Last not least,( and actually quite tediously,) I implemented a SIMBAD-compatible cross-listing that I read out from SIMBAD via the SIMBATCH batch facility. The tedious part was an idividual truncation via Perl to max 4-5 alternative acronyms! So each globular display involves the most familiar 4-5 alternative acronyms that are strictly SIMBAD compatible. The respective result you see also displayed in the above illustrative shots and the video.
That's a nice general and professional feature! Moreover, it's pretty, because clicking mouse-R -> info pops up a SIMBAD window, where you can check, compare and learn further things about each globular. That only works consistently, since all names now have SIMBAD compatible syntax!
As to the fading reddish globular labels, here is a shot from the asteroid IDA, together with plenty of globular clusters in view...
Now let me turn to some technical remarks:
-------------------------------------------
My package comprises quite a bit of new code, affecting many files.
Here is the list:
==================
- New files: globular.cpp, globular.h, toggle_globulars.celx
toggle_globular_labels.celx, globulars.pl - New data files: data/globulars.dsc
- Affected files: Makefile.am, cmdparser.cpp, deepskyobj.h,
dsodb.cpp, render.cpp, render.h, simulation.h,
celestiacore.cpp, celx.cpp, configfile.cpp, configfile.h,
celestia.cfg.
The new code has been tested to build and work cleanly on Windows and Linux flavors, both with the traditional and the Qt4 GUI.
++++++++++++++++++++++
As to implementing the patch, I strongly suggest to start from a virgin SVN-4446 checkout of Celestia and patch my code with your favorite tool, starting from the Celestia-root level.
++++++++++++++++++++++
The new package involves a number intricate changes, like e.g:
In celestia.cfg, DeepskyCatalog -> DeepSkyCatalogs is now an array and accommodates more than one DSO data file name! My galaxy data file data/deepsky.dsc should eventually be renamed into data/galaxies.dsc, since the new globular data are correspondingly located in a file data/globulars.dsc. So it now looks like so in celestia.cfg:
Code: Select all
DeepSkyCatalogs [ "data/deepsky.dsc"
"data/globulars.dsc" ]
This example may serve as a warning illustration that you might easily encounter problems if you start "fiddling" rather than implementing the full patch at once...
Since I didn't want to touch the various GUI's or the key shortcuts at this stage, I included two trivial celx scripts, called toggle_globulars.celx and toggle_globular_labels.celx. They just serve to toggle ON|OFF the display of the globulars and their labels (which are of course of "auto-fading" type).
You can also simply include these two new celx functions into your start.celx, in case you are using it:
celestia:show("globulars")
celestia:showlabel("globulars")
celestia:setfaintestvisible(7.0) <== recommended in addition
So you should build Celestia with LUA activated and execute these scripts if you don't see some nice clusters with redish globular labels (M 4, Omega Centauri, 47 Tuc, M 53, M 2, ...) in the OGL canvas.
The Perl script (globulars.pl) that I wrote to extract the globular data (globulars.dsc) of ALL known globulars, you find in src/tools/globulars.
Here are some brief operating instructions:
++++++++++++++++++++++++++++++++++++++++++++++
Enter (M 4, Omega Centauri, 47 Tuc, M 53, M 2, ...) in the command line, hit RETURN and then center the globular with the 'C' key. If the particular label|globular is not visible already then the globular is dimmer than magnitude ~ 6.
Make sure that the automag feature is activated (CTRL+Y)!!!
The best way of enjoying globulars is similar to galaxies: Move your mouse forward (backward) while pressing SHIFT + mouse_left (zoom effect). At small resolutions you just will see a fuzzy blob, which eventually resolves into a beautiful cluster with many individual stars, when the zoom level (SHIFT + mouse_left)) is high enough.
You can also hit the key G=goto and then use a mixture of CTRL+mouse_left movements (distance change) and SHIFT+mouse_left (zooming). The above video uses precisely these two key sequences!
+++++++++++++++++++++++++++++++++++++
Finally, here is the patch for download:
+++++++++++++++++++++++++++++++++++++++++++++++
Zipped Dir with 4446 patch file and patch.log
and the complete Windows Package with Installer for "quick click testing"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Windows Executable with Installer
NOTE: After patching a fresh SVN-4446 checkout, the Windows project files have still to be modified to account for the two new files: globulars.cpp, globulars.h. Since I am using the commercial VC 2003.net compiler, I could not do this for you!
For Linux (KDE) just run in the celestia root dir:
> patch -p1 < diff-4446.txt
I have included a patch-4446.log file, whence you see that there should be NO warnings or worse...
> make -f Makefile.cvs
> ./configure --prefix=/usr/local --with-kde --with-lua (etc. spice...)
> make
> make install (don't overwrite your existing installation!!!)
++++++++++++++++++++++++++++++++++++++++++++++++++
Let me know what you think.
Enjoy,
Fridger