home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ray Tracing Box
/
RAY_CD.mdf
/
raytrace
/
_pov_dat
/
ntsky
/
nightsky.pov
< prev
next >
Wrap
Text File
|
1994-03-10
|
5KB
|
290 lines
// povray 2.x source file
// nightsky.pov by Norm Bowler
/* Features:
* Awesome night sky w/ stars & milky way. Stars gradually blocked
toward horizon.
* Pretty darn good moon & clouds too. Clouds painted on plane
parallel to ground instead of on sky sphere for improved perspective.
* Maxfield Parrish at night without girls in gauzy dresses.
* Adjustable brightness and alternate declares for "daytime"
*/
////////////////////
// Setup
////////////////////
#include "colors.inc"
#include "textures.inc"
default{
finish{
ambient .2
diffuse .4
}
}
light_source {<800, 100, 00> color White}
camera {
location <0, 4,-20>
direction <0, 0, .9>
up <0, 1, 0>
right <4/3, 0, 0>
look_at <0, 0, 100>
}
/*
// alternate camera position to show closeup of moon (for testing)
camera {
location <0, 4,-20>
direction <0, 0, 7>
up <0, 1, 0>
right <4/3, 0, 0>
look_at <300, 300, 900>
}
*/
////////////////////
// Declares
////////////////////
#declare Br=1 //Brightness constant for color values
/*
//daytime section begins
//alternate light source for more direct light
light_source {<250, 700, -500> color White}
#declare Br=3 //brighter colors
//more light
default{
finish{
ambient .3
diffuse .7
}
}
// daytime section ends
*/
#declare BL1=Br*.35 //blue level for horizon
#declare BL2=Br*.05 //blue level for zenith
// mountain color
#declare TerrainColor= color red Br*.1 blue Br*.2 green Br*.1
////////////////////
// Objects
////////////////////
/*
//test object - give ripples something to reflect.
box {
<-5,0,10>,
<5,10,15>
pigment {color Red}
}
*/
// Sky sphere
sphere { <0, 0, 0>, 1000
//tex 1 : blue
texture {
pigment {gradient y
color_map {
[0 color blue BL1]
[1 color blue BL2]
}
scale 800
}
finish {Luminous}
}
//tex2: Milky Way - comment out for daytime
texture{
pigment {agate
color_map {
[0 color Clear]
[.75 color Clear]
[1 color White filter .93 ]
}
scale <4000,700,4000>
translate <300,700,0>
}
finish {Luminous}
}
//tex3: stars -- comment out for daytime
texture{
pigment {granite
//turbulence 1
color_map {
[0 color Clear]
[.8 color Clear]
[.8 color Gray15]
[.92 color Gray70]
[.92 color red 1 green .8 blue .75]
[1 color red .95 blue 1 green .95]
}
scale 10}
finish {Luminous}
}
//tex 4 : opaque to block low stars
texture {
pigment {gradient y
color_map {
[0 color blue BL1 filter .1]
[.25 color blue BL1-((BL1-BL2)*.25) filter .6]
[.3 color blue BL1-((BL1-BL2)*.3) filter 1]
[.35 color Clear]
[1 color Clear]
}
scale 800
}
finish {Luminous}
}
no_shadow
}
//sea
plane {y 0
pigment {color blue Br*.3 green Br*.1 red Br*.08}
finish {reflection .5}
normal {ripples .1
translate <0, 0, -100>
}
}
//mountains
height_field {
gif
"nisky-mt.gif"
scale <1500, 120, 400>
translate <-750, -30, -200>
rotate <0,20,0>
translate <0,0,250>
pigment {color TerrainColor}
}
//clouds
plane {y 122
pigment {bozo
turbulence .5
color_map {
[0 color Clear]
[.7 color Clear]
[.75 color red Br*.2 green Br*.2 blue Br*.2 filter .6]
[1 color red Br*.05 green Br*.05 blue Br*.05 filter .1]
}
scale <400,30,30>
}
finish {Luminous}
no_shadow
}
//moon
sphere { <300,300,900>, 50
//base color
texture {
pigment { color Quartz}
}
//craters 1
texture {
pigment{leopard
turbulence .3
color_map {
[0 color Clear]
[.55 color Clear]
[.7 color CadetBlue]
[.75 color Clear]
[1 color Clear]
}
scale 6
}
}
//craters 2
texture {
pigment{leopard
turbulence .2
color_map {
[0 color Clear]
[.45 color Clear]
[.7 color CadetBlue]
[.8 color Clear]
[1 color Clear]
}
scale 5
rotate <22,67,9>
translate <51,5,50>
}
}
//craters 3
texture {
pigment{leopard
turbulence .3
color_map {
[0 color Clear]
[.4 color Clear]
[.7 color CadetBlue]
[.75 color Clear]
[1 color Clear]
}
scale 8
translate <32,17,12>
}
}
//craters 4
texture {
pigment{leopard
turbulence .2
color_map {
[0 color Clear]
[.35 color Clear]
[.7 color CadetBlue]
[.75 color Clear]
[1 color Clear]
}
scale 11
rotate <38, 32, 80>
translate <62,17,12>
}
}
}
//raytracing ends -- reality begins