POV-Ray : Newsgroups : povray.text.scene-files : Crescent Moon in daylight Server Time
21 Dec 2024 11:03:39 EST (-0500)
  Crescent Moon in daylight (Message 1 to 1 of 1)  
From: Thomas de Groot
Subject: Crescent Moon in daylight
Date: 12 Jan 2011 03:12:45
Message: <4d2d627d@news.povray.org>
See Stephen's message in p.g.

//==============================================================================================================================
// Moon in the sky:
// ~~~~~~~~~~~~~~~

#if (Moon)
#debug "Including the moon...\n"

#declare MoonMap =
   material {
      texture {
         pigment {
            image_map {
               png   "PlanetMaps\MoonMap.png"
               map_type 1
               once
               interpolate 2
            }
            scale <1,1,1>
            //rotate 90*x
         }
         normal {
            bump_map {
               png   "PlanetMaps\MoonBump.png"
               map_type 1
               once
               interpolate 2
            }
            scale <1,1,1>
            //rotate 90*x
            bump_size 1.0
         }
         finish {
            ambient 0.0
            diffuse 0.5
         }
      }
      //rotate <20.0, 0.0, -25.0>
   }

sphere { // Moon
  <0,0,0>,1
  material {
    MoonMap
  }
  scale 80.0
  rotate -90*y
  translate <-300.0, 200.0, 1000.0>
}

// Sky
#declare BlueSkySphere =
      texture {
         pigment {
           gradient y
           pigment_map {
            [0.0 rgb <0.6,0.7,1.0>*1.5 transmit 0.5]
            [1.0 rgb <0.437467, 0.824265, 1.0>*1.5 transmit 0.5]
           }
         }
         finish {
            ambient 0.9
            diffuse 0.0
         }
      }

#declare CosmosSkySphere =
      texture {
         pigment {
            color rgbt <0,0,0,1>
         }
         finish {
            ambient 0.0
            diffuse 0.0
         }
      }

#declare SkyShape = 2; // 1=plane; 2=sphere

#if (SkyShape = 1)
plane {
  y,0
  texture { BlueSkySphere }
  interior_texture { CosmosSkySphere }
  no_shadow
  no_reflection
  hollow
  scale <400.0, 1.0, 400.0>
  rotate <-90.0, 0.0, 0.0>
  translate  400.0*z
}

#else
sphere {
  <0,0,0>,1
  texture { BlueSkySphere }
  interior_texture { CosmosSkySphere } //using inverse puts the inside of 
the sphere outside
  no_shadow
  no_reflection
  inverse // no need for hollow
  scale 400
}

#end

#end //of Moon

//==============================================================================================================================


Thomas


Post a reply to this message

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