GALAXY INCLUDE FILE for Persistence of Vision 3.x

Created by Chris Colefax, 1 February 1998
Updated 9 August 1998: updated for POV-Ray 3.1

INSTALLATION

QUICK START

UNDERSTANDING THE DIFFERENT GALAXY.* FILES

GALAXY OPTIONS

GALAXY INCLUDE FILE OPTIONS

galaxy_seed
galaxy_colour
galaxy_colouration
galaxy_colour_turb
galaxy_intensity
galaxy_rotate
galaxy_distance
galaxy_origin
galaxy_bg
galaxy_objects
galaxy_starfield
options_only
debug_options

GALAXY BACKGROUNDS FILE OPTIONS

galaxy_bgstars
galaxy_bgnebula
galaxy_nebula_sphere
galaxy_nebula_ambient
galaxy_colour1, galaxy_colour2, galaxy_colour3
galaxy_star_colouration
galaxy_pattern_scale
galaxy_pattern_origin
galaxy_turb_origin
galaxy_declare_only

GALAXY STARFIELD FILE OPTIONS

star_count
star_colour
star_type
star_scale
star_distance
star_spread
star_distribution
star_colour_turb
star_brightness_turb

GALAXY OBJECTS FILE OPTIONS

galaxy_object_name
galaxy_object_scale
galaxy_object_rotate
galaxy_object_flatten
galaxy_object_position
galaxy_cluster_name
galaxy_cluster_objects
galaxy_cluster_scale
galaxy_cluster_rotate
galaxy_cluster_spread
galaxy_scale_turb
galaxy_rotate_turb
galaxy_declare_only

TROUBLESHOOTING

COPYRIGHT AND LEGAL INFORMATION

CONTACTING THE AUTHOR

INSTALLATION

The Galaxy Include File package consists of four files (Galaxy.inc, Galaxy.bg, Galaxy.obj and Galaxy.sf) which work separately and together, depending on the desired effect. All four files should be copied to one of the directories (folders) in your POV-Ray library path. Normally this is the INCLUDE sub-directory of the directory where you installed POV-Ray, so if you installed POV-Ray in C:\POVRAY you should copy the files to C:\POVRAY\INCLUDE. On a Windows 95 system, this is probably something like:

C:\Program Files\POV-Ray for Windows\Include

On UNIX and similar systems, where filenames are case-sensitive, you may have to rename the four include files so that the filenames are all uppercase. This will enable you to render the sample files without modification.

QUICK START

The Galaxy Include File package allows you to create a variety of outer- space scenes which can be used on their own or as backgrounds to other scenes and animations. In addition to spiral galaxies, the Galaxy Include File package can also create starfields, star clusters, nebulae, comets, and meteor showers. You can easily create a galaxy scene containing a selection of these elements by adding the following lines to a POV-Ray scene file:

`#declare galaxy_seed = 123456789;
#include "GALAXY.INC"`

You can choose any positive or negative integer you like for the galaxy_seed value. When you render this scene, the Galaxy Include File will select random options, and then use Galaxy.bg, Galaxy.obj, and Galaxy.sf to create the galaxy scene. In addition to changing the seed number, you can use a variety of options to modify the galaxy scene. To use any of these options just add the following line to your scene file, before including Galaxy.inc:

`#declare` [variable-name]`=` [value]

substituting the desired variable name and value where appropriate. Note that Galaxy.inc (or any of the Galaxy.* files) should never be included at the start of a scene (like colors.inc or textures.inc). They should only be included after declaring the desired galaxy options.

As well as creating random galaxy scenes using Galaxy.inc, you can use Galaxy.bg, Galaxy.obj, and/or Galaxy.sf separately to build custom galaxy scenes piece by piece. You can include any of the four Galaxy.* files as many times as you want in a single POV-Ray scene, declaring separate options for each Galaxy.* inclusion. Note that you don't have to redeclare any options that are common to any or all of the Galaxy.* files, eg:

`// COMMON GALAXY OPTIONS
#declare galaxy_colour1 = < 1.3, 1.2, .8> ;
#declare galaxy_colour2 = < 1, .5, .3 > ;
#declare galaxy_rotate = < 90, 180, 0> ;`

// GALAXY BACKGROUND
#declare galaxy_bgstars = 4;
#declare galaxy_bgnebula = off;
#declare galaxy_nebula_sphere = 5;
#include "GALAXY.BG"

// GALAXY OBJECTS
#declare galaxy_object_name = "Nebula3"
#declare galaxy_cluster_name = "Star4"
#include "GALAXY.OBJ"
#declare galaxy_object_name = "Comet2"
#declare galaxy_cluster_name = ""
#include "GALAXY.OBJ"

In the above example the same colours and rotation are applied to each element of the galaxy scene, without having to redeclare them each time you include one of the Galaxy.* files.

UNDERSTANDING THE DIFFERENT GALAXY.* FILES

As mentioned above, the four different files of the Galaxy Include File package can be used in a variety of ways, depending on how you wish to create your galaxy scene. The files are:

The Galaxy Backgrounds File (GALAXY.BG): this include file is used to create a selection of starfield and nebula pigments (including a Milky Way pigment), which can either be mapped directly to the sky_sphere, or to an actual sphere object. Although Galaxy.bg allows you to create backgrounds quite easily, the file gives you little control over the exact shape of the nebulae, and the starfields are not suitable for anti-aliasing or animations in which the camera is moved or altered in some way.

The Galaxy Starfield File (GALAXY.SF): this include file is used to create starfields consisting of actual objects, rather than textures. Because of this, the starfields can be anti-aliased and animated very well, and improved programming means that the parsing takes about one fifth of the time needed for previous versions of the Starfield Include File. Galaxy.sf can create three different types of stars, and can be used in conjunction with Galaxy.bg to create stars larger than one pixel in size.

The Galaxy Objects File (GALAXY.OBJ): this include file is used to create and position a selection of outer-space objects, including four different feature stars, six different nebulae, five different galaxies, three different comets, and two different meteors. The objects can be positioned individually, or in random clusters (eg. star clusters or meteor showers).

The Galaxy Include File (GALAXY.INC): this include file uses the above three files to create random galaxy scenes. Galaxy.inc selects random options for the other files, including colours, object types, scaling, rotation, etc., and can automatically include the other files into your POV-Ray scene, making it quick and easy to use the Galaxy Include File package without having to declare separate options for each of the Galaxy.* files.

GALAXY OPTIONS

This section explains the various options that can be used with Galaxy.inc, as well as the options that can be used separately with Galaxy.bg, Galaxy.obj, and Galaxy.sf.

Note that the Galaxy Include File package supports both British and American English, eg: galaxy_colour and galaxy_color are interchangeable, as are galaxy_colouration and galaxy_coloration, etc.

GALAXY INCLUDE FILE OPTIONS

The options in this section apply to Galaxy.inc.

galaxy_seed

This is the random number seed used for all random aspects of the Galaxy Include File package. Changing this number can result in vastly different galaxy scenes, and any positive or negative integer accepted by POV-Ray can be used. The default galaxy_seed value is 0. Each time you include Galaxy.inc, a new galaxy_seed value is chosen at random. To find out the new value, see debug_options.

galaxy_colour

Use this option to change the overall colour of the galaxy scene. The exact result of changing this option depends on the current colour of the galaxy scene, eg. if the current galaxy scene is predominantly green, setting galaxy_colour to < 1.5, 0.1, 1> will increase the amount of red in the scene, decrease the amount of green, and leave the blue unaltered, resulting in a purple coloured galaxy.
The default galaxy_colour value is < 1, 1, 1> (which has no effect).

galaxy_colouration

Use this option to increase of decrease the amount of colour in the galaxy scene. Good values range from 0 (little or no colour) to 1 or larger (very saturated colour). Setting this option to a low value means that the galaxy_colour option has more of an effect.
The default galaxy_colouration value is 0.5

galaxy_colour_turb

Use this option to alter the amount of colour variation between different elements of the galaxy scene. Setting this option to 0 results in a monochromatic galaxy scene, while larger values give greater colour variation. The default galaxy_colour_turb value is 0.2

galaxy_intensity

Use this option to increase or decrease the overall visibility of the galaxy scene. Good values usually lie somewhere between 0 (completely transparent) and 5 (very opaque).
The default galaxy_intensity value is 1

galaxy_rotate

This option is a vector that is used to rotate the galaxy scene as a whole. It can be useful when you want to create the illusion of movement in an animation, without having to transform the camera and all the other objects in a scene. The default galaxy_rotate value is < 0, 0, 0>

galaxy_distance

All the objects in a galaxy scene are arranged around a giant sphere, usually surrounding the camera. You can use this option to set the size of this sphere. The default value is 10000, which should be sufficient for most scenes and animations. If the rest of the objects in your scene are this size or larger, you may need to increase this value. However, values that are too large may result in disappearing objects, or cause POV-Ray to crash when rendering the scene.

galaxy_origin

As mentioned above, the objects in a galaxy scene are arranged around a giant sphere. By default this sphere is centred around < 0, 0, 0>, but you can use this option to change this value.

galaxy_bg

Use this option to disable the elements of the galaxy scene created by the Galaxy Backgrounds File (Galaxy.bg). Setting this option to false (or off) removes the background stars, background nebulae, and nebula sphere from the galaxy scene. To remove these elements individually, see Background File Options.

galaxy_objects

Use this option to disable the elements of the galaxy scene created by the Galaxy Objects File (Galaxy.obj). Setting this option to false (or off) removes any feature nebulae, stars, comets, star clusters, or meteor showers from the galaxy scene. Note that this option is always set to false after including Galaxy.inc; if you wish to include Galaxy.inc a second time (or third, fourth, etc.) and have it automatically create galaxy objects, you must manually set galaxy_objects to true before including Galaxy.inc.

galaxy_starfield

Use this option to remove the starfield objects in a galaxy scene created by the Galaxy Starfield File (Galaxy.sf). Note that this option is always set to false after including Galaxy.inc; if you wish Galaxy.inc to automatically create another starfield, you must manually set galaxy_starfield to true before including Galaxy.inc.

options_only

Setting this option to true will cause Galaxy.inc to declare all the options it uses for Galaxy.bg, Galaxy.obj, and Galaxy.sf, but these three files will not be automatically included. You can use this to then alter selected galaxy options, before including some or all of the remaining Galaxy.* files, eg. say you have discovered you like the galaxy produced by using 7362512 as the galaxy_seed value, but you want to change the galaxy object used:

`#declare galaxy_seed = 7362512;
#declare options_only = true;
#include "GALAXY.INC"
#declare galaxy_object = "Galaxy2"
#include "GALAXY.OBJ"
#include "GALAXY.BG"
#include "GALAXY.SF"`

Note that setting options_only to true is the same as setting galaxy_bg, galaxy_objects, and galaxy_starfield to false.

debug_options

Setting this option to true will cause Galaxy.inc to output all the random option values it uses to POV-Ray's debug stream. You can then use the +GD command-line switch, or the Debug_File INI file setting, to direct the debug stream to a file. This file can then be altered as desired, and included directly into your scene before including Galaxy.bg, Galaxy.obj, and/or Galaxy.sf (see the Rand.pov and Rand.ini files for an example of how this option can be used).

GALAXY BACKGROUNDS FILE OPTIONS

The options in this section apply to Galaxy.bg. In addition to the options below, the Galaxy Backgrounds File supports the galaxy_intensity, galaxy_rotate, galaxy_distance, and galaxy_origin options, as detailed above.

galaxy_bgstars

This option specifies the type of background star pigment mapped to the sky_sphere. Values range from 1 (sparse) to 3 (dense), and 4 (sparse) to 6 (dense). The first group has a mixture of faint and light stars, while the second is mostly composed of bright stars of different colours. If you don't want any background stars (for an animation, say), set this option to false. The default galaxy_bgstars value is 2

galaxy_bgnebula

This option specifies the type of nebula pigment mapped to the sky_sphere. Possible values are:

1 - Default nebula
2 - Light reflection nebula
3 - Nebula criss-crossed by dark gas lanes
4 - Spidery nebula
5 - Dense reflection nebula
6 - Milky Way pattern

Values 1 to 5 correspond roughly with the nebulae created by Galaxy.obj (see galaxy_object_name). If you don't want a background nebula, set this option to false. The default galaxy_bgnebula value is 6

galaxy_nebula_sphere

Use this option to create a large sphere (the radius is specified by the galaxy_distance option) mapped with a nebula pigment. Possible values are 1 to 5, corresponding to the galaxy_bgnebula option. If you don't want a nebula sphere, set this value to false.
The default galaxy_nebula_sphere value is 1

galaxy_nebula_ambient

Use this option to change the ambient light value of the nebula sphere. The default galaxy_nebula_ambient value is < 1, 1, 1>

galaxy_colour1, galaxy_colour2, galaxy_colour3

Use this option to set the RGB colour value used to create the galaxy background pigments. For a monochromatic galaxy scene, only declare the first option; for a scene that uses two colours declare both galaxy_colour1 and galaxy_colour2. Finally, to add another colour to the galaxy pigments declare all three galaxy_colour options.
The default galaxy_colour1 value is < 1, 1, 1> (White).

galaxy_star_colouration

This option sets the colour saturation used by the six background star pigments, and by the Milky Way pigment. Good values range from 0 (no colour) to 1 (complete colour). An interesting effect can be achieved by using negative numbers, which result in the stars being the opposite colour to the nebulae and other objects in the galaxy scene.
The default galaxy_star_colouration value is 0.2

galaxy_pattern_scale

Use this option to alter the size of the patterns used to create the galaxy background pigments. Changing this option does not alter the general shape of the pigments; it only changes the scaling of the patterns used within each pigment. The default galaxy_pattern_scale value is 1

galaxy_pattern_origin

Use this option to translate the origin of the patterns used to create the galaxy background pigments. Changing this option can completely alter the shapes created by the pigments, and can be changed gradually within an animation to create dynamic nebulae, etc.
The default galaxy_pattern_origin is < 0, 0, 0>

galaxy_turb_origin

Many of the galaxy pigments use some sort of turbulence; changing this option translates the origin of the turbulence before it is applied to the pigment. You can use this option to alter the shapes of various pigments, or to animate the turbulence applied to the pigments.
The default galaxy_turb_origin is < 0, 0, 0>

galaxy_declare_only

Setting this option to true stops Galaxy.bg from actually creating the sky_sphere or nebula sphere to which the galaxy background pigments are mapped. Instead, the file declares each of the 12 pigments separately, so that you can then use them in the ways you use any other pigment. The pigment names are BGStars? (from 1 to 6), BGNebula? (from 1 to 5), and BGMilkyWay. Each of the pigments is designed to be used at unit size, but they can be scaled or transformed any way you want, eg:

`#declare galaxy_declare_only = true;
#include "GALAXY.BG"`

sky_sphere {
pigment {BGStars3}
pigment {BGMilkyWay rotate z * 45}
pigment {BGNebula5 scale 2}
pigment {BGNebula1 rotate < 60, 50, 0>}}

box {< -1, -1, -1>, < 1, 1, 1>
pigment {BGStars6} finish {phong .5}}

Note that setting galaxy_declare_only to true is the same as setting galaxy_bgstars, galaxy_bgnebula, and galaxy_nebula_sphere to false.

GALAXY STARFIELD FILE OPTIONS

The options in this section apply to Galaxy.sf. In addition to the options below, the Galaxy Starfield File supports the galaxy_seed, galaxy_rotate, and galaxy_origin options, as detailed above.

star_count

This option sets the number of star objects created. The larger the number, the longer the parsing time and memory required. The default star_count value is 1000

star_colour

This option sets the RGB colour value of the stars. The default star_colour value is < 0.9, 0.9, 0.9>

star_type

This option selects the pigment used on each star object. Possible values are:

1 - Plain circular star (default)
2 - Circular star with halo
3 - Circular star with six evenly spaced rays

star_scale

Use this option to increase or decrease the size of the star objects. By default the stars are designed to look best when rendered at resolutions between 320x240 and 640x480; you may wish use smaller numbers for larger resolutions, and vice-versa. The default star_scale value is 1

star_distance

The star objects are arranged around a large sphere; this option sets the radius of this sphere. The default value is 20000, which should be sufficient for most scenes and animations. If the rest of the objects in your scene are this size or larger, you may need to increase this value. However, values that are too large may result in disappearing objects, or cause POV-Ray to crash when rendering the scene.

star_spread

This option sets the difference between the distances to the closest (largest) star and the farthest (smallest) star. The option is expressed as a percentage of the star_distance, eg: the default value of 1 means that the stars lie somewhere between 20000 and 40000 units away (40000 being equal to 20000 plus 20000 times 1). Setting this option to 0 would result in all the star objects being the same distance from the origin.

star_distribution

This option sets the ratio of large (close) stars to small (far) stars. The default value of 1 results in equal numbers of each. Values larger than 1 give more large stars, while values smaller than 1 give more small stars.

star_colour_turb

Use this option to alter the amount of colour variation between different stars. Setting this option to 0 results in stars all of the same colour, while larger values give greater colour variation. The default star_colour_turb value is 0.2

star_brightness_turb

Use this option to set the amount of brightness variation between different stars. Setting this option to 0 results in stars all of the same brightness, while larger values give greater brightness variation. The default star_brightness_turb value is 0.5

GALAXY OBJECTS FILE OPTIONS

The options in this section apply to Galaxy.obj. In addition to the options below, the Galaxy Objects File supports the following options detailed above:

galaxy_seed, galaxy_colour_turb, galaxy_intensity, galaxy_rotate, galaxy_distance, galaxy_origin galaxy_colour1, galaxy_colour2, galaxy_colour3, galaxy_star_colouration, galaxy_pattern_scale, galaxy_pattern_origin, galaxy_turb_origin

galaxy_object_name

Use this option to select which galaxy object you wish to use. Possible values are (the case of the strings is not important):

Star1, Star2, Star3, Star4
Nebula1, Nebula2, Nebula3, Nebula4, Nebula5, Nebula6
Galaxy1, Galaxy2, Galaxy3, Galaxy4, Galaxy5
Comet1, Comet2, Comet3
Meteor1, Meteor2

As a shortcut you can just use the first and last letters of the object name, eg. S3 for Star3, or N4 for Nebula4. If you don't want to create a galaxy object, set this value to an empty string. The default galaxy_object_name is Nebula1

galaxy_object_scale

Use this option to increase of decrease the size of the galaxy object. The default galaxy_object_scale value is 1

galaxy_object_rotate

Use this option to rotate the galaxy object. The object is rotated around the viewing axis, so only one float value is required. The default galaxy_object_rotate value is 0

galaxy_object_flatten

Use this option to flatten Galaxy, Comet, and Meteor objects. Good values lie somewhere between 0 (no flattening) and 1 (completely flattened). You can also use negative numbers to widen the object instead of thinning it. The default galaxy_object_flatten value is 0.2

galaxy_object_position

Use this option to move the galaxy object and cluster objects. The x-component of this option specifies the altitude of the objects, while the y-component specifies the azimuth of the objects. The z-component is ignored. The default value of < 0, 0, 0> positions the objects directly perpendicular to the z-axis. North lies along the z-axis and up lies along the y-axis. Therefore, < 90, 0, 0> positions the object directly above the origin, and <-90, 0, 0> positions the objects below the origin. < 0, 90, 0> positions the objects to the east (along the x-axis), < 0, -90, 0> positions the objects to the west (along the negative x-axis), and < 0, 180, 0> positions the objects to the south (along the negative z-axis). You can combine these two movements using the galaxy_object_position value to place the galaxy object and cluster objects anywhere in the sky.

galaxy_cluster_name

In addition to a single galaxy object you can create a cluster of randomly positioned, sized, and coloured objects. Use this option to select which object you wish to use for the cluster, using the same selection as the galaxy_object_name option. If you don't want to create a cluster of objects, set this option to an empty string. The default galaxy_cluster_name is Star1

galaxy_cluster_objects

Use this option to set the number of objects you want to create in the cluster. The default galaxy_cluster_objects value is 6

galaxy_cluster_scale

Use this option to increase of decrease the size of the individual objects in the cluster (not the overall size of the cluster itself). The default galaxy_cluster_scale value is half of the galaxy_object_scale value.

galaxy_cluster_rotate

Use this option to rotate each individual object in the cluster (not the cluster as a whole). The default galaxy_cluster_rotate value is the same as the galaxy_object_rotate value.

galaxy_cluster_spread

Use this option to increase the amount of space between the individual cluster objects. The option is expressed as an angle, where 0 results in all the objects being clustered at the same position, while 360 spreads the objects across the entire sky. The default galaxy_cluster_spread value is 15 degrees.

galaxy_scale_turb

Use this option to alter the amount of size variation between individual cluster objects. Setting this option to 0 results in all the cluster objects being the same size, while larger values give greater size variation. The default galaxy_scale_turb value is 0.5

galaxy_rotate_turb

Use this option to alter the amount of variation (in degrees) between the rotations of individual cluster objects. Setting this option to 0 results in all the cluster objects being rotated by the same amount, while setting this option to 360 gives objects rotated by completely random angles. The default galaxy_rotate_turb value is 0

galaxy_declare_only

Setting this option to true stops Galaxy.obj from actually creating the galaxy object and cluster objects. Instead, these objects are declared (as `galaxy_object` and `galaxy_cluster_object` respectively) as textured discs which can be used like any other object. The discs are scaled and rotated according to the relevant options above, and are centred at the origin perpendicular to the z-axis.

TROUBLESHOOTING

This section contains some common problems you might encounter while using the Galaxy Include File package, and instructions on how to fix these problems.

Q) POV-Ray crashes when I try to render my galaxy scene?
A: This may be caused by objects being larger than POV-Ray's allowed limit. To make the objects smaller, try decreasing the galaxy_distance value (the default is 10000), and also the star_distance value if you have declared this separately. If reducing this value doesn't help, try reducing the max_trace_level of your scene; the Galaxy Include File automatically increases the value for each object it creates, so add the line:

`global_settings {max_trace_level 10}`

after including any of the Galaxy.* files.

Q) POV-Ray crashes before even starting to render my galaxy scene?
A: This is probably caused by a lack of memory; try decreasing your star_count value, or your galaxy_cluster_objects value if they are quite large. Otherwise, check the error message POV-Ray gives you; you have probably tried to redeclare an option that has already been used by one of the Galaxy Include Files; ensuring that options are always declared as the same type (eg. vectors are always redeclared as vectors, etc.) should remove the problem.

Q) POV-Ray renders my galaxy scene, but it is very slow?
A: This is probably caused by very large objects; try reducing the galaxy_distance and/or star_distance options as detailed in the first question. Note, however, that when using many complex pigments like those used by the Galaxy Include Files a certain amount of calculation time is to be expected.

Q) I have created an animation using the Galaxy Include File, but the stars seems to flicker annoyingly?
A: This is caused by using background stars (mapped to the sky_sphere) which are only suitable for still scenes. Try setting the galaxy_sky_sphere option to false before including the Galaxy.* files to remove the problem.

Q) I am using the galaxy_pattern_origin and/or galaxy_turb_origin options, and there are some strange artefacts in my galaxy scene?
A: This is caused by problems with POV-Ray's internal pigment mapping functions; you should be able to fix the problem by using smaller values for the galaxy_pattern_origin and galaxy_turb_origin options.

Q) I have tried declaring some of the options, but nothing changes?
A: Make sure that you have declared all the desired options before including any of the Galaxy.* files. The files are not designed to be included once at the beginning of a scene.

Q) How can I use the Galaxy Include File with Moray (or another modeller)?
A: First export your scene from your modeller to a POV file. Then just add your desired galaxy options to this file, and include the desired Galaxy.* files before rendering the scene. If your modeller uses a right handed coordinate system (like Moray) declare these two options before any others to ensure that the galaxy objects are positioned properly:

`#declare galaxy_distance = < -1, 1, 1> * 10000;
#declare galaxy_rotate = < -90, 180, 0> ;`

Q) I want to fly around a galaxy I have created, but this doesn't seem possible?
A: This is because the galaxy objects are designed to generally be viewed in the background, and so they are placed at a great distance from the other objects in a scene. You can, however, use any of the galaxy objects just as you would any other object in POV-Ray, so that it can translated, rotated, scaled, etc. Just use the galaxy_declare_only option to create the `galaxy_object`, eg:

`#declare galaxy_colour1 = < 1.3, 1.2, .9> ;
#declare galaxy_colour2 = < .4, .8, 1> ;
#declare galaxy_cluster_name = ""`

#declare galaxy_object_name = "Galaxy3"
#declare galaxy_object_flatten = 0;
#declare galaxy_declare_only = true;
#include "Galaxy.obj"
object {galaxy_object rotate x * 90 scale 10}

camera {location < 1, 2, -3> look_at < 0, .5, 0>}

Q) I rendered my galaxy image using anti-aliasing and all the stars disappeared?
A: This is usually the result of using the Galaxy.bg file to create stars as a pigment on the sky_sphere. Stars created in this manner will not work well with anti-aliasing, and it is usually a good idea to set the galaxy_bgstars option to false to remove these background stars if you plan to render the image with anti-aliasing turned on. In their place, you should use the stars created by Galaxy.sf, as these are actual objects with pigments that have already been anti-aliased. The best settings for a scene usually depend on the rendering size, but for an 800x600 image these settings work quite well:

`#declare star_count = 5000;
#declare star_scale = .5;
#include "Galaxy.sf"`

Q) I can't get media to work with the Galaxy Include Files?
A: Due to the way the Galaxy Include Files create the galaxy objects and stars, the results obtained using POV-Ray 3.1's media can be unpredictable. Part of the problem is caused by the galaxy objects usually being at a great distance from the other objects in a scene, which makes it very difficult for POV-Ray to calculate accurate media interactions. One solution is to decrease the galaxy_distance option to bring the galaxy objects closer to the camera, although this can make it difficult to place other objects correctly. A better solution might be to use localised media container objects, rather than atmospheric media, to only place the media in those sections of the scene that it is required for. This should give you more control over the media interactions in your scene, and possibly increase the rendering speed as well.

COPYRIGHT AND LEGAL INFORMATION

The Galaxy Include File package, including Galaxy.inc, Galaxy.bg, Galaxy.obj, Galaxy.sf, all documentation, and associated sample *.POV files are Copyright 1998 by Chris Colefax. Full permission is granted to the user to modify any or all of the files for his/her own use. If modified versions are to be distributed the user should make clear the modifications that have been made by him/herself.

The Galaxy Include File package may be bundled with or without other software on CD-ROM collections, Bulletin Board systems and other file archives, providing that all associated files, including documentation and samples, are included. I would also request that persons intending to distribute the Galaxy Include File package in this manner or otherwise would first contact me to ensure that they are in possession of the latest available version.

Further, no restrictions of any sort are placed on the usage of the include files themselves (Galaxy.inc, Galaxy.bg, Galaxy.obj, and Galaxy.sf), and scene files or images created using the include files remain entirely the property of the user or users who have created them. I claim no liability or responsibility for damages or loss resulting from usage of the include files, or any part of the include file package.

CONTACTING THE AUTHOR

If you wish to contact me with bug reports, bug fixes, criticisms, comments, suggested improvements, questions, etc. you can reach me by email at:

ccolefax@geocities.com

or by regular mail at:

Chris Colefax
PO Box 110
Kuranda, Queensland
Australia 4872

POV-RayTM and Persistence of VisionTM are registered trademarks of the POV-Ray TeamTM