POV-Ray : Newsgroups : povray.newusers : Improved Starfield : Re: Improved Starfield Server Time
30 Jul 2024 02:19:24 EDT (-0400)
  Re: Improved Starfield  
From: Jeff
Date: 9 Nov 2004 22:40:01
Message: <web.41918c8d98c849a8819ea3080@news.povray.org>
All right, that first post showed some inexperience.

Originally, I tried layering PIGMENTS onto ONE big sphere with this
structure: sphere { pigment (StarDots} pigment {StarTints} finish {ambient
1 diffuse 0} }.

That didn't work for a couple of reasons, so I decided that in order for me
to do what I wanted, I had to use a series of nested spheres - as in my
first post in this thread, the outer sphere for the stars, the inner sphere
to tint the stars. This is cumbersome and slows PovRay down. But the last
time I touched a raytracer was PovRay 3.1g, a few years ago. It never
occured to me to layer *textures* onto ONE sphere.

Now I am using ONE big sphere such as : sphere { texture{pigment{StarDots}
finish{ambient 1 diffuse 0}} texture {pigment{StarTints} finish{ambient 0
diffuse 0}} .. texture{OtherTextures} }.

This yields almost exactly the same result, uses less memory and is faster.
On my archaic P166 system, the first method with two spheres took 00:14:23
(863 seconds) for a high-density starfield. Adding MORE semitransparant
inner spheres for additional effects such as obscuration would certainly
increase rendering time significantly. The second method with just one
sphere and two texture layers takes 00:11:10 (670 seconds). AND I found
that adding a third, fourth etc. layer for "special effects" does NOT slow
the render down much.

Also: I tweaked the colors. The first attempt was to provide a "realistic"
distribution of star colors. But I tweaked it to be more esthetically
pleasing.

Here is a version - ONE sphere, four layers - the top two layers provide
magnitude variation/obscuration, AND a glowing band - kind of like the
Milky Way running from upper right to lower left.

// Persistence Of Vision raytracer version 3.6.1
// MilkyWay.pov SCENE file

// ********************************************************************
camera {
    perspective
    location <0.00,0.00,0.00>
    angle 45.00
    look_at  <0.00,0.00,1.00>
}
// ********************************************************************

sphere { <0,0,0>,9900000 hollow no_reflection

 texture {
  pigment { crackle form <1,0,0>
    color_map {
      [0.000 0.200 color rgb <1.00,1.00,1.00> color rgb <1.00,1.00,1.00>]
      [0.200 1.000 color rgb <0.00,0.00,0.00> color rgb <0.00,0.00,0.00>]
       }
     scale 25000
    }
   finish {ambient 1 diffuse 0}
 }

 texture {
  pigment { bozo cubic_wave noise_generator 3
    color_map {
      [0.000 0.450 color rgbf <0.60,0.60,1.00,1.00> color rgbf
<1.00,1.00,1.00,1.00>]
      [0.450 0.550 color rgbf <1.00,1.00,0.60,1.00> color rgbf
<1.00,1.00,1.00,1.00>]
      [0.550 1.000 color rgbf <1.00,0.60,0.60,1.00> color rgbf
<1.00,1.00,1.00,1.00>]
       }
     turbulence 0.9
     scale 50000
    }

  finish {ambient 0 diffuse 0}
 }

 texture {
  pigment { gradient x phase 0.5
    color_map {
      [0.000 0.500 color rgbf <0.30,0.30,0.30,1.00> color rgbf
<1.00,1.00,1.00,1.00>]
      [0.500 1.000 color rgbf <1.00,1.00,1.00,1.00> color rgbf
<0.30,0.30,0.30,1.00>]
       }
     turbulence 0.5
     scale 7000000
     rotate <0,0,-70>
    }
  finish {ambient 0 diffuse 0}
 }

 texture {
  pigment { gradient x phase 0.5
    color_map {
      [0.000 0.400 color rgbf <1.00,1.00,1.00,1.00> color rgbf
<0.80,0.80,1.00,0.10>]
      [0.600 1.000 color rgbf <0.80,0.80,1.00,0.10> color rgbf
<1.00,1.00,1.00,1.00>]
       }
     turbulence 0.5
     scale 7000000
     rotate <0,0,-70>
    }
  finish {ambient 0.7 diffuse 0}
 }

}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.