Cris Colefax' galaxy macro.
This commit is contained in:
parent
b5c1be574e
commit
bcdc8568cc
|
@ -0,0 +1,61 @@
|
|||
// GALAXY INCLUDE FILE: SAMPLE GALAXY OBJECTS
|
||||
// ******************************************
|
||||
// This scene shows all of the twenty galaxy objects created by
|
||||
// Galaxy.obj. They are grouped by row (Stars, Nebulae, Galaxies,
|
||||
// Comets, and Meteors at the bottom), numbered from left to right
|
||||
// (starting at 1). For more information on using these objects,
|
||||
// see Galaxy.txt
|
||||
//
|
||||
// Recommended resolution: 800 x 600 or larger, no anti-aliasing
|
||||
|
||||
// NARROW ANGLE CAMERA (TO PREVENT DISTORTION)
|
||||
camera {location <0, 0, 0> look_at <0, 0, 1> angle 24}
|
||||
|
||||
// COMMON GALAXY OPTIONS
|
||||
#declare galaxy_colour1 = <1.3, 1.2, .9>;
|
||||
#declare galaxy_colour2 = <.4, .8, 1>;
|
||||
#declare galaxy_cluster_name = ""
|
||||
|
||||
// STARFIELD BACKGROUND
|
||||
#declare galaxy_bgstars = 2;
|
||||
#declare galaxy_bgnebula = false;
|
||||
#declare galaxy_nebula_sphere = false;
|
||||
#include "GALAXY.BG"
|
||||
|
||||
// STAR OBJECTS
|
||||
#declare galaxy_object_scale = .2;
|
||||
#declare C = 0; #while (C < 4)
|
||||
#declare galaxy_object_name = concat("Star", str(C + 1, 0, 0))
|
||||
#declare galaxy_object_position = <7, -10 + C * 4, 0>;
|
||||
#include "GALAXY.OBJ"
|
||||
#declare C = C + 1; #end
|
||||
|
||||
// NEBULAE OBJECTS
|
||||
#declare galaxy_object_scale = .15;
|
||||
#declare C = 0; #while (C < 6)
|
||||
#declare galaxy_object_name = concat("Nebula", str(C + 1, 0, 0))
|
||||
#declare galaxy_object_position = <3, -10 + C * 4, 0>;
|
||||
#include "GALAXY.OBJ"
|
||||
#declare C = C + 1; #end
|
||||
|
||||
// GALAXY OBJECTS
|
||||
#declare galaxy_object_rotate = 30;
|
||||
#declare C = 0; #while (C < 5)
|
||||
#declare galaxy_object_name = concat("Galaxy", str(C + 1, 0, 0))
|
||||
#declare galaxy_object_position = <-1, -10 + C * 4, 0>;
|
||||
#include "GALAXY.OBJ"
|
||||
#declare C = C + 1; #end
|
||||
|
||||
// COMET OBJECTS
|
||||
#declare C = 0; #while (C < 3)
|
||||
#declare galaxy_object_name = concat("Comet", str(C + 1, 0, 0))
|
||||
#declare galaxy_object_position = <-4.5, -11 + C * 4, 0>;
|
||||
#include "GALAXY.OBJ"
|
||||
#declare C = C + 1; #end
|
||||
|
||||
// METEOR OBJECTS
|
||||
#declare C = 0; #while (C < 2)
|
||||
#declare galaxy_object_name = concat("Meteor", str(C + 1, 0, 0))
|
||||
#declare galaxy_object_position = <-7.5, -11 + C * 4, 0>;
|
||||
#include "GALAXY.OBJ"
|
||||
#declare C = C + 1; #end
|
|
@ -0,0 +1,20 @@
|
|||
// GALAXY INCLUDE FILE: DYNAMIC OPTIONS ANIMATION
|
||||
// **********************************************
|
||||
// This animation shows the effect of various galaxy options on the
|
||||
// resulting galaxy scene.
|
||||
//
|
||||
// Recommended frames: 50 to 100, cyclic animation
|
||||
|
||||
// BACKGROUND STARFIELD AND MILKY WAY
|
||||
#declare galaxy_bgstars = 5;
|
||||
#declare galaxy_bgnebula = 6;
|
||||
#declare galaxy_nebula_sphere = false;
|
||||
#include "GALAXY.BG"
|
||||
|
||||
// ANIMATED NEBULA
|
||||
#declare galaxy_nebula_sphere = 1;
|
||||
#declare galaxy_colour1 = <1, .5, .4> + <0, .5, .2> * (sin((clock - .25) * pi) + 1) / 2;
|
||||
#declare galaxy_colour2 = <0, .5, 1> + <1, -.3, -.3> * (sin((clock - .25) * pi) + 1) / 2;
|
||||
#declare galaxy_pattern_scale = 1 + .4 * sin(clock * 2 * pi);
|
||||
#declare galaxy_pattern_origin = <-10, 10, 10> + vrotate (z * .2, <45 * sin(clock * pi * 4), clock * 360, 0>);
|
||||
#include "GALAXY.BG"
|
|
@ -0,0 +1,180 @@
|
|||
/*************************************************************************
|
||||
GALAXY BACKGROUNDS FILE FOR PERSISTENCE OF VISION 3.x
|
||||
**************************************************************************
|
||||
|
||||
Created by Chris Colefax, 1 February 1998
|
||||
Updated 9 August 1998: updated for POV-Ray 3.1
|
||||
|
||||
See "Galaxy.htm" for more information.
|
||||
|
||||
*************************************************************************/
|
||||
|
||||
// CHECK VARIABLES AND ASSIGN DEFAULTS
|
||||
// ***********************************
|
||||
#declare _GX_bgtempver = version; #version 3.0;
|
||||
#ifndef (galaxy_declare_only) #declare galaxy_declare_only = false; #end
|
||||
#ifndef (galaxy_bgstars) #declare galaxy_bgstars = 2; #end
|
||||
#ifndef (galaxy_bgnebula) #declare galaxy_bgnebula = 6; #end
|
||||
#ifndef (galaxy_nebula_sphere) #declare galaxy_nebula_sphere = 1; #end
|
||||
#ifndef (galaxy_nebula_ambient) #declare _GX_nebambient = <1, 1, 1>; #else #declare _GX_nebambient = galaxy_nebula_ambient * <1, 1, 1>; #end
|
||||
#ifndef (galaxy_distance) #declare galaxy_distance = 1e4; #end
|
||||
#ifndef (galaxy_pattern_scale) #declare galaxy_pattern_scale = 1; #end
|
||||
#ifndef (galaxy_pattern_origin) #declare galaxy_pattern_origin = <0, 0, 0>; #end
|
||||
#ifndef (galaxy_turb_origin) #declare galaxy_turb_origin = <0, 0, 0>; #end
|
||||
#ifndef (galaxy_intensity) #declare galaxy_intensity = 1; #end
|
||||
|
||||
#ifdef (galaxy_colour1) #declare _GX_colour1 = galaxy_colour1 * <1, 1, 1>;
|
||||
#else #ifdef (galaxy_color1) #declare _GX_colour1 = galaxy_color1 * <1, 1, 1>;
|
||||
#else #declare _GX_colour1 = <1, 1, 1>; #end #end
|
||||
#ifdef (galaxy_colour2) #declare _GX_colour2 = galaxy_colour2 * <1, 1, 1>;
|
||||
#else #ifdef (galaxy_color2) #declare _GX_colour2 = galaxy_color2 * <1, 1, 1>;
|
||||
#else #declare _GX_colour2 = _GX_colour1 - .3; #end #end
|
||||
#ifdef (galaxy_colour3) #declare _GX_colour3 = galaxy_colour3 * <1, 1, 1>;
|
||||
#else #ifdef (galaxy_color3) #declare _GX_colour3 = galaxy_color3 * <1, 1, 1>;
|
||||
#else #declare _GX_colour3 = (_GX_colour1 + _GX_colour2) / 2; #end #end
|
||||
#ifdef (galaxy_star_colouration) #declare _GX_starcolouration = galaxy_star_colouration;
|
||||
#else #ifdef (galaxy_star_coloration) #declare _GX_starcolouration = galaxy_star_coloration;
|
||||
#else #declare _GX_starcolouration = .2; #end #end
|
||||
|
||||
#declare _GX_finaltranslate = galaxy_turb_origin - galaxy_pattern_origin;
|
||||
#ifndef (_GX_tracelevel) #declare _GX_tracelevel = 5; #end
|
||||
|
||||
// CALCULATE STAR COLOURS
|
||||
// **********************
|
||||
#if (_GX_starcolouration = 1)
|
||||
#declare _GX_starcolour1 = _GX_colour1;
|
||||
#declare _GX_starcolour2 = _GX_colour2;
|
||||
#declare _GX_starcolour3 = _GX_colour3;
|
||||
#else
|
||||
#declare _GX_tempfloat1 = max(_GX_colour1.x, _GX_colour1.y); #declare _GX_tempfloat1 = max(_GX_tempfloat1, _GX_colour1.z);
|
||||
#declare _GX_tempfloat2 = min(_GX_colour1.x, _GX_colour1.y); #declare _GX_tempfloat2 = min(_GX_tempfloat2, _GX_colour1.z);
|
||||
#declare _GX_tempfloat1 = (_GX_tempfloat1 + _GX_tempfloat2) / 2; #declare _GX_starcolour1 = _GX_tempfloat1 + (_GX_colour1 - _GX_tempfloat1) * _GX_starcolouration;
|
||||
|
||||
#declare _GX_tempfloat1 = max(_GX_colour2.x, _GX_colour2.y); #declare _GX_tempfloat1 = max(_GX_tempfloat1, _GX_colour2.z);
|
||||
#declare _GX_tempfloat2 = min(_GX_colour2.x, _GX_colour2.y); #declare _GX_tempfloat2 = min(_GX_tempfloat2, _GX_colour2.z);
|
||||
#declare _GX_tempfloat1 = (_GX_tempfloat1 + _GX_tempfloat2) / 2; #declare _GX_starcolour2 = _GX_tempfloat1 + (_GX_colour2 - _GX_tempfloat1) * _GX_starcolouration;
|
||||
|
||||
#declare _GX_tempfloat1 = max(_GX_colour3.x, _GX_colour3.y); #declare _GX_tempfloat1 = max(_GX_tempfloat1, _GX_colour3.z);
|
||||
#declare _GX_tempfloat2 = min(_GX_colour3.x, _GX_colour3.y); #declare _GX_tempfloat2 = min(_GX_tempfloat2, _GX_colour3.z);
|
||||
#declare _GX_tempfloat1 = (_GX_tempfloat1 + _GX_tempfloat2) / 2; #declare _GX_starcolour3 = _GX_tempfloat1 + (_GX_colour3 - _GX_tempfloat1) * _GX_starcolouration;
|
||||
#end
|
||||
|
||||
// CREATE STAR PIGMENTS
|
||||
// ********************
|
||||
#declare BGStars1 = pigment {leopard color_map {
|
||||
[.6 rgb 0] [.9 rgb _GX_starcolour2 * .1] [.98 rgb _GX_starcolour3 * .4] [1 rgb _GX_starcolour1 * galaxy_intensity]}
|
||||
scale 1e-15 translate -galaxy_pattern_origin}
|
||||
|
||||
#declare BGStars2 = pigment {leopard color_map {
|
||||
[.4 rgb 0] [.75 rgb _GX_starcolour2 * .2] [.95 rgb _GX_starcolour3 * .5] [1 rgb _GX_starcolour1 * galaxy_intensity]}
|
||||
scale 1e-15 translate -galaxy_pattern_origin}
|
||||
|
||||
#declare BGStars3 = pigment {leopard color_map {
|
||||
[.1 rgb 0] [.5 rgb _GX_starcolour2 * .3] [.85 rgb _GX_starcolour3 * .6] [1 rgb _GX_starcolour1 * galaxy_intensity]}
|
||||
scale 1e-15 translate -galaxy_pattern_origin}
|
||||
|
||||
#declare BGStars4 = pigment {leopard color_map {
|
||||
[.97 rgb 0] [.975 rgb _GX_starcolour2 * galaxy_intensity]
|
||||
[.98 rgb 0] [.985 rgb _GX_starcolour3 * galaxy_intensity]
|
||||
[.99 rgb 0] [1 rgb _GX_starcolour1 * galaxy_intensity]}
|
||||
scale 1e-15 translate -galaxy_pattern_origin}
|
||||
|
||||
#declare BGStars5 = pigment {leopard color_map {
|
||||
[.85 rgb 0] [.87 rgb _GX_starcolour2 * galaxy_intensity]
|
||||
[.89 rgb 0] [.92 rgb _GX_starcolour3 * galaxy_intensity]
|
||||
[.95 rgb 0] [1 rgb _GX_starcolour1 * galaxy_intensity]}
|
||||
scale 1e-15 translate -galaxy_pattern_origin}
|
||||
|
||||
#declare BGStars6 = pigment {leopard color_map {
|
||||
[.7 rgb 0] [.75 rgb _GX_starcolour2 * 1.5 * galaxy_intensity]
|
||||
[.8 rgb 0] [.85 rgb _GX_starcolour3 * 1.5 * galaxy_intensity]
|
||||
[.9 rgb 0] [1 rgb _GX_starcolour1 * 1.5 * galaxy_intensity]}
|
||||
scale 1e-15 translate -galaxy_pattern_origin}
|
||||
|
||||
#declare BGMilkyWay = pigment {gradient y pigment_map {
|
||||
[.03 granite color_map {[.1 rgb _GX_starcolour3 transmit pow(.9, galaxy_intensity)] [.8 rgb _GX_starcolour1 transmit pow(.7, galaxy_intensity)]} scale .8 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.08 granite color_map {[.4 rgb _GX_starcolour2 transmit 1] [1 rgb _GX_starcolour3 transmit pow(.8, galaxy_intensity)]} scale .6 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.1 rgb _GX_starcolour2 transmit 1]}
|
||||
scale 3
|
||||
translate -galaxy_turb_origin warp {turbulence .3 octaves 4 lambda 3} translate galaxy_turb_origin}
|
||||
|
||||
// CREATE NEBULAE PIGMENTS
|
||||
// ***********************
|
||||
#declare BGNebula1 = pigment {bozo pigment_map {
|
||||
[-.3 granite color_map {[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)] [1 rgb _GX_colour1 transmit pow(.6, galaxy_intensity)]} scale 6 * galaxy_pattern_scale]
|
||||
[.4 granite color_map {[0 rgb _GX_colour3 transmit pow(.6, galaxy_intensity)] [.5 rgb _GX_colour2 transmit pow(.95, galaxy_intensity)]} scale 3 * galaxy_pattern_scale]
|
||||
[.9 rgb _GX_colour2 transmit 1]}
|
||||
scale .3
|
||||
translate -galaxy_turb_origin warp {turbulence .18 octaves 4 omega .4 lambda 3} translate _GX_finaltranslate}
|
||||
|
||||
#declare BGNebula2 = pigment {bozo pigment_map {
|
||||
[-.3 wrinkles color_map {[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.6, galaxy_intensity)]}
|
||||
warp {turbulence 2 octaves 1} scale 1.5 * galaxy_pattern_scale]
|
||||
[.4 wrinkles color_map {[0 rgb _GX_colour3 transmit pow(.5, galaxy_intensity)] [.5 rgb _GX_colour2 transmit pow(.9, galaxy_intensity)]}
|
||||
warp {turbulence 1 octaves 1} scale galaxy_pattern_scale]
|
||||
[.7 rgb _GX_colour2 transmit 1]}
|
||||
scale .3
|
||||
translate -galaxy_turb_origin warp {turbulence .15 octaves 2 lambda 4} translate _GX_finaltranslate}
|
||||
|
||||
#declare BGNebula3 = pigment {leopard pigment_map {
|
||||
[-.1 rgbt _GX_colour2 transmit 1]
|
||||
[.4 wrinkles color_map {[0 rgb _GX_colour2 transmit 1] [1 rgb _GX_colour3 transmit pow(.6, galaxy_intensity)]}
|
||||
scale .8 * galaxy_pattern_scale translate -galaxy_turb_origin]
|
||||
[1 granite color_map {[.05 rgb _GX_colour3 transmit 1] [.3 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)]}
|
||||
scale 6 * galaxy_pattern_scale translate galaxy_turb_origin]}
|
||||
scale .13
|
||||
translate -galaxy_turb_origin warp {turbulence .3 octaves 4 lambda 3 omega .4} translate _GX_finaltranslate}
|
||||
|
||||
#declare BGNebula4 = pigment {bozo pigment_map {
|
||||
[0 granite color_map {[0 rgb _GX_colour1 transmit pow(.4, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.95, galaxy_intensity)]} scale 2 * galaxy_pattern_scale]
|
||||
[.6 granite color_map {[0 rgb _GX_colour3 transmit pow(.6, galaxy_intensity)] [.4 rgb _GX_colour2 transmit 1]} scale 1.7 * galaxy_pattern_scale]
|
||||
[.9 rgb _GX_colour2 transmit 1]}
|
||||
scale .3
|
||||
translate -galaxy_turb_origin warp {turbulence .5 octaves 4 omega .4 lambda 3} translate _GX_finaltranslate}
|
||||
|
||||
#declare BGNebula5 = pigment {bozo pigment_map {
|
||||
[-.1 wrinkles color_map {[.1 rgb _GX_colour2 transmit 1] [.4 rgb _GX_colour3 transmit pow(.5, galaxy_intensity)] [.8 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)]} scale .3 * galaxy_pattern_scale]
|
||||
[.4 wrinkles color_map {[.5 rgb _GX_colour2 transmit 1] [1 rgb _GX_colour3 transmit pow(.4, galaxy_intensity)]} scale .3 * galaxy_pattern_scale]
|
||||
[.6 rgb _GX_colour2 transmit 1]}
|
||||
scale .22
|
||||
translate -galaxy_turb_origin warp {turbulence .2 octaves 4 omega .3 lambda 5} translate _GX_finaltranslate}
|
||||
|
||||
// CREATE GALAXY BACKGROUND (SKYSPHERE)
|
||||
// ************************************
|
||||
#if (galaxy_declare_only = false)
|
||||
#ifndef (galaxy_sky_sphere) #if (galaxy_bgstars != false | galaxy_bgnebula != false)
|
||||
sky_sphere {
|
||||
#if (galaxy_bgstars != false) pigment { #switch (abs(int(galaxy_bgstars)))
|
||||
#case (1) BGStars1 #break #case (3) BGStars3 #break #case (4) BGStars4 #break
|
||||
#case (5) BGStars5 #break #case (6) BGStars6 #break #else BGStars2 #end }
|
||||
#end
|
||||
#if (galaxy_bgnebula != false) pigment { #switch (abs(int(galaxy_bgnebula)))
|
||||
#case (1) BGNebula1 #break #case (2) BGNebula2 #break #case (3) BGNebula3 #break
|
||||
#case (4) BGNebula4 #break #case (5) BGNebula5 #break #else BGMilkyWay #end
|
||||
#ifdef (galaxy_rotate) rotate galaxy_rotate #end }
|
||||
#end
|
||||
}
|
||||
#declare galaxy_sky_sphere = false;
|
||||
#declare galaxy_bgstars = false;
|
||||
#declare galaxy_bgnebula = false;
|
||||
|
||||
// CREATE DUMMY OBJECT (TO PREVENT "No objects in scene" ERROR)
|
||||
// ************************************************************
|
||||
#if (galaxy_nebula_sphere = false) sphere {<0, 0, 0>, 0 pigment {rgb <0, 0, 0>}} #end
|
||||
#end #end
|
||||
|
||||
// CREATE NEBULA SPHERE
|
||||
// ********************
|
||||
#if (galaxy_nebula_sphere != false) sphere {<0, 0, 0>, 1
|
||||
pigment { #switch (abs(int(galaxy_nebula_sphere)))
|
||||
#case (2) BGNebula2 #break #case (3) BGNebula3 #break #case (4) BGNebula4 #break
|
||||
#case (5) BGNebula5 #break #else BGNebula1 #end
|
||||
translate -galaxy_pattern_origin}
|
||||
finish {ambient _GX_nebambient diffuse 0 reflection 0 phong 0 specular 0 crand 0}
|
||||
no_shadow hollow scale galaxy_distance
|
||||
#ifdef (galaxy_rotate) rotate galaxy_rotate #end
|
||||
#ifdef (galaxy_origin) translate -galaxy_origin #end }
|
||||
#declare galaxy_distance = galaxy_distance * 1.001;
|
||||
#declare _GX_tracelevel = _GX_tracelevel + 1;
|
||||
global_settings {max_trace_level min(_GX_tracelevel, 30)}
|
||||
#end #end #version _GX_bgtempver;
|
|
@ -0,0 +1,154 @@
|
|||
/*************************************************************************
|
||||
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
|
||||
|
||||
NOTE: This file requires that Galaxy.bg, Galaxy.obj and Galaxy.sf
|
||||
be properly installed. See "Galaxy.htm" for more information.
|
||||
|
||||
*************************************************************************/
|
||||
|
||||
// CHECK VARIABLES AND ASSIGN DEFAULTS
|
||||
// ***********************************
|
||||
#declare _GX_tempver = version; #version 3.0;
|
||||
#ifndef (galaxy_seed) #declare galaxy_seed = 0; #end
|
||||
#ifndef (galaxy_bg) #declare galaxy_bg = true; #end
|
||||
#ifndef (galaxy_objects) #declare galaxy_objects = true; #end
|
||||
#ifndef (galaxy_starfield) #declare galaxy_starfield = true; #end
|
||||
#ifndef (options_only) #declare options_only = false; #end
|
||||
#ifndef (debug_options) #declare debug_options = false; #end
|
||||
|
||||
#ifdef (galaxy_colour) #declare _GX_colour = galaxy_colour * <1, 1, 1>;
|
||||
#else #ifdef (galaxy_color) #declare _GX_colour = galaxy_color * <1, 1, 1>;
|
||||
#else #declare _GX_colour = <1, 1, 1>; #end #end
|
||||
#ifdef (galaxy_colouration) #declare _GX_colouration = galaxy_colouration;
|
||||
#else #ifdef (galaxy_coloration) #declare _GX_colouration = galaxy_coloration;
|
||||
#else #declare _GX_colouration = .5; #end #end
|
||||
#ifdef (galaxy_colour_turb) #declare _GX_colourturb = galaxy_colour_turb * <1, 1, 1>;
|
||||
#else #ifdef (galaxy_color_turb) #declare _GX_colourturb = galaxy_color_turb * <1, 1, 1>;
|
||||
#else #declare _GX_colourturb = <.2, .2, .2>; #end #end
|
||||
|
||||
// SELECT FIRST GALAXY HUE AND CONVERT TO RGB VALUE
|
||||
// ************************************************
|
||||
#declare _GX_rand = seed(galaxy_seed);
|
||||
#declare _GX_tempfloat1 = rand(_GX_rand);
|
||||
#switch (_GX_tempfloat1)
|
||||
#range (0, .333) #declare galaxy_colour1 = <1, _GX_tempfloat1 * 3, 0>; #break
|
||||
#range (.333, .444) #declare galaxy_colour1 = <1 - (_GX_tempfloat1 * 9 - 3), 1, 0>; #break
|
||||
#range (.444, .555) #declare galaxy_colour1 = <0, 1, _GX_tempfloat1 * 9 - 4>; #break
|
||||
#range (.555, .667) #declare galaxy_colour1 = <0, 1 - (_GX_tempfloat1 * 9 - 4), 1>; #break
|
||||
#range (.667, .833) #declare galaxy_colour1 = <_GX_tempfloat1 * 6 - 4, 0, 1>; #break
|
||||
#range (.833, 1) #declare galaxy_colour1 = <1, 0, 1 - (_GX_tempfloat1 * 6 - 5)>; #end
|
||||
#declare galaxy_colour1 = (1 + ((galaxy_colour1 - .5) * _GX_colouration)) * _GX_colour;
|
||||
|
||||
// SELECT SECOND GALAXY HUE AND CONVERT TO RGB VALUE
|
||||
// *************************************************
|
||||
#declare _GX_tempfloat1 = _GX_tempfloat1 + ((_GX_colourturb.x + _GX_colourturb.y + _GX_colourturb.z) / (rand(_GX_rand) < .5 ? 3 : -3));
|
||||
#declare _GX_tempfloat1 = mod(_GX_tempfloat1, 1) + (_GX_tempfloat1 < 0 ? 1 : 0);
|
||||
#switch (_GX_tempfloat1)
|
||||
#range (0, .333) #declare galaxy_colour2 = <1, _GX_tempfloat1 * 3, 0>; #break
|
||||
#range (.333, .444) #declare galaxy_colour2 = <1 - (_GX_tempfloat1 * 9 - 3), 1, 0>; #break
|
||||
#range (.444, .555) #declare galaxy_colour2 = <0, 1, _GX_tempfloat1 * 9 - 4>; #break
|
||||
#range (.555, .667) #declare galaxy_colour2 = <0, 1 - (_GX_tempfloat1 * 9 - 4), 1>; #break
|
||||
#range (.667, .833) #declare galaxy_colour2 = <_GX_tempfloat1 * 6 - 4, 0, 1>; #break
|
||||
#range (.833, 1) #declare galaxy_colour2 = <1, 0, 1 - (_GX_tempfloat1 * 6 - 5)>; #end
|
||||
#declare galaxy_colour2 = (.8 + ((galaxy_colour2 - .5) * _GX_colouration)) * _GX_colour;
|
||||
|
||||
// SELECT RANDOM OPTIONS
|
||||
// *********************
|
||||
#declare galaxy_pattern_scale = .6 + (rand(_GX_rand) * .8);
|
||||
#declare galaxy_pattern_origin = (<rand(_GX_rand), rand(_GX_rand), rand(_GX_rand)> - .5) * 50;
|
||||
#declare galaxy_turb_origin = (<rand(_GX_rand), rand(_GX_rand), rand(_GX_rand)> - .5) * 50;
|
||||
#declare galaxy_star_colouration = rand(_GX_rand) - .5;
|
||||
#declare _GX_colourturb = _GX_colourturb * _GX_colouration;
|
||||
|
||||
// SELECT RANDOM GALAXY.BG OPTIONS
|
||||
// *******************************
|
||||
#declare galaxy_bgstars = 1 + int(rand(_GX_rand) * 5.99);
|
||||
#declare galaxy_bgnebula = min(1 + int(rand(_GX_rand) * 10), 6);
|
||||
#declare galaxy_nebula_sphere = 1 + int(rand(_GX_rand) * 4.99);
|
||||
#declare galaxy_nebula_ambient = 1 + (<rand(_GX_rand), rand(_GX_rand), rand(_GX_rand)> - .5) * _GX_colourturb;
|
||||
|
||||
// SELECT RANDOM GALAXY.OBJ OPTIONS
|
||||
// ********************************
|
||||
#declare _GX_tempfloat1 = rand(_GX_rand)
|
||||
#if (_GX_tempfloat1 <= .6)
|
||||
#declare galaxy_cluster_name = concat("Star", str(1 + int(rand(_GX_rand) * 3.99), 0, 0))
|
||||
#declare galaxy_cluster_objects = 6 + int(rand(_GX_rand) * 6);
|
||||
#declare galaxy_cluster_rotate = min(0, mod(rand(_GX_rand) * 90, 15) - 45);
|
||||
#else #declare galaxy_cluster_name = "" #end
|
||||
|
||||
#declare galaxy_object_scale = 1 + rand(_GX_rand);
|
||||
#declare galaxy_object_flatten = .1 + rand(_GX_rand) * .5;
|
||||
#declare galaxy_object_rotate = (rand(_GX_rand) - .5) * 90;
|
||||
#declare galaxy_cluster_scale = galaxy_object_scale * (.3 + (rand(_GX_rand) * .4));
|
||||
|
||||
#switch (_GX_tempfloat1)
|
||||
#range (0, .3) #declare galaxy_object_name = concat("Nebula", str(1 + int(rand(_GX_rand) * 5.3), 0, 0)) #break
|
||||
#range (.3, .6) #declare galaxy_object_name = concat("Star", str(1 + int(rand(_GX_rand) * 3.99), 0, 0)) #declare galaxy_object_rotate = galaxy_cluster_rotate #break
|
||||
#range (.6, .8) #declare galaxy_object_name = concat("Comet", str(1 + int(rand(_GX_rand) * 2.99), 0, 0)) #break
|
||||
#else
|
||||
#declare galaxy_cluster_name = concat("Meteor", str(1 + int(rand(_GX_rand) * 1.4), 0, 0))
|
||||
#declare galaxy_cluster_objects = 4 + int(rand(_GX_rand) * 4);
|
||||
#declare galaxy_cluster_rotate = (rand(_GX_rand) - .5) * 90;
|
||||
#declare galaxy_object_name = ""
|
||||
#end
|
||||
|
||||
// SELECT RANDOM STARFIELD OPTIONS
|
||||
// *******************************
|
||||
#declare star_type = int(rand(_GX_rand) * 2.99) + 1;
|
||||
#declare star_colour = _GX_colour;
|
||||
#declare star_colour_turb = _GX_colourturb;
|
||||
|
||||
// WRITE OPTION VALUES TO DEBUG STREAM
|
||||
// ***********************************
|
||||
#if (debug_options != false)
|
||||
#debug concat("// GALAXY INCLUDE FILE OPTIONS (galaxy_seed = ", str(galaxy_seed, 0, 0), ")\r\n")
|
||||
#debug concat(" #declare galaxy_colour1 = <", str(galaxy_colour1.x, 0, 3), ", ", str(galaxy_colour1.y, 0, 3), ", ", str(galaxy_colour1.z, 0, 3), ">;\r\n")
|
||||
#debug concat(" #declare galaxy_colour2 = <", str(galaxy_colour2.x, 0, 3), ", ", str(galaxy_colour2.y, 0, 3), ", ", str(galaxy_colour2.z, 0, 3), ">;\r\n")
|
||||
#debug concat(" #declare galaxy_pattern_scale = ", str(galaxy_pattern_scale, 0, 3), ";\r\n")
|
||||
#debug concat(" #declare galaxy_pattern_origin = <", str(galaxy_pattern_origin.x, 0, 3), ", ", str(galaxy_pattern_origin.y, 0, 3), ", ", str(galaxy_pattern_origin.z, 0, 3), ">;\r\n")
|
||||
#debug concat(" #declare galaxy_turb_origin = <", str(galaxy_turb_origin.x, 0, 3), ", ", str(galaxy_turb_origin.y, 0, 3), ", ", str(galaxy_turb_origin.z, 0, 3), ">;\r\n")
|
||||
#debug concat(" #declare galaxy_star_colouration = ", str(galaxy_star_colouration, 0, 3), ";\r\n")
|
||||
#debug "\r\n"
|
||||
#debug concat(" #declare galaxy_bgstars = ", str(galaxy_bgstars, 0, 0), ";\r\n")
|
||||
#debug concat(" #declare galaxy_bgnebula = ", str(galaxy_bgnebula, 0, 0), ";\r\n")
|
||||
#debug concat(" #declare galaxy_nebula_sphere = ", str(galaxy_nebula_sphere, 0, 0), ";\r\n")
|
||||
#debug concat(" #declare galaxy_nebula_ambient = <", str(galaxy_nebula_ambient.x, 0, 3), ", ", str(galaxy_nebula_ambient.y, 0, 3), ", ", str(galaxy_nebula_ambient.z, 0, 3), ">;\r\n")
|
||||
#debug "\r\n"
|
||||
#debug concat(" #declare galaxy_object_name = \"", galaxy_object_name, "\"\r\n")
|
||||
#if (strlen (galaxy_object_name) > 0)
|
||||
#debug concat(" #declare galaxy_object_scale = ", str(galaxy_object_scale, 0, 3), ";\r\n")
|
||||
#debug concat(" #declare galaxy_object_flatten = ", str(galaxy_object_flatten, 0, 3), ";\r\n")
|
||||
#debug concat(" #declare galaxy_object_rotate = ", str(galaxy_object_rotate, 0, 1), ";\r\n")
|
||||
#end
|
||||
#debug concat(" #declare galaxy_cluster_name = \"", galaxy_cluster_name, "\"\r\n")
|
||||
#if (strlen (galaxy_cluster_name) > 0)
|
||||
#debug concat(" #declare galaxy_cluster_objects = ", str(galaxy_cluster_objects, 0, 0), ";\r\n")
|
||||
#debug concat(" #declare galaxy_cluster_scale = ", str(galaxy_cluster_scale, 0, 3), ";\r\n")
|
||||
#debug concat(" #declare galaxy_cluster_rotate = ", str(galaxy_cluster_rotate, 0, 1), ";\r\n")
|
||||
#end
|
||||
#debug "\r\n"
|
||||
#debug concat(" #declare star_type = ", str(star_type, 0, 0), ";\r\n")
|
||||
#debug concat(" #declare star_colour = <", str(star_colour.x, 0, 3), ", ", str(star_colour.y, 0, 3), ", ", str(star_colour.z, 0, 3), ">;\r\n")
|
||||
#debug concat(" #declare star_colour_turb = <", str(star_colour_turb.x, 0, 3), ", ", str(star_colour_turb.y, 0, 3), ", ", str(star_colour_turb.z, 0, 3), ">;\r\n")
|
||||
#debug "\r\n\r\n"
|
||||
#end
|
||||
|
||||
// CREATE GALAXY BACKGROUND, OBJECTS AND STARFIELD
|
||||
// ***********************************************
|
||||
#if (options_only = false)
|
||||
#if (galaxy_bg != false) #include "GALAXY.BG" #end
|
||||
#if (galaxy_objects != false) #include "GALAXY.OBJ" #end
|
||||
#if (galaxy_starfield != false) #include "GALAXY.SF" #end
|
||||
#end
|
||||
|
||||
#declare galaxy_objects = false;
|
||||
#declare galaxy_starfield = false;
|
||||
|
||||
// SELECT NEW GALAXY SEED (FOR SUBSQUENT GALAXY.INC INCLUSIONS)
|
||||
// ************************************************************
|
||||
#declare galaxy_seed = (rand(_GX_rand) - .5) * 2e6;
|
||||
#version _GX_tempver;
|
|
@ -0,0 +1,461 @@
|
|||
/*************************************************************************
|
||||
GALAXY OBJECTS FILE FOR PERSISTENCE OF VISION 3.x
|
||||
**************************************************************************
|
||||
|
||||
Created by Chris Colefax, 1 February 1998
|
||||
Updated 9 August 1998: updated for POV-Ray 3.1
|
||||
|
||||
See "Galaxy.htm" for more information.
|
||||
|
||||
*************************************************************************/
|
||||
|
||||
// CHECK VARIABLES AND ASSIGN DEFAULTS
|
||||
// ***********************************
|
||||
#declare _GX_objtempver = version; #version 3.0;
|
||||
#ifndef (galaxy_seed) #declare galaxy_seed = 0; #end
|
||||
#ifndef (galaxy_declare_only) #declare galaxy_declare_only = false; #end
|
||||
#ifndef (galaxy_distance) #declare galaxy_distance = 1e4; #end
|
||||
#ifndef (galaxy_pattern_scale) #declare galaxy_pattern_scale = 1; #end
|
||||
#ifndef (galaxy_pattern_origin) #declare galaxy_pattern_origin = <0, 0, 0>; #end
|
||||
#ifndef (galaxy_turb_origin) #declare galaxy_turb_origin = <0, 0, 0>; #end
|
||||
#ifndef (galaxy_intensity) #declare galaxy_intensity = 1; #end
|
||||
|
||||
#ifndef (galaxy_object_name) #declare galaxy_object_name = "Nebula" #end
|
||||
#ifndef (galaxy_object_scale) #declare galaxy_object_scale = 1; #end
|
||||
#ifndef (galaxy_object_flatten) #declare galaxy_object_flatten = .2; #end
|
||||
#ifndef (galaxy_object_rotate) #declare galaxy_object_rotate = 0; #end
|
||||
#ifndef (galaxy_object_position) #declare galaxy_object_position = <0, 0, 0>; #end
|
||||
|
||||
#ifndef (galaxy_cluster_name) #declare galaxy_cluster_name = "Star" #end
|
||||
#ifndef (galaxy_cluster_objects) #declare galaxy_cluster_objects = 6; #end
|
||||
#ifndef (galaxy_cluster_scale) #declare galaxy_cluster_scale = galaxy_object_scale * .5; #end
|
||||
#ifndef (galaxy_cluster_rotate) #declare galaxy_cluster_rotate = galaxy_object_rotate; #end
|
||||
#ifndef (galaxy_scale_turb) #declare galaxy_scale_turb = .5; #end
|
||||
#ifndef (galaxy_rotate_turb) #declare galaxy_rotate_turb = 0; #end
|
||||
#ifndef (galaxy_cluster_spread) #declare _GX_spread = <15, 15, 0> * galaxy_object_scale; #else #declare _GX_spread = galaxy_cluster_spread * <1, 1, 0>; #end
|
||||
|
||||
#ifdef (galaxy_colour1) #declare _GX_colour1 = galaxy_colour1 * <1, 1, 1>;
|
||||
#else #ifdef (galaxy_color1) #declare _GX_colour1 = galaxy_color1 * <1, 1, 1>;
|
||||
#else #declare _GX_colour1 = <1, 1, 1>; #end #end
|
||||
#ifdef (galaxy_colour2) #declare _GX_colour2 = galaxy_colour2 * <1, 1, 1>;
|
||||
#else #ifdef (galaxy_color2) #declare _GX_colour2 = galaxy_color2 * <1, 1, 1>;
|
||||
#else #declare _GX_colour2 = _GX_colour1 - .3; #end #end
|
||||
#ifdef (galaxy_colour3) #declare _GX_colour3 = galaxy_colour3 * <1, 1, 1>;
|
||||
#else #ifdef (galaxy_color3) #declare _GX_colour3 = galaxy_color3 * <1, 1, 1>;
|
||||
#else #declare _GX_colour3 = (_GX_colour1 + _GX_colour2) / 2; #end #end
|
||||
#ifdef (galaxy_star_colouration) #declare _GX_starcolouration = galaxy_star_colouration;
|
||||
#else #ifdef (galaxy_star_coloration) #declare _GX_starcolouration = galaxy_star_coloration;
|
||||
#else #declare _GX_starcolouration = .2; #end #end
|
||||
#ifdef (galaxy_colour_turb) #declare _GX_colourturb = galaxy_colour_turb * <1, 1, 1>;
|
||||
#else #ifdef (galaxy_color_turb) #declare _GX_colourturb = galaxy_color_turb * <1, 1, 1>;
|
||||
#else #declare _GX_colourturb = <.2, .2, .2>; #end #end
|
||||
|
||||
#declare _GX_finaltranslate = galaxy_turb_origin - galaxy_pattern_origin;
|
||||
#ifndef (_GX_tracelevel) #declare _GX_tracelevel = 5; #end
|
||||
#if (galaxy_object_flatten > 0) #declare _GX_flatten = <1, 1.01 - mod(galaxy_object_flatten, 1), 1>;
|
||||
#else #declare _GX_flatten = <mod(galaxy_object_flatten, 1) + 1.01, 1, 1>; #end
|
||||
|
||||
// CALCULATE STAR COLOURS
|
||||
// **********************
|
||||
#if (_GX_starcolouration = 1)
|
||||
#declare _GX_starcolour1 = _GX_colour1;
|
||||
#declare _GX_starcolour2 = _GX_colour2;
|
||||
#declare _GX_starcolour3 = _GX_colour3;
|
||||
#else
|
||||
#declare _GX_tempfloat1 = max(_GX_colour1.x, _GX_colour1.y); #declare _GX_tempfloat1 = max(_GX_tempfloat1, _GX_colour1.z);
|
||||
#declare _GX_tempfloat2 = min(_GX_colour1.x, _GX_colour1.y); #declare _GX_tempfloat2 = min(_GX_tempfloat2, _GX_colour1.z);
|
||||
#declare _GX_tempfloat1 = (_GX_tempfloat1 + _GX_tempfloat2) / 2; #declare _GX_starcolour1 = _GX_tempfloat1 + (_GX_colour1 - _GX_tempfloat1) * _GX_starcolouration;
|
||||
|
||||
#declare _GX_tempfloat1 = max(_GX_colour2.x, _GX_colour2.y); #declare _GX_tempfloat1 = max(_GX_tempfloat1, _GX_colour2.z);
|
||||
#declare _GX_tempfloat2 = min(_GX_colour2.x, _GX_colour2.y); #declare _GX_tempfloat2 = min(_GX_tempfloat2, _GX_colour2.z);
|
||||
#declare _GX_tempfloat1 = (_GX_tempfloat1 + _GX_tempfloat2) / 2; #declare _GX_starcolour2 = _GX_tempfloat1 + (_GX_colour2 - _GX_tempfloat1) * _GX_starcolouration;
|
||||
|
||||
#declare _GX_tempfloat1 = max(_GX_colour3.x, _GX_colour3.y); #declare _GX_tempfloat1 = max(_GX_tempfloat1, _GX_colour3.z);
|
||||
#declare _GX_tempfloat2 = min(_GX_colour3.x, _GX_colour3.y); #declare _GX_tempfloat2 = min(_GX_tempfloat2, _GX_colour3.z);
|
||||
#declare _GX_tempfloat1 = (_GX_tempfloat1 + _GX_tempfloat2) / 2; #declare _GX_starcolour3 = _GX_tempfloat1 + (_GX_colour3 - _GX_tempfloat1) * _GX_starcolouration;
|
||||
#end
|
||||
|
||||
// START LOOP TO CREATE SINGLE AND CLUSTER OBJECTS
|
||||
// ***********************************************
|
||||
#declare _GX_name = strupr(galaxy_object_name)
|
||||
#declare _GX_objscale = galaxy_object_scale * <1, 1, 1>;
|
||||
#declare _GX_objloop = 0; #while (_GX_objloop < 2)
|
||||
#declare _GX_objcreated = false;
|
||||
#if (strcmp(_GX_name, "-") != 0 & strlen(_GX_name) != 0)
|
||||
|
||||
// SELECT STAR OBJECTS
|
||||
// *******************
|
||||
#if (strcmp(substr(_GX_name, 1, 1), "S") = 0)
|
||||
#if (strcmp(_GX_name, "STAR") = 0 | strcmp(_GX_name, "STAR1") = 0 | strcmp(_GX_name, "S1") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {average pigment_map {
|
||||
[1 onion color_map {
|
||||
[.1 rgb _GX_starcolour1 * 8 transmit pow(.05, galaxy_intensity)] [.3 rgb _GX_starcolour3 * 2 transmit pow(.2, galaxy_intensity)]
|
||||
[.35 rgb _GX_starcolour1 * 3 transmit pow(.1, galaxy_intensity)] [.4 rgb _GX_starcolour3 * 1.5 transmit pow(.2, galaxy_intensity)]
|
||||
[.7 rgb _GX_starcolour2 transmit pow(.5, galaxy_intensity)] [.71 rgb _GX_starcolour3 * 1.5 transmit pow(.4, galaxy_intensity)]
|
||||
[.72 rgb _GX_starcolour2 transmit pow(.5, galaxy_intensity)] [1 rgb _GX_starcolour2 transmit 1]}
|
||||
scallop_wave scale 2]
|
||||
[1 onion color_map {
|
||||
[0 rgb _GX_starcolour1 * 2 transmit pow(.05, galaxy_intensity)] [.02 rgb _GX_starcolour2 transmit 1]}
|
||||
scale <45, 1, 1>]
|
||||
[1 onion color_map {
|
||||
[0 rgb _GX_starcolour1 * 2 transmit pow(.05, galaxy_intensity)] [.02 rgb _GX_starcolour2 transmit 1]}
|
||||
scale <1, 50, 1>]}}}
|
||||
#declare _GX_objscale = <.2, .2, 1> * _GX_objscale; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "STAR2") = 0 | strcmp(_GX_name, "S2") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {average pigment_map {
|
||||
[1 onion color_map {
|
||||
[.05 rgb _GX_starcolour1 * 8 transmit pow(.05, galaxy_intensity)] [.2 rgb _GX_starcolour3 * 3 transmit pow(.3, galaxy_intensity)]
|
||||
[1 rgb _GX_starcolour2 transmit 1]} scallop_wave scale 2]
|
||||
[1 onion color_map {[0 rgb _GX_starcolour1 * 4 transmit pow(.05, galaxy_intensity)] [.02 rgb _GX_starcolour2 transmit 1]}
|
||||
scale <45, 1, 1>]
|
||||
[1 onion color_map {[0 rgb _GX_starcolour1 * 4 transmit pow(.05, galaxy_intensity)] [.02 rgb _GX_starcolour2 transmit 1]}
|
||||
scale <1, 50, 1>]}}}
|
||||
#declare _GX_objscale = <.2, .2, 1> * _GX_objscale; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "STAR3") = 0 | strcmp(_GX_name, "S3") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {average pigment_map {
|
||||
[1 onion color_map {
|
||||
[.15 rgb _GX_starcolour1 * 8 transmit pow(.05, galaxy_intensity)] [.4 rgb _GX_starcolour3 * 3 transmit pow(.1, galaxy_intensity)]
|
||||
[.49 rgb _GX_starcolour3 * 1.5 transmit pow(.3, galaxy_intensity)] [.5 rgb _GX_starcolour1 * 2 transmit pow(.1, galaxy_intensity)]
|
||||
[.51 rgb _GX_starcolour3 transmit pow(.3, galaxy_intensity)] [1 rgb _GX_starcolour2 transmit 1]}
|
||||
scallop_wave scale 2]
|
||||
[1 onion color_map {[0 rgb _GX_starcolour1 * 2 transmit pow(.05, galaxy_intensity)] [.01 rgb _GX_starcolour2 transmit 1]}
|
||||
scale <90, 1, 1>]
|
||||
[1 onion color_map {[0 rgb _GX_starcolour1 * 2 transmit pow(.05, galaxy_intensity)] [.01 rgb _GX_starcolour2 transmit 1]}
|
||||
scale <1, 100, 1>]}}}
|
||||
#declare _GX_objscale = <.2, .2, 1> * _GX_objscale; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "STAR4") = 0 | strcmp(_GX_name, "S4") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {average pigment_map {
|
||||
[1 onion color_map {
|
||||
[.05 rgb _GX_starcolour1 * 10 transmit pow(.05, galaxy_intensity)] [.2 rgb _GX_starcolour3 * 3 transmit pow(.3, galaxy_intensity)]
|
||||
[1 rgb _GX_starcolour2 transmit 1]} scallop_wave scale 2]
|
||||
[1 onion color_map {[0 rgb _GX_starcolour1 transmit pow(.8, galaxy_intensity)] [.06 rgb _GX_starcolour2 transmit 1]}
|
||||
scale <16, 1, 1>]
|
||||
[1 onion color_map {[0 rgb _GX_starcolour1 transmit pow(.8, galaxy_intensity)] [.06 rgb _GX_starcolour2 transmit 1]}
|
||||
scale <16, 1, 1> rotate z * 120]
|
||||
[1 onion color_map {[0 rgb _GX_starcolour1 transmit pow(.8, galaxy_intensity)] [.06 rgb _GX_starcolour2 transmit 1]}
|
||||
scale <16, 1, 1> rotate z * 240]}}}
|
||||
#declare _GX_objscale = <.2, .2, 1> * _GX_objscale; #declare _GX_objcreated = true; #end
|
||||
#end
|
||||
|
||||
// SELECT GALAXY OBJECTS
|
||||
// *********************
|
||||
#if (strcmp(substr(_GX_name, 1, 1), "G") = 0)
|
||||
#if (strcmp(_GX_name, "GALAXY") = 0 | strcmp(_GX_name, "GALAXY1") = 0 | strcmp(_GX_name, "G1") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {onion pigment_map {
|
||||
[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)]
|
||||
[.2 wrinkles color_map {[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.4, galaxy_intensity)]}
|
||||
scale .06 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.4 spiral1 2 pigment_map {
|
||||
[.3 wrinkles color_map {[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.6, galaxy_intensity)]}
|
||||
scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[1 rgb _GX_colour3 transmit pow(.6, galaxy_intensity)]}
|
||||
scale .15 translate -galaxy_turb_origin warp {turbulence .06 octaves 4 lambda 3} translate galaxy_turb_origin]
|
||||
[.8 spiral1 6 pigment_map {
|
||||
[.1 wrinkles color_map {[0 rgb _GX_colour3 transmit pow(.2, galaxy_intensity)] [1 rgb _GX_colour2 transmit pow(.8, galaxy_intensity)]}
|
||||
scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.8 rgb _GX_colour2 transmit pow(.8, galaxy_intensity)]}
|
||||
scale .13 translate -galaxy_turb_origin warp {turbulence .06 octaves 4 lambda 3} translate galaxy_turb_origin]
|
||||
[.9 spiral1 12 pigment_map {
|
||||
[0 wrinkles color_map {[0 rgb _GX_colour3 transmit pow(.3, galaxy_intensity)] [.8 rgb _GX_colour2 transmit pow(.9, galaxy_intensity)]}
|
||||
scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.6 rgb _GX_colour2 transmit pow(.9, galaxy_intensity)]}
|
||||
scale .09 translate -galaxy_turb_origin warp {turbulence .06 octaves 4 lambda 3} translate galaxy_turb_origin]
|
||||
[1 rgb _GX_colour2 transmit 1]}
|
||||
scallop_wave scale 2}}
|
||||
#declare _GX_objscale = <.25, .25, 1> * _GX_objscale * _GX_flatten; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "GALAXY2") = 0 | strcmp(_GX_name, "G2") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {onion pigment_map {
|
||||
[0 rgb _GX_colour1 transmit pow(.05, galaxy_intensity)]
|
||||
[.4 wrinkles color_map {[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.7, galaxy_intensity)]}
|
||||
scale .08 * galaxy_pattern_scale translate -galaxy_turb_origin warp {turbulence .08 octaves 4 lambda 4} translate _GX_finaltranslate]
|
||||
[.65 spiral1 2 pigment_map {
|
||||
[0 wrinkles color_map {[0 rgb _GX_colour1 transmit pow(.2, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.7, galaxy_intensity)]}
|
||||
scale .25 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[1 wrinkles color_map {[0 rgb _GX_colour3 transmit pow(.5, galaxy_intensity)] [.6 rgb _GX_colour3 transmit pow(.9, galaxy_intensity)]}
|
||||
scale .15 * galaxy_pattern_scale translate -galaxy_pattern_origin]}
|
||||
sine_wave scale .2 translate -galaxy_turb_origin warp {turbulence -.08 octaves 4 lambda 4} translate galaxy_turb_origin]
|
||||
[.85 spiral1 2 pigment_map {
|
||||
[0 wrinkles color_map {[0 rgb _GX_colour3 transmit pow(.4, galaxy_intensity)] [.8 rgb _GX_colour2 transmit pow(.8, galaxy_intensity)]}
|
||||
scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.8 rgb _GX_colour2 transmit pow(.9, galaxy_intensity)]}
|
||||
sine_wave scale .15 translate -galaxy_turb_origin warp {turbulence .05 octaves 4 lambda 4} translate galaxy_turb_origin]
|
||||
[1 rgb _GX_colour2 transmit 1]}
|
||||
scallop_wave scale 2}}
|
||||
#declare _GX_objscale = <.25, .25, 1> * _GX_objscale * _GX_flatten; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "GALAXY3") = 0 | strcmp(_GX_name, "G3") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {onion pigment_map {
|
||||
[.03 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)]
|
||||
[.25 spiral1 -2 pigment_map {
|
||||
[0 wrinkles color_map {[0 rgb _GX_colour3 transmit pow(.9, galaxy_intensity)] [.6 rgb _GX_colour1 transmit pow(.4, galaxy_intensity)]} scale .1 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.1 wrinkles color_map {[0 rgb _GX_colour1 transmit pow(.3, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.5, galaxy_intensity)]} scale .3 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.9 wrinkles color_map {[0 rgb _GX_colour3 transmit pow(.5, galaxy_intensity)] [1 rgb _GX_colour1 transmit pow(.8, galaxy_intensity)]} scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]}
|
||||
scale .4 translate -galaxy_turb_origin warp {turbulence .04 octaves 4 lambda 3 omega .5} translate galaxy_turb_origin]
|
||||
[.5 spiral1 -2 pigment_map {
|
||||
[0 wrinkles color_map {[0 rgb _GX_colour3 transmit pow(.1, galaxy_intensity)] [.5 rgb _GX_colour2 transmit pow(.5, galaxy_intensity)]} scale .1 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.3 wrinkles color_map {[0 rgb _GX_colour2 transmit pow(.3, galaxy_intensity)] [1 rgb _GX_colour2 transmit pow(.4, galaxy_intensity)]} scale .3 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[1 wrinkles color_map {[0 rgb _GX_colour2 transmit pow(.7, galaxy_intensity)] [1 rgb _GX_colour2 transmit 1]} scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]}
|
||||
scale .8 translate -galaxy_turb_origin warp {turbulence .1 octaves 4 lambda 3 omega .4} translate galaxy_turb_origin]
|
||||
[1 rgb _GX_colour2 transmit 1]}}}
|
||||
#declare _GX_objscale = <.25, .25, 1> * _GX_objscale * _GX_flatten; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "GALAXY4") = 0 | strcmp(_GX_name, "G4") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {onion pigment_map {
|
||||
[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)]
|
||||
[.4 spiral1 -2 pigment_map {
|
||||
[0 wrinkles color_map {[.2 rgb _GX_colour3 transmit pow(.7, galaxy_intensity)] [1 rgb _GX_colour1 transmit pow(.2, galaxy_intensity)]} scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.4 wrinkles color_map {[.4 rgb _GX_colour3 transmit pow(.8, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.4, galaxy_intensity)]} scale .1 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.9 wrinkles color_map {[0 rgb _GX_colour2 transmit pow(.9, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.8, galaxy_intensity)]} scale .3 * galaxy_pattern_scale translate -galaxy_pattern_origin]}
|
||||
scale 1.2 translate -galaxy_turb_origin warp {turbulence .04 octaves 4 lambda 3} translate galaxy_turb_origin]
|
||||
[.6 spiral1 -2 pigment_map {
|
||||
[0 wrinkles color_map {[.3 rgb _GX_colour3 transmit pow(.8, galaxy_intensity)] [1 rgb _GX_colour1 transmit pow(.3, galaxy_intensity)]} scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.3 wrinkles color_map {[.5 rgb _GX_colour2 transmit pow(.9, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.5, galaxy_intensity)]} scale .1 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.8 wrinkles color_map {[0 rgb _GX_colour2 transmit 1] [1 rgb _GX_colour2 transmit pow(.8, galaxy_intensity)]} scale .3 * galaxy_pattern_scale translate -galaxy_pattern_origin]}
|
||||
scale .8 translate -galaxy_turb_origin warp {turbulence .03 octaves 4 lambda 3} translate galaxy_turb_origin]
|
||||
[1 rgb _GX_colour2 transmit 1]}}}
|
||||
#declare _GX_objscale = <.25, .25, 1> * _GX_objscale * _GX_flatten; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "GALAXY5") = 0 | strcmp(_GX_name, "G5") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {onion pigment_map {
|
||||
[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)]
|
||||
[.35 granite color_map {
|
||||
[0 rgb _GX_colour3 transmit pow(.4, galaxy_intensity)] [.8 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)]}
|
||||
scale .06 * galaxy_pattern_scale translate _GX_finaltranslate]
|
||||
[.6 granite color_map {
|
||||
[.3 rgb _GX_colour2 transmit pow(.7, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.2, galaxy_intensity)]}
|
||||
scale .05 * galaxy_pattern_scale translate _GX_finaltranslate]
|
||||
[.75 granite color_map {
|
||||
[.5 rgb _GX_colour2 transmit pow(.9, galaxy_intensity)] [1 rgb _GX_colour2 transmit pow(.3, galaxy_intensity)]}
|
||||
scale .04 * galaxy_pattern_scale translate _GX_finaltranslate]
|
||||
[1 rgb _GX_colour2 transmit 1]}
|
||||
scallop_wave scale 2}}
|
||||
#declare _GX_objscale = <.25, .25, 1> * _GX_objscale * _GX_flatten; #declare _GX_objcreated = true; #end
|
||||
#end
|
||||
|
||||
// SELECT NEBULA OBJECTS
|
||||
// *********************
|
||||
#if (strcmp(substr(_GX_name, 1, 1), "N") = 0)
|
||||
#if (strcmp(_GX_name, "NEBULA") = 0 | strcmp(_GX_name, "NEBULA1") = 0 | strcmp(_GX_name, "N1") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {onion pigment_map {
|
||||
[.2 granite color_map {[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.6, galaxy_intensity)]} scale 2 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.8 granite color_map {[0 rgb _GX_colour3 transmit pow(.6, galaxy_intensity)] [.5 rgb _GX_colour2 transmit pow(.95, galaxy_intensity)]} scale galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.9 rgb _GX_colour2 transmit 1]}
|
||||
scallop_wave scale 2.2
|
||||
translate -galaxy_turb_origin warp {turbulence .35 octaves 4 omega .4 lambda 3} translate galaxy_turb_origin}}
|
||||
#declare _GX_objscale = <.3, .3, 1> * _GX_objscale; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "NEBULA2") = 0 | strcmp(_GX_name, "N2") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {onion pigment_map {
|
||||
[0 wrinkles color_map {[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.6, galaxy_intensity)]}
|
||||
warp {turbulence .5 octaves 2} scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.8 wrinkles color_map {[0 rgb _GX_colour3 transmit pow(.5, galaxy_intensity)] [.5 rgb _GX_colour2 transmit pow(.9, galaxy_intensity)]}
|
||||
warp {turbulence .5 octaves 2} scale .18 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.9 rgbt _GX_colour2 transmit 1]}
|
||||
scallop_wave scale 2.2
|
||||
translate -galaxy_turb_origin warp {turbulence .2 octaves 2 lambda 3 omega .6} translate galaxy_turb_origin}}
|
||||
#declare _GX_objscale = <.3, .3, 1> * _GX_objscale; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "NEBULA3") = 0 | strcmp(_GX_name, "N3") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {onion pigment_map {
|
||||
[0 granite color_map {[.05 rgb _GX_colour3 transmit 1] [.3 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)]}
|
||||
scale .7 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.8 wrinkles color_map {[0 rgb _GX_colour2 transmit 1] [1 rgb _GX_colour3 transmit pow(.6, galaxy_intensity)]}
|
||||
scale .1 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.9 rgbt _GX_colour2 transmit 1]}
|
||||
scallop_wave scale 2.2
|
||||
translate -galaxy_turb_origin warp {turbulence .25 octaves 4 lambda 3 omega .4} translate galaxy_turb_origin}}
|
||||
#declare _GX_objscale = <.3, .3, 1> * _GX_objscale; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "NEBULA4") = 0 | strcmp(_GX_name, "N4") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {onion pigment_map {
|
||||
[.2 wrinkles color_map {[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.9, galaxy_intensity)]} scale .1 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.5 granite color_map {[0 rgb _GX_colour1 transmit pow(.3, galaxy_intensity)] [.6 rgb _GX_colour3 transmit pow(.95, galaxy_intensity)]} scale .4 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.8 granite color_map {[0 rgb _GX_colour3 transmit pow(.6, galaxy_intensity)] [.3 rgb _GX_colour2 transmit 1]} scale .3 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.9 rgb _GX_colour2 transmit 1]}
|
||||
scallop_wave scale 2.2
|
||||
translate -galaxy_turb_origin warp {turbulence .25 octaves 4 omega .4 lambda 3} translate galaxy_turb_origin}}
|
||||
#declare _GX_objscale = <.3, .3, 1> * _GX_objscale; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "NEBULA5") = 0 | strcmp(_GX_name, "N5") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {onion pigment_map {
|
||||
[.5 wrinkles color_map {[.1 rgb _GX_colour2 transmit 1] [.4 rgb _GX_colour3 transmit pow(.5, galaxy_intensity)] [.8 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)]} scale .1 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.8 wrinkles color_map {[.5 rgb _GX_colour2 transmit 1] [1 rgb _GX_colour3 transmit pow(.4, galaxy_intensity)]} scale .1 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.9 rgb _GX_colour2 transmit 1]}
|
||||
scallop_wave scale 2.3
|
||||
translate -galaxy_turb_origin warp {turbulence .3 octaves 4 omega .3 lambda 5} translate galaxy_turb_origin}}
|
||||
#declare _GX_objscale = <.2, .2, 1> * _GX_objscale; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "NEBULA6") = 0 | strcmp(_GX_name, "N6") = 0)
|
||||
#declare _GX_object = disc {0, z, .999 pigment {onion pigment_map {
|
||||
[.4 wrinkles color_map {[0 rgb _GX_colour2 transmit pow(.7, galaxy_intensity)] [1 rgb _GX_colour2 transmit pow(.9, galaxy_intensity)]} scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.5 wrinkles pigment_map {
|
||||
[0 wrinkles color_map {[0 rgb _GX_colour3 transmit pow(.4, galaxy_intensity)] [1 rgb _GX_colour2 transmit pow(.8, galaxy_intensity)]} scale .5]
|
||||
[1 wrinkles color_map {[0 rgb _GX_colour3 transmit pow(.8, galaxy_intensity)] [1 rgb _GX_colour2 transmit pow(.95, galaxy_intensity)]} scale .5]}
|
||||
scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.7 wrinkles pigment_map {
|
||||
[0 granite color_map {[0 rgb _GX_colour1 transmit pow(.2, galaxy_intensity)] [1 rgb _GX_colour1 transmit pow(.6, galaxy_intensity)]}]
|
||||
[1 granite color_map {[0 rgb _GX_colour3 transmit pow(.8, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.95, galaxy_intensity)]}]}
|
||||
scale .2 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.85 granite color_map {[0 rgb _GX_colour3 transmit pow(.8, galaxy_intensity)] [.4 rgb _GX_colour3 transmit 1]} scale .4 * galaxy_pattern_scale translate -galaxy_pattern_origin]
|
||||
[.9 rgb _GX_colour1 transmit 1]}
|
||||
scallop_wave scale 2.5
|
||||
translate -galaxy_turb_origin warp {turbulence .04 octaves 4 omega .8 lambda 3} translate galaxy_turb_origin}}
|
||||
#declare _GX_objscale = <.15, .15, 1> * _GX_objscale; #declare _GX_objcreated = true; #end
|
||||
#end
|
||||
|
||||
// SELECT COMET OBJECTS
|
||||
// ********************
|
||||
#if (strcmp(substr(_GX_name, 1, 1), "C") = 0)
|
||||
#if (strcmp(_GX_name, "COMET") = 0 | strcmp(_GX_name, "COMET1") = 0 | strcmp(_GX_name, "C1") = 0)
|
||||
#declare _GX_object = disc {<.5, 0, 0>, z, .499 pigment {onion pigment_map {
|
||||
[.03 onion color_map {[.03 rgb _GX_colour1 transmit pow(.05, galaxy_intensity)] [.05 rgb _GX_colour3 transmit 1]} translate <.05, 0, 0>]
|
||||
[.06 radial color_map {[.1 rgb _GX_colour1 transmit pow(.05, galaxy_intensity)] [.25 rgb _GX_colour2 transmit 1]} triangle_wave]
|
||||
[.4 radial pigment_map {
|
||||
[.05 wrinkles color_map {[0 rgb _GX_colour2 transmit 1] [1 rgb _GX_colour3 transmit pow(.1, galaxy_intensity)]}
|
||||
scale galaxy_pattern_scale translate -galaxy_turb_origin warp {turbulence 2 octaves 3 lambda 2} translate _GX_finaltranslate]
|
||||
[.25 rgb _GX_colour2 transmit 1]} triangle_wave]
|
||||
[.8 rgb _GX_colour2 transmit 1]} rotate x * 90}
|
||||
scale <1.05, .35, 1> translate <-.05, 0, 0>}
|
||||
#declare _GX_objscale = <.5, .5, 1> * _GX_objscale * _GX_flatten; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "COMET2") = 0 | strcmp(_GX_name, "C2") = 0)
|
||||
#declare _GX_object = disc {<.5, 0, 0>, z, .499 pigment {onion pigment_map {
|
||||
[.03 onion color_map {[.03 rgb _GX_colour1 transmit pow(.05, galaxy_intensity)] [.05 rgb _GX_colour3 transmit 1]} translate <.05, 0, 0>]
|
||||
[.06 radial color_map {[.1 rgb _GX_colour1 transmit pow(.05, galaxy_intensity)] [.25 rgb _GX_colour2 transmit 1]} triangle_wave]
|
||||
[.2 radial pigment_map {
|
||||
[.1 granite color_map {[0 rgb _GX_colour3 transmit pow(.2, galaxy_intensity)] [1 rgb _GX_colour2 transmit 1]} scale galaxy_pattern_scale translate _GX_finaltranslate]
|
||||
[.2 rgb _GX_colour2 transmit 1]} translate -galaxy_turb_origin warp {turbulence .03 lambda 3 octaves 3 omega .9} translate galaxy_turb_origin
|
||||
triangle_wave]
|
||||
[.6 radial pigment_map {
|
||||
[.1 granite color_map {[0 rgb _GX_colour3 transmit pow(.8, galaxy_intensity)] [.6 rgb _GX_colour2 transmit 1]} scale .4 * galaxy_pattern_scale translate _GX_finaltranslate]
|
||||
[.2 rgb _GX_colour2 transmit 1]} translate -galaxy_turb_origin warp {turbulence .1 lambda 3 octaves 3 omega .9} translate galaxy_turb_origin
|
||||
triangle_wave]
|
||||
[.8 rgb _GX_colour2 transmit 1]} rotate x * 90}
|
||||
scale <1.05, .4, 1> translate <-.05, 0, 0>}
|
||||
#declare _GX_objscale = <.5, .5, 1> * _GX_objscale * _GX_flatten; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "COMET3") = 0 | strcmp(_GX_name, "C3") = 0)
|
||||
#declare _GX_object = disc {<.5, 0, 0>, z, .499 pigment {average pigment_map {
|
||||
[1 onion color_map {[.006 rgb _GX_colour1 * 3 transmit pow(.05, galaxy_intensity)] [.02 rgb _GX_colour3 transmit 1]}
|
||||
scale <1.5, 1, 1> rotate z * 30 translate <.05, 0, 0>]
|
||||
[1 onion pigment_map {
|
||||
[.05 rgb _GX_colour3 transmit 1]
|
||||
[.1 spiral1 1 color_map {[.03 rgb _GX_colour1 * 3 transmit pow(.05, galaxy_intensity)] [.07 rgb _GX_colour3 transmit 1]} scale 4]
|
||||
[.3 spiral1 1 color_map {[.03 rgb _GX_colour3 * 2 transmit pow(.1, galaxy_intensity)] [.07 rgb _GX_colour2 transmit 1]} scale 4]
|
||||
[.6 spiral1 1 pigment_map {
|
||||
[0 granite color_map {[0 rgb _GX_colour3 * 2 transmit pow(.1, galaxy_intensity)] [1 rgb _GX_colour2 transmit pow(.4, galaxy_intensity)]}
|
||||
scale <.2, .03, .03> * galaxy_pattern_scale rotate z * 50 translate _GX_finaltranslate]
|
||||
[.08 rgb _GX_colour2 transmit 1]} scale 4]
|
||||
[.85 spiral1 1 pigment_map {
|
||||
[0 granite color_map {[0 rgb _GX_colour2 transmit pow(.4, galaxy_intensity)] [1 rgb _GX_colour2 transmit pow(.7, galaxy_intensity)]}
|
||||
scale <.2, .03, .03> * galaxy_pattern_scale rotate z * 35 translate _GX_finaltranslate]
|
||||
[.1 rgb _GX_colour2 transmit 1]} scale 4]
|
||||
[.98 rgb _GX_colour2 transmit 1]}
|
||||
scallop_wave scale 2 rotate z * 125 translate <.02, -.02, 0>]}
|
||||
scale <1, 2, 1>}
|
||||
scale <1.05, .6, 1> translate <-.05, 0, 0>}
|
||||
#declare _GX_objscale = <.5, .5, 1> * _GX_objscale * _GX_flatten; #declare _GX_objcreated = true; #end
|
||||
#end
|
||||
|
||||
// SELECT METEOR OBJECTS
|
||||
// *********************
|
||||
#if (strcmp(substr(_GX_name, 1, 1), "M") = 0)
|
||||
#if (strcmp(_GX_name, "METEOR") = 0 | strcmp(_GX_name, "METEOR1") = 0 | strcmp(_GX_name, "M1") = 0)
|
||||
#declare _GX_object = disc {<.5, 0, 0>, z, .499 pigment {gradient x pigment_map {
|
||||
[.1 onion color_map {[.03 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)] [.05 rgb _GX_colour3 transmit 1]} translate <.1, 0, 0>]
|
||||
[.12 onion color_map {[.02 rgb _GX_colour1 transmit pow(.2, galaxy_intensity)] [.05 rgb _GX_colour3 transmit 1]}
|
||||
scale <18, 1, 1> translate <.1, 0, 0>]
|
||||
[.5 onion pigment_map {
|
||||
[0 granite color_map {[0 rgb _GX_colour3 transmit pow(.3, galaxy_intensity)] [1 rgb _GX_colour2 transmit 1]} scale .2 * galaxy_pattern_scale translate _GX_finaltranslate]
|
||||
[.05 rgb _GX_colour2 transmit 1]}
|
||||
scale <18, 1, 1> translate <.1, 0, 0> translate -galaxy_turb_origin warp {turbulence .02 octaves 3 lambda 4} translate galaxy_turb_origin]}
|
||||
scale <1, 5, 1>}
|
||||
scale <1.1, .1, 1> translate <-.1, 0, 0>}
|
||||
#declare _GX_objscale = <.5, .5, 1> * _GX_objscale * _GX_flatten; #declare _GX_objcreated = true; #end
|
||||
|
||||
#if (strcmp(_GX_name, "METEOR2") = 0 | strcmp(_GX_name, "M2") = 0)
|
||||
#declare _GX_object = disc {<.5, 0, 0>, z, .499 pigment {gradient x pigment_map {
|
||||
[.1 onion pigment_map {
|
||||
[.03 granite color_map {[0 rgb _GX_colour1 transmit pow(.05, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.4, galaxy_intensity)]} scale <.3, .15, .1> * galaxy_pattern_scale translate _GX_finaltranslate]
|
||||
[.05 rgb _GX_colour2 transmit 1]}
|
||||
translate <.1, 0, 0>]
|
||||
[.12 onion pigment_map {
|
||||
[.02 granite color_map {[0 rgb _GX_colour1 transmit pow(.1, galaxy_intensity)] [1 rgb _GX_colour3 transmit pow(.4, galaxy_intensity)]} scale <.02, .15, .1> * galaxy_pattern_scale translate _GX_finaltranslate]
|
||||
[.04 granite color_map {[0 rgb _GX_colour3 transmit pow(.2, galaxy_intensity)] [.7 rgb _GX_colour2 transmit 1]} scale <.015, .1, .1> * galaxy_pattern_scale translate _GX_finaltranslate]
|
||||
[.05 rgb _GX_colour2 transmit 1]}
|
||||
scale <18, 1, 1> translate <.1, 0, 0>
|
||||
translate -galaxy_turb_origin warp {turbulence .02 octaves 4 omega .6 lambda 4} translate galaxy_turb_origin]
|
||||
[.5 onion pigment_map {
|
||||
[0 granite color_map {[0 rgb _GX_colour3 transmit pow(.4, galaxy_intensity)] [.7 rgb _GX_colour2 transmit pow(.9, galaxy_intensity)]} scale <.015, .1, .1> * galaxy_pattern_scale translate _GX_finaltranslate]
|
||||
[.05 rgb _GX_colour2 transmit 1]}
|
||||
scale <18, 1, 1> translate <.1, 0, 0> translate -galaxy_turb_origin warp {turbulence .04 octaves 4 omega .4 lambda 4} translate galaxy_turb_origin]}
|
||||
scale <1, 5, 1>}
|
||||
scale <1.1, .2, 1> translate <-.1, 0, 0>}
|
||||
#declare _GX_objscale = <.5, .5, 1> * _GX_objscale * _GX_flatten; #declare _GX_objcreated = true; #end
|
||||
#end
|
||||
|
||||
// POSITION SINGLE OBJECT
|
||||
// **********************
|
||||
#switch (_GX_objloop)
|
||||
#case (0) #if (_GX_objcreated = false)
|
||||
#warning "You specified an incorrect galaxy_object_name!\r\n"
|
||||
#else
|
||||
#declare galaxy_object = object {_GX_object
|
||||
finish {ambient 1 diffuse 0 reflection 0 phong 0 specular 0 crand 0}
|
||||
scale _GX_objscale rotate z * galaxy_object_rotate
|
||||
no_shadow hollow}
|
||||
|
||||
#if (galaxy_declare_only = false) object {galaxy_object
|
||||
translate z rotate <-1, 1, 0> * galaxy_object_position
|
||||
scale galaxy_distance
|
||||
#ifdef (galaxy_rotate) rotate galaxy_rotate #end
|
||||
#ifdef (galaxy_origin) translate -galaxy_origin #end }
|
||||
#declare galaxy_distance = galaxy_distance * (sqrt(1 + pow(max(_GX_objscale.x, _GX_objscale.y), 2)) + .001);
|
||||
#declare _GX_tracelevel = _GX_tracelevel + 1;
|
||||
global_settings {max_trace_level min(_GX_tracelevel, 30)}
|
||||
#end
|
||||
#end #break
|
||||
|
||||
// POSITION CLUSTER OBJECTS
|
||||
// ************************
|
||||
#case (1) #if (_GX_objcreated = false)
|
||||
#warning "You specified an incorrect galaxy_cluster_name!\r\n"
|
||||
#else
|
||||
#declare galaxy_cluster_object = object {_GX_object
|
||||
finish {ambient 1 diffuse 0 reflection 0 phong 0 specular 0 crand 0}
|
||||
scale _GX_objscale rotate z * galaxy_cluster_rotate
|
||||
no_shadow hollow}
|
||||
|
||||
#if (galaxy_declare_only = false & galaxy_cluster_objects >= 1)
|
||||
#declare _GX_objrand = seed(galaxy_seed);
|
||||
union { #declare _GX_objcount = 0; #while (_GX_objcount < galaxy_cluster_objects)
|
||||
object {galaxy_cluster_object
|
||||
finish {ambient 1 + ((<rand(_GX_objrand), rand(_GX_objrand), rand(_GX_objrand)> - .5) * _GX_colourturb)}
|
||||
#declare _GX_clusterscale = 1 + ((rand(_GX_objrand) - .5) * galaxy_scale_turb * 2);
|
||||
scale _GX_clusterscale
|
||||
rotate z * (rand(_GX_objrand) - .5) * galaxy_rotate_turb
|
||||
translate z
|
||||
rotate (<rand(_GX_objrand), rand(_GX_objrand), .5> - .5) * _GX_spread + <-1, 1, 0> * galaxy_object_position
|
||||
scale galaxy_distance}
|
||||
#declare _GX_objscale2 = _GX_clusterscale * _GX_objscale;
|
||||
#declare galaxy_distance = galaxy_distance * (sqrt(1 + pow(max(_GX_objscale2.x, _GX_objscale2.y), 2)) + .001);
|
||||
#declare _GX_tracelevel = _GX_tracelevel + 1;
|
||||
#declare _GX_objcount = _GX_objcount + 1; #end
|
||||
#ifdef (galaxy_rotate) rotate galaxy_rotate #end
|
||||
#ifdef (galaxy_origin) translate -galaxy_origin #end }
|
||||
global_settings {max_trace_level min(_GX_tracelevel, 30)}
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
|
||||
// LOOP THROUGH FILE TO SELECT CLUSTER OBJECT
|
||||
// ******************************************
|
||||
#end
|
||||
#declare _GX_name = strupr(galaxy_cluster_name)
|
||||
#declare _GX_objscale = galaxy_cluster_scale * <1, 1, 1>;
|
||||
#declare _GX_objloop = _GX_objloop + 1; #end
|
||||
#version _GX_objtempver;
|
|
@ -0,0 +1,75 @@
|
|||
/*************************************************************************
|
||||
GALAXY STARFIELD FILE FOR PERSISTENCE OF VISION 3.x
|
||||
**************************************************************************
|
||||
|
||||
Created by Chris Colefax, 1 February 1998
|
||||
Updated 9 August 1998: updated for POV-Ray 3.1
|
||||
|
||||
See "Galaxy.htm" for more information.
|
||||
|
||||
*************************************************************************/
|
||||
|
||||
// CHECK VARIABLES AND ASSIGN DEFAULTS
|
||||
// ***********************************
|
||||
#declare _SF_tempver = version; #version 3.0;
|
||||
#ifndef (galaxy_seed) #declare galaxy_seed = 0; #end
|
||||
#ifndef (star_count) #declare star_count = 1000; #end
|
||||
#ifndef (star_type) #declare star_type = 1; #end
|
||||
#ifndef (star_scale) #declare star_scale = 1; #end
|
||||
#ifndef (star_spread) #declare star_spread = 1; #end
|
||||
#ifndef (star_distribution) #declare star_distribution = 1; #end
|
||||
#ifndef (star_brightness_turb) #declare star_brightness_turb = .5; #end
|
||||
#ifndef (star_distance) #ifdef (galaxy_distance) #declare star_distance = galaxy_distance * 2;
|
||||
#else #declare star_distance = 2e4; #end #end
|
||||
|
||||
#ifdef (star_colour) #declare _SF_colour = star_colour * <1, 1, 1>;
|
||||
#else #ifdef (star_color) #declare _SF_colour = star_color * <1, 1, 1>;
|
||||
#else #declare _SF_colour = <.9, .9, .9>; #end #end
|
||||
#ifdef (star_colour_turb) #declare _SF_colourturb = star_colour_turb * <1, 1, 1>;
|
||||
#else #ifdef (star_color_turb) #declare _SF_colourturb = star_color_turb * <1, 1, 1>;
|
||||
#else #ifdef (_GX_colourturb) #declare _SF_colourturb = _GX_colourturb;
|
||||
#else #declare _SF_colourturb = <.2, .2, .2>; #end #end #end
|
||||
|
||||
// SELECT STAR PIGMENT
|
||||
// *******************
|
||||
#switch (star_type)
|
||||
#case (2) #declare _SF_starpigment = pigment {onion color_map {
|
||||
[.3 rgb 1] [.8 rgbt 1] [.9 rgbt <1, 1, 1, .7>] [1 rgbt 1]}
|
||||
scallop_wave scale 2}
|
||||
#declare _SF_starobjscale = .015; #break
|
||||
#case (3) #declare _SF_starpigment = pigment {onion pigment_map {
|
||||
[.1 rgb 1]
|
||||
[.4 average pigment_map {
|
||||
[1 onion color_map {[.04 rgb 3] [.1 rgbt 1]} scale <10, 1, 1>]
|
||||
[1 onion color_map {[.04 rgb 3] [.1 rgbt 1]} scale <10, 1, 1> rotate z * 120]
|
||||
[1 onion color_map {[.04 rgb 3] [.1 rgbt 1]} scale <10, 1, 1> rotate z * 240]}
|
||||
scale .5]}
|
||||
scallop_wave scale 2}
|
||||
#declare _SF_starobjscale = .025; #break
|
||||
#else #declare _SF_starpigment = pigment {onion color_map {
|
||||
[.3 rgb <1, 1, 1>] [1 rgbt <1, 1, 1, 1>]}}
|
||||
#declare _SF_starobjscale = .01; #end
|
||||
|
||||
#declare _SF_starobject = triangle {<-1, -.6, 0>, <0, 1, 0>, <1, -.6, 0>
|
||||
pigment {onion pigment_map {[.25 _SF_starpigment scale .25] [.25 rgbt <1, 1, 1, 1>]} scale 2}
|
||||
finish {ambient 1 diffuse 0 reflection 0 phong 0 specular 0 crand 0}
|
||||
scale star_scale * _SF_starobjscale}
|
||||
|
||||
// CREATE STAR FIELD
|
||||
// *****************
|
||||
#declare _SF_rand = seed(galaxy_seed);
|
||||
#declare _SF_stars = union { #declare _SF_count = 0; #while (_SF_count < 50)
|
||||
object {_SF_starobject
|
||||
finish {ambient _SF_colour * (1 + (rand(_SF_rand) - .5) * star_brightness_turb * 2) * (1 + <rand(_SF_rand), rand(_SF_rand), rand(_SF_rand)> * _SF_colourturb)}
|
||||
translate z * (1 + pow(rand(_SF_rand), star_distribution) * star_spread)
|
||||
rotate <rand(_SF_rand), rand(_SF_rand), 0> * 360}
|
||||
#declare _SF_count = _SF_count + 1; #end }
|
||||
|
||||
union { #declare _SF_count = 0; #while (_SF_count < star_count / 50)
|
||||
object {_SF_stars rotate <rand(_SF_rand), rand(_SF_rand), 0> * 360}
|
||||
#declare _SF_count = _SF_count + 1; #end
|
||||
no_shadow hollow scale star_distance
|
||||
#ifdef (galaxy_rotate) rotate galaxy_rotate #end
|
||||
#ifdef (galaxy_origin) translate -galaxy_origin #end }
|
||||
|
||||
#version _SF_tempver;
|
|
@ -0,0 +1,865 @@
|
|||
<HTML><HEAD><TITLE>Galaxy Include File</TITLE></HEAD>
|
||||
|
||||
<FONT FACE="Arial, Helvetica, Switzerland"><BODY BGCOLOR=#FFFFFF>
|
||||
|
||||
<TABLE WIDTH=100% BORDER=0 CELLPADDING=10><TR><TD BGCOLOR=#C0C0C0 ALIGN=CENTER>
|
||||
<FONT SIZE=+2><B>GALAXY INCLUDE FILE </B></FONT><FONT SIZE=+1><I>for Persistence of Vision 3.x</I></FONT>
|
||||
</TD></TR></TABLE>
|
||||
|
||||
<I>
|
||||
<P>Created by Chris Colefax, 1 February 1998
|
||||
<BR>Updated 9 August 1998: updated for POV-Ray 3.1
|
||||
</I>
|
||||
|
||||
<P><HR>
|
||||
|
||||
<P><B><I><A HREF="#Installation">INSTALLATION</A></B></I>
|
||||
<P><B><I><A HREF="#Quick Start">QUICK START</A></B></I>
|
||||
<P><B><I><A HREF="#Galaxy Files">UNDERSTANDING THE DIFFERENT GALAXY.* FILES</A></B></I>
|
||||
<P><B><I><A HREF="#Options">GALAXY OPTIONS</A></B></I>
|
||||
<UL><I><A HREF="#INC Options">GALAXY INCLUDE FILE OPTIONS</A></I>
|
||||
<UL><A HREF="#galaxy_seed">galaxy_seed</A>
|
||||
<BR><A HREF="#galaxy_colour">galaxy_colour</A>
|
||||
<BR><A HREF="#galaxy_colouration">galaxy_colouration</A>
|
||||
<BR><A HREF="#galaxy_colour_turb">galaxy_colour_turb</A>
|
||||
<BR><A HREF="#galaxy_intensity">galaxy_intensity</A>
|
||||
<BR><A HREF="#galaxy_rotate">galaxy_rotate</A>
|
||||
<BR><A HREF="#galaxy_distance">galaxy_distance</A>
|
||||
<BR><A HREF="#galaxy_origin">galaxy_origin</A>
|
||||
<BR><A HREF="#galaxy_bg">galaxy_bg</A>
|
||||
<BR><A HREF="#galaxy_objects">galaxy_objects</A>
|
||||
<BR><A HREF="#galaxy_starfield">galaxy_starfield</A>
|
||||
<BR><A HREF="#options_only">options_only</A>
|
||||
<BR><A HREF="#debug_options">debug_options</A>
|
||||
</UL>
|
||||
|
||||
<BR><I><A HREF="#BG Options">GALAXY BACKGROUNDS FILE OPTIONS</A></I>
|
||||
<UL><A HREF="#galaxy_bgstars">galaxy_bgstars</A>
|
||||
<BR><A HREF="#galaxy_bgnebula">galaxy_bgnebula</A>
|
||||
<BR><A HREF="#galaxy_nebula_sphere">galaxy_nebula_sphere</A>
|
||||
<BR><A HREF="#galaxy_nebula_ambient">galaxy_nebula_ambient</A>
|
||||
<BR><A HREF="#galaxy_colour options">galaxy_colour1, galaxy_colour2, galaxy_colour3</A>
|
||||
<BR><A HREF="#galaxy_star_colouration">galaxy_star_colouration</A>
|
||||
<BR><A HREF="#galaxy_pattern_scale">galaxy_pattern_scale</A>
|
||||
<BR><A HREF="#galaxy_pattern_origin">galaxy_pattern_origin</A>
|
||||
<BR><A HREF="#galaxy_turb_origin">galaxy_turb_origin</A>
|
||||
<BR><A HREF="#galaxy_declare_only">galaxy_declare_only</A>
|
||||
</UL>
|
||||
|
||||
<BR><I><A HREF="#SF Options">GALAXY STARFIELD FILE OPTIONS</A></I>
|
||||
<UL><A HREF="#star_count">star_count</A>
|
||||
<BR><A HREF="#star_colour">star_colour</A>
|
||||
<BR><A HREF="#star_type">star_type</A>
|
||||
<BR><A HREF="#star_scale">star_scale</A>
|
||||
<BR><A HREF="#star_distance">star_distance</A>
|
||||
<BR><A HREF="#star_spread">star_spread</A>
|
||||
<BR><A HREF="#star_distribution">star_distribution</A>
|
||||
<BR><A HREF="#star_colour_turb">star_colour_turb</A>
|
||||
<BR><A HREF="#star_brightness_turb">star_brightness_turb</A>
|
||||
</UL>
|
||||
|
||||
<BR><I><A HREF="#OBJ Options">GALAXY OBJECTS FILE OPTIONS</A></I>
|
||||
<UL><A HREF="#galaxy_object_name">galaxy_object_name</A>
|
||||
<BR><A HREF="#galaxy_object_scale">galaxy_object_scale</A>
|
||||
<BR><A HREF="#galaxy_object_rotate">galaxy_object_rotate</A>
|
||||
<BR><A HREF="#galaxy_object_flatten">galaxy_object_flatten</A>
|
||||
<BR><A HREF="#galaxy_object_position">galaxy_object_position</A>
|
||||
<BR><A HREF="#galaxy_cluster_name">galaxy_cluster_name</A>
|
||||
<BR><A HREF="#galaxy_cluster_objects">galaxy_cluster_objects</A>
|
||||
<BR><A HREF="#galaxy_cluster_scale">galaxy_cluster_scale</A>
|
||||
<BR><A HREF="#galaxy_cluster_rotate">galaxy_cluster_rotate</A>
|
||||
<BR><A HREF="#galaxy_cluster_spread">galaxy_cluster_spread</A>
|
||||
<BR><A HREF="#galaxy_scale_turb">galaxy_scale_turb</A>
|
||||
<BR><A HREF="#galaxy_rotate_turb">galaxy_rotate_turb</A>
|
||||
<BR><A HREF="#galaxy_declare_only">galaxy_declare_only</A>
|
||||
</UL>
|
||||
</UL>
|
||||
<P><B><I><A HREF="#Troubleshooting">TROUBLESHOOTING</A></B></I>
|
||||
<P><B><I><A HREF="#Legal">COPYRIGHT AND LEGAL INFORMATION</A></B></I>
|
||||
<P><B><I><A HREF="#Contact">CONTACTING THE AUTHOR</A></B></I>
|
||||
|
||||
<P>
|
||||
<BR>
|
||||
<A NAME="Installation"></A><TABLE WIDTH=100% BORDER=0 CELLPADDING=7><TR><TD BGCOLOR=#C0C0C0>
|
||||
<FONT SIZE=+1><B><I>INSTALLATION</B></I></FONT>
|
||||
</TD></TR></TABLE>
|
||||
The Galaxy Include File package consists of four files (<I>Galaxy.inc,
|
||||
Galaxy.bg, Galaxy.obj</I> and <I>Galaxy.sf</I>) 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 <I>INCLUDE</I> sub-directory of the directory where you installed
|
||||
POV-Ray, so if you installed POV-Ray in <I>C:\POVRAY</I> you should copy the files
|
||||
to <I>C:\POVRAY\INCLUDE</I>. On a Windows 95 system, this is probably something
|
||||
like:
|
||||
|
||||
<P><I>C:\Program Files\POV-Ray for Windows\Include</I>
|
||||
|
||||
<P>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.
|
||||
|
||||
|
||||
<P>
|
||||
<BR>
|
||||
<A NAME="Quick Start"></A><TABLE WIDTH=100% BORDER=0 CELLPADDING=7><TR><TD BGCOLOR=#C0C0C0>
|
||||
<FONT SIZE=+1><B><I>QUICK START</B></I></FONT>
|
||||
</TD></TR></TABLE>
|
||||
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:
|
||||
|
||||
<P><CODE>#declare galaxy_seed = 123456789;
|
||||
<BR>#include "GALAXY.INC"</CODE>
|
||||
|
||||
<P>You can choose any positive or negative integer you like for the
|
||||
<A HREF="#galaxy_seed">galaxy_seed</A> value. When you render this scene, the Galaxy Include File
|
||||
will select random options, and then use <I>Galaxy.bg, Galaxy.obj,</I> and
|
||||
<I>Galaxy.sf</I> 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,
|
||||
<I>before</I> including <I>Galaxy.inc</I>:
|
||||
|
||||
<P><CODE>#declare </CODE><I>[variable-name]</I><CODE> = </CODE><I>[value]</I>
|
||||
|
||||
<P>substituting the desired variable name and value where appropriate.
|
||||
Note that <I>Galaxy.inc</I> (or any of the <I>Galaxy.*</I> files) should <B>never</B> be
|
||||
included at the start of a scene (like <I>colors.inc</I> or <I>textures.inc</I>).
|
||||
They should only be included after declaring the desired galaxy options.
|
||||
|
||||
<P>As well as creating random galaxy scenes using <I>Galaxy.inc</I>, you can use
|
||||
<I>Galaxy.bg, Galaxy.obj</I>, and/or <I>Galaxy.sf</I> separately to build custom galaxy
|
||||
scenes piece by piece. You can include any of the four <I>Galaxy.*</I> files as
|
||||
many times as you want in a single POV-Ray scene, declaring separate options
|
||||
for each <I>Galaxy.*</I> inclusion. Note that you don't have to redeclare any
|
||||
options that are common to any or all of the <I>Galaxy.*</I> files, eg:
|
||||
|
||||
<P><CODE>// COMMON GALAXY OPTIONS
|
||||
<BR>#declare galaxy_colour1 = < 1.3, 1.2, .8> ;
|
||||
<BR>#declare galaxy_colour2 = < 1, .5, .3 > ;
|
||||
<BR>#declare galaxy_rotate = < 90, 180, 0> ;
|
||||
|
||||
<P>// GALAXY BACKGROUND
|
||||
<BR>#declare galaxy_bgstars = 4;
|
||||
<BR>#declare galaxy_bgnebula = off;
|
||||
<BR>#declare galaxy_nebula_sphere = 5;
|
||||
<BR>#include "GALAXY.BG"
|
||||
|
||||
<P>// GALAXY OBJECTS
|
||||
<BR>#declare galaxy_object_name = "Nebula3"
|
||||
<BR>#declare galaxy_cluster_name = "Star4"
|
||||
<BR>#include "GALAXY.OBJ"
|
||||
|
||||
<BR>#declare galaxy_object_name = "Comet2"
|
||||
<BR>#declare galaxy_cluster_name = ""
|
||||
<BR>#include "GALAXY.OBJ"</CODE>
|
||||
|
||||
<P>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 <I>Galaxy.*</I> files.
|
||||
|
||||
|
||||
<P>
|
||||
<BR>
|
||||
<A NAME="Galaxy Files"></A><TABLE WIDTH=100% BORDER=0 CELLPADDING=7><TR><TD BGCOLOR=#C0C0C0>
|
||||
<FONT SIZE=+1><B><I>UNDERSTANDING THE DIFFERENT GALAXY.* FILES</B></I></FONT>
|
||||
</TD></TR></TABLE>
|
||||
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:
|
||||
|
||||
<P>The Galaxy Backgrounds File (<I>GALAXY.BG</I>): 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 <I>Galaxy.bg</I> 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.
|
||||
|
||||
<P>The Galaxy Starfield File (<I>GALAXY.SF</I>): 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. <I>Galaxy.sf</I>
|
||||
can create three different types of stars, and can be used in conjunction
|
||||
with <I>Galaxy.bg</I> to create stars larger than one pixel in size.
|
||||
|
||||
<P>The Galaxy Objects File (<I>GALAXY.OBJ</I>): 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).
|
||||
|
||||
<P>The Galaxy Include File (<I>GALAXY.INC</I>): this include file uses the above three
|
||||
files to create random galaxy scenes. <I>Galaxy.inc</I> 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 <I>Galaxy.*</I> files.
|
||||
|
||||
|
||||
<P>
|
||||
<BR>
|
||||
<A NAME="Options"></A><TABLE WIDTH=100% BORDER=0 CELLPADDING=7><TR><TD BGCOLOR=#C0C0C0>
|
||||
<FONT SIZE=+1><B><I>GALAXY OPTIONS</B></I></FONT>
|
||||
</TD></TR></TABLE>
|
||||
This section explains the various options that can be used with <I>Galaxy.inc</I>,
|
||||
as well as the options that can be used separately with <I>Galaxy.bg,
|
||||
Galaxy.obj</I>, and <I>Galaxy.sf</I>.
|
||||
|
||||
<P>Note that the Galaxy Include File package supports both British and
|
||||
American English, eg: <I>galaxy_colour</I> and <I>galaxy_color</I> are interchangeable,
|
||||
as are <I>galaxy_colouration</I> and <I>galaxy_coloration</I>, etc.
|
||||
|
||||
|
||||
<P><HR><A NAME="INC Options"></A>
|
||||
<B>GALAXY INCLUDE FILE OPTIONS</B>
|
||||
<HR>
|
||||
The options in this section apply to <I>Galaxy.inc</I>.
|
||||
|
||||
<P><A NAME="galaxy_seed"></A>
|
||||
<B>galaxy_seed</B>
|
||||
<HR>
|
||||
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 <I>galaxy_seed</I> value is 0. Each time you include
|
||||
<I>Galaxy.inc</I>, a new <I>galaxy_seed</I> value is chosen at random. To find out the
|
||||
new value, see <A HREF="#debug_options">debug_options</A>.
|
||||
|
||||
<P><A NAME="galaxy_colour"></A>
|
||||
<B>galaxy_colour</B>
|
||||
<HR>
|
||||
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 <I>galaxy_colour</I> 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.
|
||||
<BR>The default <I>galaxy_colour</I> value is < 1, 1, 1> (which has no effect).
|
||||
|
||||
<P><A NAME="galaxy_colouration"></A>
|
||||
<B>galaxy_colouration</B>
|
||||
<HR>
|
||||
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
|
||||
<A HREF="#galaxy_colour">galaxy_colour</A> option has more of an effect.
|
||||
<BR>The default <I>galaxy_colouration</I> value is 0.5
|
||||
|
||||
<P><A NAME="galaxy_colour_turb"></A>
|
||||
<B>galaxy_colour_turb</B>
|
||||
<HR>
|
||||
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 <I>galaxy_colour_turb</I> value is 0.2
|
||||
|
||||
<P><A NAME="galaxy_intensity"></A>
|
||||
<B>galaxy_intensity</B>
|
||||
<HR>
|
||||
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).
|
||||
<BR>The default <I>galaxy_intensity</I> value is 1
|
||||
|
||||
<P><A NAME="galaxy_rotate"></A>
|
||||
<B>galaxy_rotate</B>
|
||||
<HR>
|
||||
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 <I>galaxy_rotate</I> value is < 0, 0, 0>
|
||||
|
||||
<P><A NAME="galaxy_distance"></A>
|
||||
<B>galaxy_distance</B>
|
||||
<HR>
|
||||
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.
|
||||
|
||||
<P><A NAME="galaxy_origin"></A>
|
||||
<B>galaxy_origin</B>
|
||||
<HR>
|
||||
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.
|
||||
|
||||
<P><A NAME="galaxy_bg"></A>
|
||||
<B>galaxy_bg</B>
|
||||
<HR>
|
||||
Use this option to disable the elements of the galaxy scene created by the
|
||||
Galaxy Backgrounds File (<I>Galaxy.bg</I>). 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 <A HREF="#BG Options">Background File Options</A>.
|
||||
|
||||
<P><A NAME="galaxy_objects"></A>
|
||||
<B>galaxy_objects</B>
|
||||
<HR>
|
||||
Use this option to disable the elements of the galaxy scene created by the
|
||||
Galaxy Objects File (<I>Galaxy.obj</I>). 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 <I>Galaxy.inc</I>; if you wish to include <I>Galaxy.inc</I> a
|
||||
second time (or third, fourth, etc.) and have it automatically create galaxy
|
||||
objects, you must manually set <I>galaxy_objects</I> to true before including
|
||||
<I>Galaxy.inc</I>.
|
||||
|
||||
<P><A NAME="galaxy_starfield"></A>
|
||||
<B>galaxy_starfield</B>
|
||||
<HR>
|
||||
Use this option to remove the starfield objects in a galaxy scene created by
|
||||
the Galaxy Starfield File (<I>Galaxy.sf</I>). Note that this option is always
|
||||
set to false after including <I>Galaxy.inc</I>; if you wish <I>Galaxy.inc</I> to
|
||||
automatically create another starfield, you must manually set
|
||||
<I>galaxy_starfield</I> to true before including <I>Galaxy.inc</I>.
|
||||
|
||||
<P><A NAME="options_only"></A>
|
||||
<B>options_only</B>
|
||||
<HR>
|
||||
Setting this option to true will cause <I>Galaxy.inc</I> to declare all the options
|
||||
it uses for <I>Galaxy.bg, Galaxy.obj</I>, and <I>Galaxy.sf</I>, 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 <I>Galaxy.*</I> files,
|
||||
eg. say you have discovered you like the galaxy produced by using 7362512
|
||||
as the <A HREF="#galaxy_seed">galaxy_seed</A> value, but you want to change the galaxy object used:
|
||||
|
||||
<P><CODE>#declare galaxy_seed = 7362512;
|
||||
<BR>#declare options_only = true;
|
||||
<BR>#include "GALAXY.INC"
|
||||
|
||||
<BR>#declare galaxy_object = "Galaxy2"
|
||||
<BR>#include "GALAXY.OBJ"
|
||||
<BR>#include "GALAXY.BG"
|
||||
<BR>#include "GALAXY.SF"</CODE>
|
||||
|
||||
<P>Note that setting <I>options_only</I> to true is the same as setting <A HREF="#galaxy_bg">galaxy_bg</A>,
|
||||
<A HREF="#galaxy_objects">galaxy_objects</A>, and <A HREF="#galaxy_starfield">galaxy_starfield</A> to false.
|
||||
|
||||
<P><A NAME="debug_options"></A>
|
||||
<B>debug_options</B>
|
||||
<HR>
|
||||
Setting this option to true will cause <I>Galaxy.inc</I> 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 <I>Galaxy.bg, Galaxy.obj</I>,
|
||||
and/or <I>Galaxy.sf</I> (see the <I>Rand.pov</I> and <I>Rand.ini</I> files for an example of how
|
||||
this option can be used).
|
||||
|
||||
|
||||
<P><HR><A NAME="BG Options"></A>
|
||||
<B>GALAXY BACKGROUNDS FILE OPTIONS</B>
|
||||
<HR>
|
||||
The options in this section apply to <I>Galaxy.bg</I>. In addition to the
|
||||
options below, the Galaxy Backgrounds File supports the <A HREF="#galaxy_intensity">galaxy_intensity</A>,
|
||||
<A HREF="#galaxy_rotate">galaxy_rotate</A>, <A HREF="#galaxy_distance">galaxy_distance</A>, and <A HREF="#galaxy_origin">galaxy_origin</A> options, as detailed above.
|
||||
|
||||
<P><A NAME="galaxy_bgstars"></A>
|
||||
<B>galaxy_bgstars</B>
|
||||
<HR>
|
||||
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 <I>galaxy_bgstars</I> value is 2
|
||||
|
||||
<P><A NAME="galaxy_bgnebula"></A>
|
||||
<B>galaxy_bgnebula</B>
|
||||
<HR>
|
||||
This option specifies the type of nebula pigment mapped to the sky_sphere.
|
||||
Possible values are:
|
||||
|
||||
<UL>1 - Default nebula
|
||||
<BR>2 - Light reflection nebula
|
||||
<BR>3 - Nebula criss-crossed by dark gas lanes
|
||||
<BR>4 - Spidery nebula
|
||||
<BR>5 - Dense reflection nebula
|
||||
<BR>6 - Milky Way pattern
|
||||
</UL>
|
||||
|
||||
<P>Values 1 to 5 correspond roughly with the nebulae created by <I>Galaxy.obj</I>
|
||||
(see <A HREF="#galaxy_object_name">galaxy_object_name</A>). If you don't want a background nebula, set this option
|
||||
to false. The default <I>galaxy_bgnebula</I> value is 6
|
||||
|
||||
<P><A NAME="galaxy_nebula_sphere"></A>
|
||||
<B>galaxy_nebula_sphere</B>
|
||||
<HR>
|
||||
Use this option to create a large sphere (the radius is specified by the
|
||||
<A HREF="#galaxy_distance">galaxy_distance</A> option) mapped with a nebula pigment. Possible values are
|
||||
1 to 5, corresponding to the <A HREF="#galaxy_bgnebula">galaxy_bgnebula</A> option. If you don't want a
|
||||
nebula sphere, set this value to false.
|
||||
<BR>The default <I>galaxy_nebula_sphere</I> value is 1
|
||||
|
||||
<P><A NAME="galaxy_nebula_ambient"></A>
|
||||
<B>galaxy_nebula_ambient</B>
|
||||
<HR>
|
||||
Use this option to change the ambient light value of the nebula sphere.
|
||||
The default <I>galaxy_nebula_ambient</I> value is < 1, 1, 1>
|
||||
|
||||
<P><A NAME="galaxy_colour options"></A>
|
||||
<B>galaxy_colour1, galaxy_colour2, galaxy_colour3</B>
|
||||
<HR>
|
||||
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
|
||||
<I>galaxy_colour1</I> and <I>galaxy_colour2</I>. Finally, to add another colour to
|
||||
the galaxy pigments declare all three galaxy_colour options.
|
||||
<BR>The default <I>galaxy_colour1</I> value is < 1, 1, 1> (White).
|
||||
|
||||
<P><A NAME="galaxy_star_colouration"></A>
|
||||
<B>galaxy_star_colouration</B>
|
||||
<HR>
|
||||
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.
|
||||
<BR>The default <I>galaxy_star_colouration</I> value is 0.2
|
||||
|
||||
<P><A NAME="galaxy_pattern_scale"></A>
|
||||
<B>galaxy_pattern_scale</B>
|
||||
<HR>
|
||||
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 <I>galaxy_pattern_scale</I> value is 1
|
||||
|
||||
<P><A NAME="galaxy_pattern_origin"></A>
|
||||
<B>galaxy_pattern_origin</B>
|
||||
<HR>
|
||||
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.
|
||||
<BR>The default <I>galaxy_pattern_origin</I> is < 0, 0, 0>
|
||||
|
||||
<P><A NAME="galaxy_turb_origin"></A>
|
||||
<B>galaxy_turb_origin</B>
|
||||
<HR>
|
||||
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.
|
||||
<BR>The default <I>galaxy_turb_origin</I> is < 0, 0, 0>
|
||||
|
||||
<P><A NAME="galaxy_declare_only"></A>
|
||||
<B>galaxy_declare_only</B>
|
||||
<HR>
|
||||
Setting this option to true stops <I>Galaxy.bg</I> 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:
|
||||
|
||||
<P><CODE>#declare galaxy_declare_only = true;
|
||||
<BR>#include "GALAXY.BG"
|
||||
|
||||
<P>sky_sphere {
|
||||
<BR>pigment {BGStars3}
|
||||
<BR>pigment {BGMilkyWay rotate z * 45}
|
||||
<BR>pigment {BGNebula5 scale 2}
|
||||
<BR>pigment {BGNebula1 rotate < 60, 50, 0>}}
|
||||
|
||||
<P>box {< -1, -1, -1>, < 1, 1, 1>
|
||||
<BR>pigment {BGStars6} finish {phong .5}}</CODE>
|
||||
|
||||
<P>Note that setting <I>galaxy_declare_only</I> to true is the same as setting
|
||||
<A HREF="#galaxy_bgstars">galaxy_bgstars</A>, <A HREF="#galaxy_bgnebula">galaxy_bgnebula</A>, and <A HREF="#galaxy_nebula_sphere">galaxy_nebula_sphere</A> to false.
|
||||
|
||||
|
||||
<P><HR><A NAME="SF Options"></A>
|
||||
<B>GALAXY STARFIELD FILE OPTIONS</B>
|
||||
<HR>
|
||||
The options in this section apply to <I>Galaxy.sf</I>. In addition to the
|
||||
options below, the Galaxy Starfield File supports the <A HREF="#galaxy_seed">galaxy_seed</A>,
|
||||
<A HREF="#galaxy_rotate">galaxy_rotate</A>, and <A HREF="#galaxy_origin">galaxy_origin</A> options, as detailed above.
|
||||
|
||||
<P><A NAME="star_count"></A>
|
||||
<B>star_count</B>
|
||||
<HR>
|
||||
This option sets the number of star objects created. The larger the number,
|
||||
the longer the parsing time and memory required.
|
||||
The default <I>star_count</I> value is 1000
|
||||
|
||||
<P><A NAME="star_colour"></A>
|
||||
<B>star_colour</B>
|
||||
<HR>
|
||||
This option sets the RGB colour value of the stars.
|
||||
The default star_colour value is < 0.9, 0.9, 0.9>
|
||||
|
||||
<P><A NAME="star_type"></A>
|
||||
<B>star_type</B>
|
||||
<HR>
|
||||
This option selects the pigment used on each star object. Possible
|
||||
values are:
|
||||
|
||||
<UL>1 - Plain circular star (default)
|
||||
<BR>2 - Circular star with halo
|
||||
<BR>3 - Circular star with six evenly spaced rays
|
||||
</UL>
|
||||
|
||||
<P><A NAME="star_scale"></A>
|
||||
<B>star_scale</B>
|
||||
<HR>
|
||||
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 <I>star_scale</I> value is 1
|
||||
|
||||
<P><A NAME="star_distance"></A>
|
||||
<B>star_distance</B>
|
||||
<HR>
|
||||
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.
|
||||
|
||||
<P><A NAME="star_spread"></A>
|
||||
<B>star_spread</B>
|
||||
<HR>
|
||||
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 <A HREF="#star_distance">star_distance</A>, 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.
|
||||
|
||||
<P><A NAME="star_distribution"></A>
|
||||
<B>star_distribution</B>
|
||||
<HR>
|
||||
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.
|
||||
|
||||
<P><A NAME="star_colour_turb"></A>
|
||||
<B>star_colour_turb</B>
|
||||
<HR>
|
||||
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 <I>star_colour_turb</I> value is 0.2
|
||||
|
||||
<P><A NAME="star_brightness_turb"></A>
|
||||
<B>star_brightness_turb</B>
|
||||
<HR>
|
||||
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 <I>star_brightness_turb</I> value is 0.5
|
||||
|
||||
|
||||
<P><HR><A NAME="OBJ Options"></A>
|
||||
<B>GALAXY OBJECTS FILE OPTIONS</B>
|
||||
<HR>
|
||||
The options in this section apply to <I>Galaxy.obj</I>. In addition to the
|
||||
options below, the Galaxy Objects File supports the following options
|
||||
detailed above:
|
||||
|
||||
<UL><A HREF="#galaxy_seed">galaxy_seed</A>, <A HREF="#galaxy_colour_turb">galaxy_colour_turb</A>, <A HREF="#galaxy_intensity">galaxy_intensity</A>,
|
||||
<A HREF="#galaxy_rotate">galaxy_rotate</A>, <A HREF="#galaxy_distance">galaxy_distance</A>, <A HREF="#galaxy_origin">galaxy_origin</A>
|
||||
<A HREF="#galaxy_colour options">galaxy_colour1, galaxy_colour2, galaxy_colour3</A>, <A HREF="#galaxy_star_colouration">galaxy_star_colouration</A>,
|
||||
<A HREF="#galaxy_pattern_scale">galaxy_pattern_scale</A>, <A HREF="#galaxy_pattern_origin">galaxy_pattern_origin</A>, <A HREF="#galaxy_turb_origin">galaxy_turb_origin</A>
|
||||
</UL>
|
||||
|
||||
|
||||
<P><A NAME="galaxy_object_name"></A>
|
||||
<B>galaxy_object_name</B>
|
||||
<HR>
|
||||
Use this option to select which galaxy object you wish to use. Possible
|
||||
values are (the case of the strings is not important):
|
||||
|
||||
<UL>Star1, Star2, Star3, Star4
|
||||
<BR>Nebula1, Nebula2, Nebula3, Nebula4, Nebula5, Nebula6
|
||||
<BR>Galaxy1, Galaxy2, Galaxy3, Galaxy4, Galaxy5
|
||||
<BR>Comet1, Comet2, Comet3
|
||||
<BR>Meteor1, Meteor2
|
||||
</UL>
|
||||
|
||||
<P>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 <I>galaxy_object_name</I> is Nebula1
|
||||
|
||||
<P><A NAME="galaxy_object_scale"></A>
|
||||
<B>galaxy_object_scale</B>
|
||||
<HR>
|
||||
Use this option to increase of decrease the size of the galaxy object.
|
||||
The default <I>galaxy_object_scale</I> value is 1
|
||||
|
||||
<P><A NAME="galaxy_object_rotate"></A>
|
||||
<B>galaxy_object_rotate</B>
|
||||
<HR>
|
||||
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 <I>galaxy_object_rotate</I> value is 0
|
||||
|
||||
<P><A NAME="galaxy_object_flatten"></A>
|
||||
<B>galaxy_object_flatten</B>
|
||||
<HR>
|
||||
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 <I>galaxy_object_flatten</I> value is 0.2
|
||||
|
||||
<P><A NAME="galaxy_object_position"></A>
|
||||
<B>galaxy_object_position</B>
|
||||
<HR>
|
||||
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 <I>galaxy_object_position</I> value to place
|
||||
the galaxy object and cluster objects anywhere in the sky.
|
||||
|
||||
<P><A NAME="galaxy_cluster_name"></A>
|
||||
<B>galaxy_cluster_name</B>
|
||||
<HR>
|
||||
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 <A HREF="#galaxy_object_name">galaxy_object_name</A> option. If you don't want to create
|
||||
a cluster of objects, set this option to an empty string.
|
||||
The default <I>galaxy_cluster_name</I> is Star1
|
||||
|
||||
<P><A NAME="galaxy_cluster_objects"></A>
|
||||
<B>galaxy_cluster_objects</B>
|
||||
<HR>
|
||||
Use this option to set the number of objects you want to create in the
|
||||
cluster. The default <I>galaxy_cluster_objects</I> value is 6
|
||||
|
||||
<P><A NAME="galaxy_cluster_scale"></A>
|
||||
<B>galaxy_cluster_scale</B>
|
||||
<HR>
|
||||
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
|
||||
<I>galaxy_cluster_scale</I> value is half of the <A HREF="#galaxy_object_scale">galaxy_object_scale</A> value.
|
||||
|
||||
<P><A NAME="galaxy_cluster_rotate"></A>
|
||||
<B>galaxy_cluster_rotate</B>
|
||||
<HR>
|
||||
Use this option to rotate each individual object in the cluster (not the
|
||||
cluster as a whole). The default <I>galaxy_cluster_rotate</I> value is the same
|
||||
as the <A HREF="#galaxy_object_rotate">galaxy_object_rotate</A> value.
|
||||
|
||||
<P><A NAME="galaxy_cluster_spread"></A>
|
||||
<B>galaxy_cluster_spread</B>
|
||||
<HR>
|
||||
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 <I>galaxy_cluster_spread</I> value is 15 degrees.
|
||||
|
||||
<P><A NAME="galaxy_scale_turb"></A>
|
||||
<B>galaxy_scale_turb</B>
|
||||
<HR>
|
||||
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 <I>galaxy_scale_turb</I> value is 0.5
|
||||
|
||||
<P><A NAME="galaxy_rotate_turb"></A>
|
||||
<B>galaxy_rotate_turb</B>
|
||||
<HR>
|
||||
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 <I>galaxy_rotate_turb</I> value is 0
|
||||
|
||||
<P><A NAME="galaxy_declare_only"></A>
|
||||
<B>galaxy_declare_only</B>
|
||||
<HR>
|
||||
Setting this option to true stops <I>Galaxy.obj</I> from actually creating the
|
||||
galaxy object and cluster objects. Instead, these objects are declared
|
||||
(as <CODE>galaxy_object</CODE> and <CODE>galaxy_cluster_object</CODE> 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.
|
||||
|
||||
|
||||
<P>
|
||||
<BR>
|
||||
<A NAME="Troubleshooting"></A><TABLE WIDTH=100% BORDER=0 CELLPADDING=7><TR><TD BGCOLOR=#C0C0C0>
|
||||
<FONT SIZE=+1><B><I>TROUBLESHOOTING</B></I></FONT>
|
||||
</TD></TR></TABLE>
|
||||
This section contains some common problems you might encounter while using
|
||||
the Galaxy Include File package, and instructions on how to fix these
|
||||
problems.
|
||||
|
||||
<P><HR>
|
||||
<B>Q) POV-Ray crashes when I try to render my galaxy scene?</B>
|
||||
<BR>A: This may be caused by objects being larger than POV-Ray's allowed limit.
|
||||
To make the objects smaller, try decreasing the <A HREF="#galaxy_distance">galaxy_distance</A> value
|
||||
(the default is 10000), and also the <A HREF="#star_distance">star_distance</A> value if you have
|
||||
declared this separately. If reducing this value doesn't help, try
|
||||
reducing the <I>max_trace_level</I> of your scene; the Galaxy Include File
|
||||
automatically increases the value for each object it creates, so add
|
||||
the line:
|
||||
|
||||
<P><CODE>global_settings {max_trace_level 10}</CODE>
|
||||
|
||||
<P><B>after</B> including any of the <I>Galaxy.*</I> files.
|
||||
|
||||
<P><HR>
|
||||
<B>Q) POV-Ray crashes before even starting to render my galaxy scene?</B>
|
||||
<BR>A: This is probably caused by a lack of memory; try decreasing your
|
||||
<A HREF="#star_count">star_count</A> value, or your <A HREF="#galaxy_cluster_objects">galaxy_cluster_objects</A> 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.
|
||||
|
||||
<P><HR>
|
||||
<B>Q) POV-Ray renders my galaxy scene, but it is very slow?</B>
|
||||
<BR>A: This is probably caused by very large objects; try reducing the
|
||||
<A HREF="#galaxy_distance">galaxy_distance</A> and/or <A HREF="#star_distance">star_distance</A> 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.
|
||||
|
||||
<P><HR>
|
||||
<B>Q) I have created an animation using the Galaxy Include File, but the
|
||||
stars seems to flicker annoyingly?</B>
|
||||
<BR>A: This is caused by using background stars (mapped to the sky_sphere)
|
||||
which are only suitable for still scenes. Try setting the
|
||||
<A HREF="#galaxy_sky_sphere">galaxy_sky_sphere</A> option to false <B>before</B> including the <I>Galaxy.*</I> files
|
||||
to remove the problem.
|
||||
|
||||
<P><HR>
|
||||
<B>Q) I am using the <I>galaxy_pattern_origin</I> and/or <I>galaxy_turb_origin</I> options,
|
||||
and there are some strange artefacts in my galaxy scene?</B>
|
||||
<BR>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 <A HREF="#galaxy_pattern_origin">galaxy_pattern_origin</A> and <A HREF="#galaxy_turb_origin">galaxy_turb_origin</A> options.
|
||||
|
||||
<P><HR>
|
||||
<B>Q) I have tried declaring some of the options, but nothing changes?</B>
|
||||
<BR>A: Make sure that you have declared all the desired options <B>before</B>
|
||||
including any of the <I>Galaxy.*</I> files. The files are not designed
|
||||
to be included once at the beginning of a scene.
|
||||
|
||||
<P><HR>
|
||||
<B>Q) How can I use the Galaxy Include File with Moray (or another modeller)?</B>
|
||||
<BR>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
|
||||
<I>Galaxy.*</I> 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:
|
||||
|
||||
<P><CODE>#declare galaxy_distance = < -1, 1, 1> * 10000;
|
||||
<BR>#declare galaxy_rotate = < -90, 180, 0> ;</CODE>
|
||||
|
||||
<P><HR>
|
||||
<B>Q) I want to fly around a galaxy I have created, but this doesn't seem possible?</B>
|
||||
<BR>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 <A HREF="#galaxy_declare_only">galaxy_declare_only</A> option to create the <CODE>galaxy_object</CODE>, eg:
|
||||
|
||||
<P><CODE>#declare galaxy_colour1 = < 1.3, 1.2, .9> ;
|
||||
<BR>#declare galaxy_colour2 = < .4, .8, 1> ;
|
||||
<BR>#declare galaxy_cluster_name = ""
|
||||
|
||||
<P>#declare galaxy_object_name = "Galaxy3"
|
||||
<BR>#declare galaxy_object_flatten = 0;
|
||||
<BR>#declare galaxy_declare_only = true;
|
||||
<BR>#include "Galaxy.obj"
|
||||
<BR>object {galaxy_object rotate x * 90 scale 10}
|
||||
|
||||
<P>camera {location < 1, 2, -3> look_at < 0, .5, 0>}</CODE>
|
||||
|
||||
<P><HR>
|
||||
<B>Q) I rendered my galaxy image using anti-aliasing and all the stars disappeared?</B>
|
||||
<BR>A: This is usually the result of using the <I>Galaxy.bg</I> 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 <A HREF="#galaxy_bgstars">galaxy_bgstars</A> 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 <I>Galaxy.sf</I>, 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:
|
||||
|
||||
<P><CODE>#declare star_count = 5000;
|
||||
<BR>#declare star_scale = .5;
|
||||
<BR>#include "Galaxy.sf"</CODE>
|
||||
|
||||
<P><HR>
|
||||
<B>Q) I can't get media to work with the Galaxy Include Files?</B>
|
||||
<BR>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 <A HREF="#galaxy_distance">galaxy_distance</A> 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.
|
||||
|
||||
|
||||
<P>
|
||||
<BR>
|
||||
<A NAME="Legal"></A><TABLE WIDTH=100% BORDER=0 CELLPADDING=7><TR><TD BGCOLOR=#C0C0C0>
|
||||
<FONT SIZE=+1><B><I>COPYRIGHT AND LEGAL INFORMATION</B></I></FONT>
|
||||
</TD></TR></TABLE>
|
||||
The <B>Galaxy Include File package</B>, including <I>Galaxy.inc</I>, <I>Galaxy.bg</I>, <I>Galaxy.obj</I>, <I>Galaxy.sf</I>, all documentation, and
|
||||
associated sample *.POV files are <B>Copyright 1998</B> by <B>Chris Colefax</B>. 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.
|
||||
|
||||
<P>The <B>Galaxy Include File package</B> 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 <B>Galaxy Include File package</B> in this manner or otherwise
|
||||
would first <A HREF="#Contact">contact me</A> to ensure that
|
||||
they are in possession of the latest available version.
|
||||
|
||||
<P>Further, no restrictions of any sort are placed on the usage of the include
|
||||
files themselves (<I>Galaxy.inc, Galaxy.bg, Galaxy.obj</I>, and <I>Galaxy.sf</I>), 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.
|
||||
|
||||
|
||||
<P>
|
||||
<BR>
|
||||
<A NAME="Contact"></A><TABLE WIDTH=100% BORDER=0 CELLPADDING=7><TR><TD BGCOLOR=#C0C0C0>
|
||||
<FONT SIZE=+1><B><I>CONTACTING THE AUTHOR</B></I></FONT>
|
||||
</TD></TR></TABLE>
|
||||
If you wish to contact me with bug reports, bug fixes, criticisms,
|
||||
comments, suggested improvements, questions, etc. you can reach me by
|
||||
email at:
|
||||
|
||||
<P><A HREF="mailto:ccolefax@geocities.com">ccolefax@geocities.com</A>
|
||||
|
||||
<P>or by regular mail at:
|
||||
|
||||
<UL>Chris Colefax
|
||||
<BR>PO Box 110
|
||||
<BR>Kuranda, Queensland
|
||||
<BR>Australia 4872
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<DIV ALIGN=RIGHT><FONT SIZE=-1><I>
|
||||
POV-Ray<FONT SIZE=-2><SUP>TM</SUP></FONT> and Persistence of Vision<FONT SIZE=-2><SUP>TM</SUP></FONT> are registered trademarks of the POV-Ray Team<FONT SIZE=-2><SUP>TM</SUP></FONT>
|
||||
</I></FONT></DIV>
|
||||
|
||||
</BODY></HTML>
|
|
@ -0,0 +1,25 @@
|
|||
; GALAXY INCLUDE FILE: RANDOM GALAXY INI FILE
|
||||
; *******************************************
|
||||
; Use this file to easily render many different (and unique) galaxy scenes.
|
||||
; First, set the Final_Frame option to the number of renderings you want:
|
||||
|
||||
Final_Frame=100
|
||||
|
||||
; Then render Rand.pov using this INI file, plus any other options
|
||||
; you want. To get the options for a particular galaxy, take note of
|
||||
; the frame number and use it to set the following options, eg. if you
|
||||
; wanted to find out the options for RAND057.TGA, use 57 (and make
|
||||
; sure to remove the semicolons):
|
||||
|
||||
;Subset_Start_Frame=57
|
||||
;Subset_End_Frame=57
|
||||
|
||||
; Then remove the semicolon from the following line (and change the file
|
||||
; name if desired):
|
||||
|
||||
;Debug_File=GX_OPTS.INC
|
||||
|
||||
; You can now render Rand.pov using this INI file, and you will get a
|
||||
; file called GX_OPTS.INC (or whatever name you are using) which you
|
||||
; can modify and include directly into your scene, before including
|
||||
; Galaxy.bg, Galaxy.obj, and Galaxy.sf.
|
|
@ -0,0 +1,8 @@
|
|||
// GALAXY INCLUDE FILE: RANDOM GALAXY SCENE FILE
|
||||
// *********************************************
|
||||
// Use this file to easily render many different (and unique) galaxy
|
||||
// scenes. For more information, see Rand.ini
|
||||
|
||||
#declare galaxy_seed = (clock - .5) * 2e5;
|
||||
#declare debug_options = true;
|
||||
#include "GALAXY.INC"
|
|
@ -0,0 +1,25 @@
|
|||
*************************************************
|
||||
GALAXY INCLUDE FILE FOR PERSISTENCE OF VISION 3.x
|
||||
*************************************************
|
||||
|
||||
Included files:
|
||||
|
||||
Galaxy.inc - Galaxy include file for POV-Ray 3.x
|
||||
Galaxy.bg - Galaxy backgrounds file for POV-Ray 3.x
|
||||
Galaxy.obj - Galaxy objects file for POV-Ray 3.x
|
||||
Galaxy.sf - Galaxy starfield file for POV-Ray 3.x
|
||||
Galaxy.htm - Instructions for Galaxy.*
|
||||
Readme.txt - This file
|
||||
|
||||
AllObjs.pov - Samples of all galaxy objects
|
||||
Trifid.pov - Example of custom galaxy scene
|
||||
Rand.pov - Samples of random galaxy scenes
|
||||
Rand.ini - INI file for use with Rand.pov
|
||||
DnmcOpts.pov - Dynamic galaxy options animation
|
||||
|
||||
See Galaxy.htm for full instructions regarding installation, usage,
|
||||
troubleshooting, copyright, legal and contact information, etc.
|
||||
|
||||
All the included *.pov files use Galaxy.inc and/or Galaxy.bg, Galaxy.obj,
|
||||
and Galaxy.sf. Before rendering any of these files, follow the
|
||||
instructions in Galaxy.htm to properly install the include files.
|
|
@ -0,0 +1,45 @@
|
|||
// GALAXY INCLUDE FILE: CUSTOM GALAXY SCENE
|
||||
// ****************************************
|
||||
// This scene shows how Galaxy.obj and Galaxy.sf can be used to build
|
||||
// custom galaxy scenes, piece by piece.
|
||||
//
|
||||
// Recommended resolution: 640 x 480, anti-aliasing on
|
||||
|
||||
// STARFIELD
|
||||
#declare star_count = 2000;
|
||||
#declare star_scale = .5;
|
||||
#include "GALAXY.SF"
|
||||
|
||||
#declare galaxy_seed = 1;
|
||||
#declare star_count = 500;
|
||||
#declare star_type = 3;
|
||||
#declare star_colour = <1, .9, .7>;
|
||||
#declare star_scale = 1.5;
|
||||
#include "GALAXY.SF"
|
||||
|
||||
// PINK NEBULA
|
||||
#declare galaxy_colour1 = <1.2, 1, 1.1>;
|
||||
#declare galaxy_colour2 = <1, .3, .6>;
|
||||
#declare galaxy_pattern_origin = x * 1;
|
||||
#declare galaxy_turb_origin = x * -4;
|
||||
#declare galaxy_object_name = "Nebula3"
|
||||
#declare galaxy_object_scale = 1.75;
|
||||
#declare galaxy_object_position = <-5, 5, 0>;
|
||||
#declare galaxy_cluster_name = ""
|
||||
#include "GALAXY.OBJ"
|
||||
|
||||
// BLUE NEBULA
|
||||
#declare galaxy_colour1 = <.5, .9, 1.2>;
|
||||
#declare galaxy_colour2 = <.1, .3, .5>;
|
||||
#declare galaxy_pattern_origin = x * -20;
|
||||
#declare galaxy_object_name = "Nebula2"
|
||||
#declare galaxy_object_scale = 1.2;
|
||||
#declare galaxy_object_position = <10, -12, 0>;
|
||||
#include "GALAXY.OBJ"
|
||||
|
||||
// LARGE STAR
|
||||
#declare galaxy_object_name = "Star1"
|
||||
#declare galaxy_colour1 = <1.5, 1.5, 1.5>;
|
||||
#declare galaxy_object_scale = 1;
|
||||
#declare galaxy_object_position = <17, -10, 0>;
|
||||
#include "GALAXY.OBJ"
|
Loading…
Reference in New Issue