RealGal version 0.3

(c) Jean Pichon, Christophe Pichon, HORIZON, 2005

Image ./fig/cluster-new.jpg

Abstract:

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.

1 Introduction

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).

Figure 1: initial density file (a cluster of 10 Mpc extracted from a $512^{3}$dark matter simulation) together with the identified adaphop substructures, which are feeded to realgal.
Image ./fig/slice.jpg

1.1 Basic principle

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.

Image ./fig/pts.jpg Image ./fig/cubes.jpg

1.2 Quick start

1.2.1 Installation ...

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. ????

1.2.2 First run

The easiest way to get started, once the software is installed is to type:

realgal -h;

to get an idea of what the flags are, and then

realgal -d;

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.

1.2.3 Customisation

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.


1.3 Input-output

Figure 2: Library of hyper icons: from left to right and top to bottom: barred spirals, ellipticals, irregulars, spirals
Image ./fig/bars.jpg Image ./fig/ellip.jpg
Image ./fig/irreg.jpg

Inputs

  1. position catalog at a given redshift .
  1. travelling file
Outputs

(in subdirectory outputs/name_of_movie/)

Intermediate by-products

  1. library of galaxies in df3 formats.

1.3.1 Parameter files

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, $x,y,z$ is given at the end of the file.

Figure 3: left: ellipticals and right: barred spirals on a regular grid as a testcase (produced by realgal -c input/grid5x5x5.cat -t input/spiral-fixed.trav -b 1 -s 400 -q low -f 1)
Image ./fig/elliptical-grid.jpg Image ./fig/spirals-grid.jpg

1.3.2 Flags

Realgal takes the following flags

Figure 4: up: global cluster view; down: close up of the cluster in Fig.1.
Image ./fig/cluster.jpg
Image ./fig/cluster-close.jpg

1.3.3 Travelling and Galactic catalogs

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 $\leftarrow$ the name of the travelling

-2 -1 -0.5 $\leftarrow$ the $x$ coordinates of the spline

0 0 0$\leftarrow$ the $y$ coordinates of the spline

0 0 0$\leftarrow$ the $z$ coordinates of the spline

1 $\leftarrow$ the number of opening angle of the camera

67.3$\leftarrow$ the angle of the camera

1 $\leftarrow$ the number of pointing of the camera

2.1 0 0.$\leftarrow$ 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.

2 Possible extensions

Figure 5: a merger 3D icon computed with gadget and magalie
Image ./fig/mergers.jpg

  1. Travelling with splines for viewpoint and opening angle.
  2. Realistic galaxies + mergers (FINISHED)
  3. Realistic colors: realistic filters à la image_maker.
  4. Improve dramatically the hyper icons (ALMOST FINISHED; pbs with irregulars)
  5. Add dust (absorption...)
  6. Add halo ? and subclumps.
  7. Deal with the IGM
  8. Add the gaz; diffuse density; global df3 corresponding to the underlying say,gaz density
  9. If distance to camera below threshold use high resolution images ? (ALMOST FINISHED)
  10. Add sub structures in the disks using GRF (FINISHED)
  11. Add high resolution galaxies (FINISHED)
  12. Investigate mpi-povray; should be ok but pointless since no load balancing (wrote mp_source )
  13. modify the script so that everything is relative to "$REALGAL"?
  14. replace export to mpeg_encode with yorick mpeg implementation ?
Figure 6: exemple of possible diffuse component, mixed with catalog objects.
Image ./fig/diffuse.jpg

3 Known bugs

Figure 7: crowded spirals (top) and mergers (bottom) region
Image ./fig/mergers-ex.jpg
Image ./fig/bunch-spirals.jpg

4 Concluding remarks

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.

Acknowledgments

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!

B. Description of the hyper icons

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.

B..1 Descriptions

B..2 Colour mixture

Again the process is rather crude; a elliptical is a $(r,g,b)$ 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.

B..3 Possible improvements

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 $(r,g,b)$ but rather blueish, redish, yellowish so that the 3 components can be varied independantly of colour.

C. What's new ?

Christophe Pichon 2005-09-14