POV-Ray : Newsgroups : povray.general : The sun and stars : The sun and stars Server Time
4 Aug 2024 14:24:41 EDT (-0400)
  The sun and stars  
From: Rich
Date: 19 Apr 2003 11:04:17
Message: <Xns93625C49E7338spammindspringcom@204.213.191.226>
Tek has posted some really nice work in the images group, and I've 
borrowed some of the code that he and others have posted regarding the 
rendering of realistic star fields and the sun.  The problem I'd like to 
address in my render is the fact that if the sun is visible to any degree 
in an image, there's absolutely no way you'd be able to see the stars.
    	So, realism is not the best option here, but I'd at least like to 
get rid of the stars that are visible through the sun's "atmosphere" and 
a bit beyond that.  I've attempted to place the pigments in a 
pigment_map, but for some reason the star pigment is washed out and I 
can't figure out why.

Here's the code:

global_settings {
  assumed_gamma 1.0
}

camera {
  location  <0.0, 1.5, -10.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}

#declare pStars = pigment {
  pigment_pattern {
   crackle form <1,0,0>
   pigment_map {
    [0 crackle solid
       pigment_map {
         [0 bozo scale 30
            colour_map {
              [0 rgb .7]
              [1 rgb 1.3]
            } ]
         [0.75 rgb 0] 
       } ]
    [1 rgb 0]
   }
  }
  colour_map {
   [.5 rgb 0]
   [1 rgb 3]
  }
  scale 0.004
  rotate <45,90,45>
 }

#declare pSun = pigment {
  gradient y scale 2 
  translate -1 poly_wave 50
  colour_map {
    [0 rgbt 1]
    [1 rgb <3,2,1>]
  }
}

sky_sphere {
  pigment {
    gradient y
    pigment_map {
      [0.0  pStars]
      [0.85 pSun]
    }
    rotate <80,325,0>
  }
}


-- 
Rich Allen
(Remove SPAM from my address to reply by e-mail)


Post a reply to this message

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