POV-Ray : Newsgroups : povray.text.scene-files : cloudy planet Server Time
22 Dec 2024 14:22:06 EST (-0500)
  cloudy planet (Message 1 to 2 of 2)  
From: miriam english
Subject: cloudy planet
Date: 10 Sep 2004 22:20:00
Message: <web.41425fbce6a5553038f1caf60@news.povray.org>
This builds an entire Earth-sized planet with thick clouds that cast
shadows, but renders really quickly (a few minutes on a slow old p550).
They do so because they don't use media but are really 9 layers of texture.
The fuzzy nature of the textures makes it difficult to see that they are
faked, but gives real depth.

The ground in this example is featureless just to demonstrate the cloud
shadows.

I love the idea of being able to create entire complex worlds with simple
descriptions.

// POV-Ray v 3.5
// by miriam  8th Nov 2001, resurrected and improved 9th September 2004

// camera  6,000,002 (2 meters above the surface)
// earth-sized planet 6,000,000 meters radius (6,000 km radius)
// build 3d clouds with 9 layers 10 meters apart on spheres 1.01 km to 1.09
km up

global_settings {
   //adc_bailout 0
   assumed_gamma 2.2
   max_trace_level 100
}

#include "shapes.inc"
#include "colors.inc"
#include "textures.inc"
#include "skies.inc"
#include "stars.inc"

#declare earthradius=6000000;
#declare cloudheight=1000 + earthradius;


camera {
   location <0, earthradius+2000, 0> //above the clouds
   //location <0, earthradius+2, 0> //standing on the surface
   direction <0 0 1>
   up <0.0, 1.0, 0.0>
   right <4/3, 0.0, 0.0>
   look_at <0, earthradius+1200, 1000> //looking downward from high
   //look_at <0, earthradius+2, 1000> //looking forward on the ground
   angle 90
}

//eeek! the sun is only 100km away :)
//light_source { <0, cloudheight+100000, 0> color rgb <1, 1, 0.8> }
light_source { <1000, cloudheight+100000, 10000> color rgb <0.9, 0.9, 1> }

//light_source { <0, earthradius+2, 0> White } //headlight


// planet surface
// plain color to show shadows cast by clouds
sphere { <0.0, 0.0, 0.0>, earthradius
   texture {
      pigment { color rgb <0.7, 0.8, 0.6> }
      finish {
         diffuse 1
         ambient 0.2
         roughness 0.5
         //reflection 0.2
      }
   }
}



//series of 9 cloud layers at 10 meter heights
//fake cloud texture painted onto hollow sphere

#local cloudlayer=10;
#local cloudlite=0.45;
#local cloudcolor=<.85, .85, .85, .5>;
//first the basic definition
#macro m_cloud(cloudlayer, cloudlite, cloudcolor)
   sphere { <0, 0, 0>, cloudlayer + cloudheight //6001000
      hollow on
      pigment {
         bozo
         turbulence 1.1
         octaves 6
         omega 0.7
         lambda 2
         color_map {
            [0.0 0.1 color rgbt cloudcolor color rgbt <.75, .75, .75, .7>]
            [0.1 0.5 color rgbt <.75, .75, .75, .7> color rgbt <1, 1, 1, 1>]
            [0.5 1.0 color rgbt <1, 1, 1, 1>      color rgbt <1, 1, 1, 1>]
         }
         scale 1800
      }
      finish { ambient cloudlite diffuse 1.0 reflection 0 }
   }
#end

m_cloud(10, 0.45, cloudcolor)
m_cloud(20, 0.50, cloudcolor)
m_cloud(30, 0.55, cloudcolor)
m_cloud(40, 0.60, cloudcolor)
m_cloud(50, 0.65, cloudcolor)
m_cloud(60, 0.70, cloudcolor)
m_cloud(70, 0.75, cloudcolor)
m_cloud(80, 0.80, cloudcolor)
m_cloud(90, 0.85, cloudcolor)


fog {
 distance 40000
 color rgb<0.6, 0.6, 0.7>
}


Post a reply to this message

From: Paolo Gibellini
Subject: Re: cloudy planet
Date: 13 Sep 2004 06:47:53
Message: <41457ad9@news.povray.org>
Fast and nice!
Interesting for animations.
;-)
Paolo


Post a reply to this message

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