POV-Ray : Newsgroups : povray.text.scene-files : planetgood.pov: emitting media atmosphere Server Time
31 Oct 2024 10:22:17 EDT (-0400)
  planetgood.pov: emitting media atmosphere (Message 1 to 1 of 1)  
From: ryan constantine
Subject: planetgood.pov: emitting media atmosphere
Date: 12 Jul 2000 01:21:42
Message: <396C0011.B2662091@yahoo.com>
see my post in general.  this takes care of the problem of emitting
media on the dark side of the planet.  pay no mind the image maps on the
planet.  use your own.  you'll notice that the planet is a
height-field-modified-isosurface.  pretty neat.  also ignore the light
groups.  i was using this file as an inc in another pic.  other than
that, enjoy.

//HFsphere from Gilles Tran, clouds on Jeff Lee's from orbit.pov
//Everything else is done by ryan constantine
#version unofficial Megapov 0.5;

// ---------------------------------------- 

global_settings {
  adc_bailout 0.01/1
  ambient_light <0,0,0>
  assumed_gamma 2.2
  hf_gray_16 off
  irid_wavelength <0.247059,0.176471,0.137255>
  max_intersections 64
  max_trace_level 10
  number_of_waves 10
  radiosity {
    pretrace_start   0.08
    pretrace_end     0.04
    brightness       1
    count            100
    distance_maximum 0.0
    error_bound      1
    gray_threshold   0.0
    low_error_factor 0.5
    minimum_reuse    0.015
    nearest_count    5
    recursion_limit  3
  }
}

/*camera {  //  Camera StdCam
  location  <  -25000,  0.0,   0.0>
  sky       <    0.00000,     0.00000,     1.00000> // Use right
handed-system 
  up        <        0.0,         0.0,         1.0> // Where Z is up
  right     <    1.84031,         0.0,         0.0> // Right Vector is
adjusted to compensate for spherical (Moray) vs. planar (POV-Ray) aspect
ratio
  angle         40    // Vertical      24.541
  look_at   <   -2800.0,     -5000.0,     2800.0>
} */


background{color rgb <0,0,0>}

#declare SunAngle=25*(3.14159/180);
#declare YDistance=1496000*cos(SunAngle)*(-1);
#declare XDistance=1496000*sin(SunAngle)*(-1);

light_source {   // Light1
  <0.0, 0.0, 0.0>       
  color rgb <1.000, 1.000, 1.000>*2
  area_light<69600,0,69600>,<-69600,0,-69600>,2,2
  circular        
  orient
  fade_power 2  
  adaptive 1
  media_attenuation off  
  translate  <0, YDistance, 0> 
  parallel
  point_at <0,0,0>
  groups "main,xwing"
}         

// create a regular point light source
light_source
{
  0*x // light's position (translated below)
  color rgb<1,1,1>*.5  // light's color
  translate <-24935, -10, 10>
  groups "xwing"
}



#declare CloudTexture = texture {
  pigment { bozo
    colour_map {
      [0.00 colour rgbt <0,0,0,1>]
      [0.40 colour rgbt <1,1,1,1>]
      [0.60 colour rgbt <1,1,1,0.80>] 
      [0.85 colour rgbt <1,1,1,0>]
      [1.00 colour rgbt <1,1,1,0>]
    }
    turbulence 4.0
    lambda 3.0
    omega 0.55
    ramp_wave
    scale <1,0.55,0.5> 
//    rotate <0,clock*(-360),0>  
  }
} 

#declare CloudTexture2 = texture {
  pigment { bozo
    colour_map {
      [0.00 colour rgbt <0,0,0,1>]
      [0.55 colour rgbt <1,1,1,1>] 
      [0.65 colour rgbt <1,1,1,0.70>]
      [0.80 colour rgbt <1,1,1,0>]
      [1.00 colour rgbt <1,1,1,0>]
    }
    turbulence 2.0
    lambda 3.0
    omega 0.55
    ramp_wave
    scale <1,0.9,0.5> 
//    rotate <0,clock*(-360)/2,0>  
  }
} 

#declare CloudSphere1 = sphere { <0,0,0>,1.001 
  texture { CloudTexture }   hollow
}
#declare Cloudsphere2 = sphere { <0,0,0>, 1.002
  texture { CloudTexture2 }  hollow
}

#declare PlanetCloudSphere0 = union {  
  object {CloudSphere1}
  object {Cloudsphere2}
}
                      

#declare ScaleIt = 7000;

#declare Atmosphere5000_1 = 
   material  // Atmosphere5000_1
   {   
      texture
      {      
         pigment
         {
            color rgbt <1.0, 1.0, 1.0, 1.0>
         }
      }   
      interior
      {
         media
         {method 3
            intervals 1
            confidence 0.0001
            variance 1.0/1.0
            emission rgbf <0.0, 0.502, 1.0, 1.0>
            density
            {
               spherical
               color_map
               {
                  [ 0.0     rgbft <0.0, 0.0, 0.0, 0.0, 0.0> ]
                  [ 0.95    rgbft <0.02, 0.02, 0.02, 0.0, 0.0> ]
                  [ 1.0     rgbft <0.0, 0.0, 0.0, 0.0, 0.0> ]
               }
            }
            density
            {
               gradient y
               color_map
               {
                  [ 0.0     rgbft <0.0, 0.0, 0.0, 0.0, 0.0> ]
                  [ 0.35    rgbft <0.0, 0.0, 0.0, 0.0, 0.0> ]
                  [ 0.55    rgbft <1.0, 1.0, 1.0, 0.0, 0.0> ]
                  [ 1.0     rgbft <1.0, 1.0, 1.0, 0.0, 0.0> ]
               }
               scale  <1.0, 2, 1.0>
               translate 1.0 * y
            }
         }
      }
   }


#declare PlanetAtmosphere = sphere 
{ 
  <0,0,0>, 1.02
//  texture {pigment{color rgbt 1}}
//  interior{media{AtmosMedia1}media{AtmosMedia2}ior 1.000292}
  material{Atmosphere5000_1}
  scale <1,1.01,1>
  hollow
}  



#declare TelElnanSurface = 
   material{
   texture{   
      pigment{color rgb <0.01953125,0.1328125,0.28515625>} 
      normal{granite , 0.01}   
      finish{
         ambient 0.0
         diffuse 1.0}
   }
      interior {ior 20}
   texture {   
      pigment {
         image_map {
            sys   "D:\Ad&d\pov\Moray For Windows\Maps\Tel
Elnan\worldcolor5b.bmp"
            map_type 1
            interpolate 2
            transmit 0, 1}
         scale  <-1,1,1>
            rotate -90*x
      }
   }
}
   

#declare Tel_Elnan = 
   material  
   {   
       TelElnanSurface 
   }

#declare Surface = pigment {image_map{sys "D:\Ad&d\pov\Moray For
Windows\Maps\Tel Elnan\worldheight5.bmp" map_type 1 interpolate 2}
            scale  <-1,1,1>
            rotate -90*x}

#declare hftext=function{pigment{Surface}}
#declare PlanetSphere = isosurface{                 
        function{x*x+y*y+z*z - hftext(x,y,z)*(0.1)}
        contained_by{sphere{0,1}}
        eval
        max_gradient 10 // <--- important- adjust to your picture
otherwise strange things happen
        threshold 1
        material{Tel_Elnan}
        rotate y*135

}
 
#declare Planet = union {
  object { PlanetSphere  rotate z*4*36 scale ScaleIt}
  object { PlanetCloudSphere0  rotate z*4*36 scale ScaleIt}
  object { PlanetAtmosphere  scale ScaleIt*1.02}
  light_group "main"
}




object{Planet}


Post a reply to this message

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