POV-Ray : Newsgroups : povray.binaries.images : image : Re: image - some code Server Time
2 Aug 2024 12:16:20 EDT (-0400)
  Re: image - some code  
From: Thomas de Groot
Date: 6 Nov 2007 03:39:09
Message: <4730282d$1@news.povray.org>
This is the code I used in one of my images:

//-- start code --

#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
         }
      }

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 code--

Thomas


Post a reply to this message

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