The purpose of the software RealGal is to generate ``realistic’’ cosmological movies of galaxies via raytracing, while relying (transparently) on public domain softwares: pov-ray,yorick, mpeg_encode. It makes use of a library of (automatically generated) 3D-icons in df3 format (which can be replaced by user-provided ``improved’’ cubes). It also requires knowing (or guessing) the position, luminosity, age and size of the objects. The ray tracing is carried within povray, hence it has the flexibility and limitation of this software. It may run in parallel, using the mpi version of pov-ray. This document describes the main features of RealGal, together with a rapid tutorial a a wish list for future features. It is a component of the HORIZON project, and inherits its copyrights and distribution policy.
Download the archive !!!
Download the documentation in pdf
(c) Jean Pichon, Christophe Pichon, HORIZON, 2005
While cosmological simulations provide astronomers with direct estimates of particles, it remains computationnaly expensive to produce realistic snapshots which mimic both the large scale structures and the small galactic scales. Realgal intents to produce ``nice looking'' movies from simple catalogs of points (extracted from simulations).
The basic principle underlying this software is illustrated in the figure below; our policy is to replace points with properties in a catalog by hyper icons (i.e. df3 cubes) at the corresponding position with possibly higher resolution (if the hyper icon is close to the camera path) and then rely on povray to do the ray tracing. It implements practically the concept of multiscale raytracing, in the spirit of a static (admitedly somewhat trivial) AMR code.
The package can be downloaded as a gziped tar ball; realgal-0.2.tar.gz at the following link realgal ftp://realgal-02.tgz.
The package corresponds basically to one script, realgal, which takes at least one input, a catalog or a flag.
The installation is quite straightforward:
1) Setup the environmental variable REALGAL to this directory; e.g. (in tcsh) setenv REALGAL `pwd`
2) If required, install yorick http://www.maumae.net/yorick/doc/index.php
3) If required, install povray http://www.povray.org
4) If required, install meg_encode http://bmrc.berkeley.edu/ftp/pub/multimedia/mpeg/encode/mpeg_encode-1.5b-src.tar.gz
5) Edit the first line of realgal so that it points to the yorick binary (itou for adapthop2cat if required).
6) possibly rename the /usr/local/etc/povray.conf file to something else. ????
The easiest way to get started, once the software is installed is to type:
to get an idea of what the flags are, and then
This should make your first movie (in, by default $REALGAL/output/mymovie/mymovie.mpg) ! You may then, say, increase the size of the image (-s or -size), and change the number of frames (-f or -frames):
realgal -s 200 -f 1;
Beyond this point you may want to specify your own catalog;
realgal -m <myMovie> -c <myCatalog.cat> -s 50 -f 1;
where <myMovie> and <myCatalog.cat> correspond to your own name for the movie and catalog file (see below, Sec. 1.3). This time the movie file and corresponding files (see below) will be put in $REALGAL/output/<myMovie>/<myMovie>.mpg.
Probably the best strategy is to first run the program in sketch mode at a low number of frames. (possibly one only), and set the trav_scale, (and possibly trav_rot) so that the view includes the desired objects at all time. For instance:
realgal -movie Grid -quality sketch -t ./input/line.trav
-c ./input/grid3x3x3.cat -s 200 -v 1 -f 1 -trav_scale 1.5
You may also change the time corresponding to the snapshot to check that your movie is still properly rendered at some later time:
realgal -m Grid -q sketch -t ./input/line.trav -c ./input/grid3x3x3.cat -s 200 -v 1 -i 0.9 -f 1 -trav_scale 1.5
Once the setting is satisfactory, you may launch the production of the movie, in either low, med or high quality. Its probably best to first do a test run at low resolution and small image size
realgal -m Grid -q low -t ./input/line.trav -c ./input/grid3x3x3.cat -s 50 -v 3 -f 10 -trav_scale 1.5
to check that everything is working according to expectations. You might want to adapt the global brightness of the film via the brightness flag.
(in subdirectory outputs/name_of_movie/)
the travelling file contains a keyword, either fixed or ahead which specifies if the camera should be pointing in front of the travelling or towards a fixed direction. In the latter case, the direction, is given at the end of the file.
Realgal takes the following flags
All default input files are stored in $REALGAL/input/
in particular the following input catalogs and travelling are provided:
grid1x1x1.cat : one galaxy at the center,
grid2x2x2.cat: a cubic grid 2x2,
grid3x3x3.cat: a cubic grid 3x3x3,
grid5x5x5.cat: a cubic grid 5x5x5,
rand500.cat: 500 random galaxies,
cluster.cat: a cluster (in fact the cluster depicted in Fig. 1),
line.trav: a linear travelling towards the center,
line-through.trav: a linear travelling towards and through the center,
circle-ahead.trav: a circular travelling around the center pointing ahead,
circle.trav: a circular travelling around the center pointing towards the center,
spiral-fixed.trav: a spiralling travelling pointing towards the center,
spiral-ahead.trav: a spiralling travelling pointing ahead.
For instance, the line.trav configuration file contains
line the name of the travelling
-2 -1 -0.5 the coordinates of the spline
0 0 0 the coordinates of the spline
0 0 0 the coordinates of the spline
1 the number of opening angle of the camera
67.3 the angle of the camera
1 the number of pointing of the camera
2.1 0 0. the coordinates of the pointing direction
This directory also includes the povray.ini file and the mpeg_encode_ref file which specify the default beheaviour of povray and mpeg_encode respectively.
Let us first emphasize that the core of RealGal is independant of the type of 3D icons used; these could be extracted from, say AMR simulations
The underlying engine behind RealGal is yorick, an interpreter, and as such realgal can also be used directly via yorick for those so inclined (in fact the authors strongly recommand yorick as a very versatile scientific tool). Look at lib/yorick/realgal.i to discover the underlying yorick functions, described briefly in appendix A, starting with MakeMovie. We also provide for the script, adapthop2cat which converts adapthop node files into catalog input files for realgal. Note that adapthop2cat will keep track of the size of the identified substructures, fix the age of the galaxy according to the local density and fix their size according to the estimated size of the clumps.
We thank D. Aubert, E. Thiébaut, R. Teyssier and S. Colombi for inputs, D. Munro for developping yorick, and the povray team for doing the real work!
This section is bound to become rapidly obsolete since this implementation is rather crude. All hyper icons (except for the irregulars) are cubes constructed from analytical profiles.
Again the process is rather crude; a elliptical is a mixture of 3 cubes; a spiral and a barred spiral is a mixture of a blue spiral (resp. barred spiral) and a red and green S0; the age of the galaxy is coded so that the blue component decreases with age.
For the spirals, add external spirals as well as the central one, together with ofset spirals which absorb. Define base colour for the 3 cubes which are not but rather blueish, redish, yellowish so that the 3 components can be varied independantly of colour.
Christophe Pichon 2005-09-14