Please Note:
After completing these tests, I found a serious bug in one
of the codes. In particular, the Tcl script "calc_den_and_sl.tcl"
is incorrect. While it works well for Orion, it showed its flaw when applied
to other starfields (notably on Sirius, the star that appears brightest
from Earth). This bug was fixed during the second
round of tests.
The Star Data
The test starfield I've chosen is the Orion constellation. I am using
a representation of the night sky found in the Yale
Bright Star Catalog (YBSC). The position of each star in YBSC
has been transformed to 3D using parallax information found in YBSC or
in the Hipparcos
catalog. For the visualization, other information about the intrinsic
brightness of the stars is needed.
-
the 3D star positions, yale.xyz (441 kb)
-
the file of other visualization data about the stars, yale.vd1
(408 kb)
-
the 3D star positions of the stars in the constellation Orion, orion.xyz
-
the file of other visualization data about the Orion stars, orion.vd1
Tcl Coding
The interface to StarSplatter is via Tcl
scripts. A couple routines needed to be written to get the proper
look of a starfield.
-
Stars are points of light. The size of a star is so small compared
to its distance that it always appears as a point. Hence, I need
to specify the size of the splat for a star in pixel units, not in physical
units. I will always want a star that appears a certain brightness
to be the same number of pixels wide on the image, regardless of whether
it is a dim star nearby or a bright star far away. Hence, for each
star, at each frame, I need to calculate the pixel scale for that star
and set the scale length (which is in physical units) as a multiple of
that pixel scale.
-
Stars cover a wide range of brightness. The brightest stars are nearly
a trillion times intrinsically brighter than the faintest stars.
Fortunately, in the night sky, we have to deal with a more limited range
in brightness: the faintest star the unaided human eye can see is about
1/1500th the brightness of the brightest star. [The range of 1500
is in apparent brightness (brightness as seen from Earth), which is the
important measure for creating an image. The intrinsic brightness
is important in specifying the data for a star.] However, one only
gets 256 levels of brightness for a pixel, so more than simple brightness
needs to be considered. The approach I've adopted is to increase
brightness (the density value in the code) at constant size (scale length
in the code) and then, when brightness is maxed out, increase size.
Logarithmic scaling of the density will be used.
-
Here is a test Tcl script to explore a range of brightness and scaling,
log_test.tcl
-
Here is the output of the test script:
-
in JPEG compressed format (which adds some low level noise) log_test.jpg
(15 kb)
-
in uncompressed TIFF format log_test.tiff (978
kb)
-
To get the correct look of a starfield, one has to get relative brightness
of stars to look right. The mapping from intrinsic brightness to
apparent brightness to values for density and scale length included several
tunable parameters. A bunch of testing was done to achieve a basic
set of parameters that worked reasonably well. Further refinement
will be needed, but this is a start. Note that there is a certain
dependence of the density on the scale length that is attempted to be accounted
for here by dividing out a standard scale length in pixels (although I
may have not gotten it completely correct).
-
Here is the Tcl procedure that calculates the density and scale length,
calc_den_and_sl.tcl
-
I should create a test code that displays stars of apparent magnitude 6
to -2 and link to it and its results here.
Orion Tests - Static
These tests were the real test and tweaking for the above code. Getting
a reasonably believable Orion starfield would prove that the program was
capable of producing starfields as well as serve to tune the parameters
of the implementation.
-
The resulting Tcl script to display the Orion starfield is orion_t1.tcl
-
A 1000 x 1000 pixel image of the Orion starfield:
Choreography
Images from Earth do not require a 3D starfield (one could get by with
a 2D spherical texture map). To utilize the 3D nature of the data,
one has to fly into the starfield. Modifications were needed to allow
for generating a series of movie frames. I wrote a very simple Fortran
program that let me specify the camera motion and output the StarSplatter
variables needed for each frame to a file.
Orion Tests - Movies
A simple test choreography was created that circled around the star Mintaka
(the one on the right hand side of Orion's belt). The move makes
a half circle (180 degrees) at a constant distance from Mintaka, and with
frames every 1/2 degree (361 frames total).
The first rendering was done with only the Orion stars, and with those
stars represented as points (not splats). This sequence illustrates
the choreography of all the test sequences. Note that objects moving
to the viewer's left are in the foreground. The background stars
move to the right and end up behind the camera by the end of the move.
Note that, due to perspective changes, Orion's belt does not have the "reversed"
look that one might naively expect. This is a 3D starfield with a
lot of depth to it - unless you are much further away than the depth (which
we are not), you can't possibly get the reverse arrangement of stars from
the opposite side.
The second test uses the Orion stars only, but this time with splats.
Watch the stars that go off screen left and then return. Notice how
their brightness changes with distance as it should. This is another
reason why Orion can never look like Orion from anywhere but Earth (OK,
within the solar system). The relative brightness of the stars changes
dramatically from a different viewpoint.
Now, the full YBSC data is used with splats to create a relatively accurate
idea of what it would look like to travel through space along this choreography.
Foreground / background confusion can be considerable here. Remember
that it is a simple circling move, and that the background is moving to
the right. Notice that there are more stars in the background - one
reason is that the bright stars in the sky are dominated by far away intrinsically
bright stars, rather than by nearby stars that appear bright by proximity.
-
The full Orion starfield, Tcl script, yale_t3.tcl
-
The full Orion starfield, 320 x 320 MPEG movie, yale_t3.mpg
(2.1 MB)
Finally, I did some tests of resolution changing. I created a 1024
x 1024 version of the full YBSC data. Then, I subsampled it down
to 512 x 512 and 320 x 320. This test will let me know how the parameters
might scale with output resolution. As I expected, there seems to
be some residual resolution effects that I haven't gotten out of the coding
yet. I will need another set of tests to work through this. NOTE:
In my trials, MPEG does not seem to work well above 512 x 512 resolution.
The 1024 x 1024 MPEG movie below is not worth the download time unless
you have access to an SGI Octane or Onyx level computer (and if you've
got that, then you don't really want an MPEG anyway).
-
The full Orion starfield, large version, Tcl script, yale_t3k.tcl
-
The full Orion starfield, large version, 1024 x 1024 MPEG movie, yale_t3k.mpg
(6.3 MB)
-
The full Orion starfield, large version, 512 x 512 MPEG movie, yale_t3h.mpg
(2.1 MB)
-
The full Orion starfield, large version, 320 x 320 MPEG movie, yale_t3t.mpg
(2.1 MB)
Last modified: April 11, 1999 -- Frank Summers summers@stsci.edu