POV-Ray : Newsgroups : povray.binaries.images : Planetary atmosphere using media : Planetary atmosphere using media Server Time
2 Nov 2024 18:50:17 EDT (-0400)
  Planetary atmosphere using media  
From: Jörg 'Yadgar' Bleimann
Date: 11 Apr 2010 09:49:18
Message: <4bc1d35e@news.povray.org>
High!

To make testing easier, I resorted to a simple spherical "test planet" 
and tried various camera positions and illumination angles with all five 
scattering types (and yes, it wasn't media but the isosurface which 
slowed down my renderings - now each scene took about 70 seconds!).

The simplified test planet is a sphere with a radius of 5,100 POV units 
(1 unit equals 1 kilometre); the media is contained by a sphere with a 
radius of 5,150 units. In all scenes, the illumnating star is a simple 
point light; in all ground scenes (all scenes from row 3 on), the camera 
is placed 0.0017 units above the planet's surface.

Method, samples and intervals settings are default (see code attached here).

The most striking flaw with all scattering types is the extremely dark 
sky at low illumination angles - the sunrise looks like on Mars but not 
like on a planet with Earth-like atmospheric pressure. Could using an 
area light instead of a point light be helpful here? Or do I have to 
fake the indirectly illuminated sky before dawn by using an additional 
(shadowless) fill light source?

Reactor's suggestion of adding an absorbing component did not work at 
all - regardless which ratios between scattering and absorbing, the sky 
turned even darker!

Then, at medium illumination angels (~45 degrees), the otherwise pretty 
realistic sky with scattering type 1 and 4 still turns too greenish 
close to the horizon...

See you in Khyberspace!

Yadgar

// Planetary Surface Camera test scene


#declare Model_Planet=
sphere
{
   0, 1
   texture
   {
     pigment
     {
       bozo
       color_map
       {
         [0 rgb <0, 0, 0.2>]
         [0.5 rgb <0, 0.4, 1>]
         [0.5 rgb <0.2, 1, 0>]
         [0.65 rgb <0.2, 1, 0>]
         [0.67 rgb <0, 0.6, 0.2>]
         [0.78 rgb <0, 0.6, 0.2>]
         [0.79 rgb <0.5, 1, 0.5>]
         [0.86 rgb 0.6]
         [0.92 rgb 0.6]
         [0.925 rgb 1]
       }
       turbulence 2
       octaves 7
       omega 0.2
     }
     finish { ambient 0.1 diffuse 1 brilliance 0.5 }
   }
   scale 5140
}



#declare Atmosphere =
sphere
{
   0, 5190
   hollow
   material
   {
     texture
     {
       pigment
       {
         color rgbt 1
       }
     }
     interior
     {
       media
       {

	#declare tp=int(clock/13);
	scattering
	{
	  tp, <0.8, 0.8, 1>/80
	  #if (tp=5)
	    eccentricity 0.3
	  #end
	}
         density
         {
           spherical
           density_map
           {
             [0     rgb <0.25, 0.5, 1>]
             [0.005 rgb <0.25, 0.5, 1>]
             [0.011 rgb <0.9, 1, 1>]
             [1    rgb <0.9, 1, 1>]
           }
         }
       }
     }
   }
}

object { Model_Planet }
object { Atmosphere }

light_source
{
   <1000000, 0, 0>
   color rgb 1
   looks_like
   {
     sphere
     {
       <1000000, 0, 0>, 25000
       texture
       {
	pigment { color rgb <1, 1, 0.65> }
	finish { ambient 1 diffuse 0 }
       }
     }
   }
}

// #declare view=4;

#switch (mod(clock, 13))
   #case (0) // global view, centered on terminator
     #declare lat=0;
     #declare long=180;
     #declare ht=20000;
     #declare dir=0;
     #declare azi=-89.9999;
   #break
   #case (1) // global view, centered on substellar point
     #declare lat=0;
     #declare long=270;
     #declare ht=20000;
     #declare dir=0;
     #declare azi=-89.9999;
   #break
   #case (2) // substellar point from 1.7 metres, looking north
     #declare lat=0;
     #declare long=270;
     #declare ht=0.0017;
     #declare dir=0;
     #declare azi=0;
   #break
   #case (3) // Star from substellar point at 1.7 metres
     #declare lat=0;
     #declare long=270;
     #declare ht=0.0017;
     #declare dir=0;
     #declare azi=89.9999;
   #break
   #case (4) // 45 degress west of substellar point from 1.7 metres, 
looking north
     #declare lat=0;
     #declare long=225;
     #declare ht=0.0017;
     #declare dir=0;
     #declare azi=0;
   #break
   #case (5) // Star from 45 degrees west of substellar point at 1.7 metres
     #declare lat=0;
     #declare long=225;
     #declare ht=0.0017;
     #declare dir=90;
     #declare azi=45;
   #break
   #case (6) // Zenith from 45 degrees west of substellar point at 1.7 
metres
     #declare lat=0;
     #declare long=225;
     #declare ht=0.0017;
     #declare dir=90;
     #declare azi=89.9999;
   #break
   #case (7) // 70 degress west of substellar point from 1.7 metres, 
looking north
     #declare lat=0;
     #declare long=200;
     #declare ht=0.0017;
     #declare dir=0;
     #declare azi=0;
   #break
   #case (8) // Star from 70 degrees west of substellar point at 1.7 metres
     #declare lat=0;
     #declare long=200;
     #declare ht=0.0017;
     #declare dir=90;
     #declare azi=20;
   #break
   #case (9) // Zenith from 70 degrees west of substellar point at 1.7 
metres
     #declare lat=0;
     #declare long=200;
     #declare ht=0.0017;
     #declare dir=90;
     #declare azi=89.9999;
   #break
   #case (10) // 90 degress west of substellar point from 1.7 metres, 
looking north
     #declare lat=0;
     #declare long=180;
     #declare ht=0.0017;
     #declare dir=0;
     #declare azi=0;
   #break
   #case (11) // Star from 90 degrees west of substellar point at 1.7 metres
     #declare lat=0;
     #declare long=180;
     #declare ht=0.0017;
     #declare dir=90;
     #declare azi=0;
   #break
   #case (12) // Zenith from 90 degrees west of substellar point at 1.7 
metres
     #declare lat=0;
     #declare long=180;
     #declare ht=0.0017;
     #declare dir=90;
     #declare azi=89.9999;
   #break
#end


#declare surfPos = trace(Model_Planet, 0, 
<sin(radians(-long))*cos(radians(lat)), sin(radians(lat)), 
cos(radians(-long))*cos(radians(lat))>);
#declare camPos = surfPos + vnormalize(surfPos)*ht;

#declare dirVect = <sin(radians(dir))*cos(radians(azi)), 
sin(radians(azi)), cos(radians(dir))*cos(radians(azi))>;



camera
{
   sky surfPos
   location camPos
   look_at camPos + vrotate(dirVect, <lat-90, -(long-180), 0>)
   angle 40
}


Post a reply to this message


Attachments:
Download '2010-04-11 atmospheric media tests 1 to 65.png' (745 KB)

Preview of image '2010-04-11 atmospheric media tests 1 to 65.png'
2010-04-11 atmospheric media tests 1 to 65.png


 

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