POV-Ray : Newsgroups : povray.binaries.images : Planet Earth : Re: Planet Earth Server Time
5 Nov 2024 20:19:40 EST (-0500)
  Re: Planet Earth  
From: Sven Littkowski
Date: 29 May 2006 14:22:58
Message: <447b3c02@news.povray.org>
Hmm, ran into difficulties with density file 8which is required for 
interpolate). Let me post here the source code for the scene, maybe you can 
show me how it should be.

Thanks,

Sven

"Zeger Knaepen" <zeg### [at] povplacecom> schrieb im Newsbeitrag 
news:447b354d$1@news.povray.org...
as for comments: you should use interpolate with your image_map

-------------------------------------------------

#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"
#include "metals.inc"
#include "glass.inc"
#include "woods.inc"

#declare Earth = texture { pigment { image_map { jpeg "E:\Scripts\Eigene 
Bilder\Povray Textures\Sphere_Earth_01.jpg" map_type 1 } rotate < 0.0, 0.0, 
0.0 > } finish { ambient 0.0 } }
#declare EarthLights = texture { pigment { image_map { png 
"E:\Scripts\Eigene Bilder\Povray Textures\Sphere_Earth_Lights_01.png" 
map_type 1 } rotate < 0.0, 0.0, 0.0 > } finish { ambient 0.25 } }
#declare EarthClouds = texture { pigment { image_map { png 
"E:\Scripts\Eigene Bilder\Povray Textures\Sphere_Earth_Clouds_03.png" 
map_type 1 } rotate < 0.0, 0.0, 0.0 > } finish { ambient 0.0 } }

global_settings
{
 assumed_gamma 2.0
 radiosity {  }  //
}

camera
{
 location < 000.0, 0.0, -300.0 >
 look_at < 000.0, 0.0, 0.0 >
}
/**/
light_source
{
 < 1000.0, 0.0, 250.0 >
 color White *3
}

#macro StarSubPigment(StarSize, StarFrequency)
 crackle
 form < 1.0, 0.0, 0.0 >
 #local Cutoff=StarSize*StarFrequency;
 color_map
 {
  [ Cutoff rgb 1.0 ]
  [ Cutoff rgb 0.0 ]
 }
 scale 1/StarFrequency
#end

// minsize, maxsize = size range of stars (some stars will always be smaller 
due to nature of crackle pattern)
// starfrequency = how many stars
// variationfrequency = how quickly their size changes
#macro StarPigment(MinSize, MaxSize, StarFrequency, VariationFrequency)
 #local NumSizeSteps=8;
 pigment
 {
  pigment_pattern
  {
   bozo
   color_map
   {
    [ 0.0 rgb 0.75 ]
    [ 1.0 rgb 1.00 ]
   }
   scale 1/VariationFrequency
  }
  pigment_map
  {
   #local StepNum=0;
   #while (StepNum<NumSizeSteps)
    #local SizeAmnt=(StepNum+.5)/NumSizeSteps;
    #local PreSize=MinSize+(StepNum/NumSizeSteps)*(MaxSize-MinSize);
    #local PostSize=MinSize+((StepNum+1)/NumSizeSteps)*(MaxSize-MinSize);
    [ SizeAmnt StarSubPigment(PreSize,StarFrequency) ]
    [ SizeAmnt StarSubPigment(PostSize,StarFrequency) ]
    #local StepNum=StepNum+1;
   #end
  }
 }
#end

sky_sphere
{
 StarPigment
 (
  0.000002,  // min star size
  0.000008,  // max star size
  10000,     // star density (higher = more)
  5          // variation frequency (higher = star size changes more over 
nearby parts of the sky)
 )
}

#declare Earth_Surface=sphere
{
 0.0, 1.0
 texture { Earth }
 texture { EarthLights }
 normal
 {
//  density_file df3 "Sphere_Earth_Bumps_01.df3"
//  interpolate 1
  bump_map
  {
   jpeg "Sphere_Earth_Bumps_01.jpg"
   map_type 1
  }
 }
}

#declare Earth_Clouds=sphere
{
 0.0, 1.0005
 texture { EarthClouds }
 normal
 {
//  density_file df3 "Sphere_Earth_Bumps_01.df3"
//  interpolate 1
  bump_map
  {
   jpeg "Sphere_Earth_Clouds_Bumps_03.jpg"
   map_type 1
  }
 }
}

#declare Earth_Atmosphere=sphere
{
 < 0.0, 0.0, 0.0 > 1.0
 pigment
 {
  color rgbt < 0.3, 0.3, 1.0, 1.0 >
 }
 hollow
 interior
 {
  media
  {
   intervals 10
   scattering
   {
    2,
    rgb < 0.3, 0.3, 1.0 >
    extinction 1.0
   }   // 0.75
   density
   {
    spherical
    color_map
    {
     [ 0.000 rgb < 0.0, 0.0, 0.0 > ]
     [ 1.000 rgb < 0.1, 0.1, 0.5 > ]
    }
   }
   samples 1, 10
   confidence 0.9999
   variance 1/1000
   ratio 0.9
  }
 }
 finish { ambient 0.0 diffuse 0.9/**/ }
 scale 1.0075
}

#declare Earth=union
{
 object { Earth_Surface }      //
 object { Earth_Clouds }       //
 object { Earth_Atmosphere }   //
 scale 100.0
}

object { Earth }


Post a reply to this message

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