POV-Ray : Newsgroups : povray.binaries.images : Not oops. : Re: Not oops. Server Time
5 Nov 2024 04:25:41 EST (-0500)
  Re: Not oops.  
From: Tim Cook
Date: 10 Nov 2005 08:53:43
Message: <437350e7$1@news.povray.org>
Whee!  I just got an email from none other than Chris Cason asking for 
the source 'cuz he's using it as his wallpaper!  *feels ego inflate 
dangerously*  Well, I don't have a single scene file since I use Moray, 
but here's what I did:

I got the latest versions of the topo & bathymetry data from NASA's Blue 
Marble site (as they use a full 255 greyscale range for each), but had 
to modify their bathymetry image as it had the continents being 0 (with 
antialiased edges) that needed fixing to 255 so I could reverse the 
entire image and subtract it from a spherical isosurface while adding 
the topography data...and I couldn't just do a complete colour replace 
of all greys below a certain threshold as those were also used by 
trenches.  So a bit of time spent using the colour-replacer brush around 
the edges of the continents on...I think I used the 21600x10800 version 
then downsized it for better results.  Anyhow, now have a much smoother 
topographic and bathymetric bump map set for the Earth, covering a 
complete range of 512 divisions...much better than the old Blue Marble's 
combined dataset which only used just 72 of its possible 256!

I used Moray to make the scene...I placed a sphere at 0,0,0 and scaled 
it to 0.641, giving it the following texture:

//--- BEGIN TEXTURE (direct code in Moray's texture editor) ---
#declare f=20;
texture{
   pigment{
     rgbf 1
   }
}
interior{
   media{
     scattering{
       4,  rgb 1
     }
     density{
       spherical color_map{
         [ 0.00000 rgb f*<0,0,0> ]
         [ 0.00078 rgb f*<0,(1/256),(1/128)> ]
         [ 0.00156 rgb f*<0,(1/128),(1/64)> ]
         [ 0.00234 rgb f*<0,(1/64),(1/32)> ]
         [ 0.00312 rgb f*<0,(1/32),(1/16)> ]
         [ 0.00390 rgb f*<0,(1/16),(1/8)> ]
         [ 0.00468 rgb f*<0,(1/8),(1/4)> ]
         [ 0.00546 rgb f*<0,(1/4),(1/2)> ]
         [ 0.00624 rgb f*<0,(1/2),1> ]
         [ 1.00000 rgb f*<0,(1/2),1> ]
       }
     }
   }
}
//--- END TEXTURE ---

(the numbers for the density are what I computed to be analogous to the 
Earth's atmosphere decreasing in density by half every five miles, with 
the upper region being the boundary of the spherical density map)

position the camera and included the following file for the Earth itself:
//---- START FILE ----
#include "functions.inc"

#declare fn_EarthPigm1=function{
   pigment{
     image_map{
       jpeg "G:\Public\9 - Geography & History\1 - Geography\2 - 
Cartography\Earth\Global\5400\srtm_ramp2.world.5400x2700.jpg"
       map_type 1
       once
       interpolate 4
     }
   }
}
#declare fn_EarthPigm2=function{
   pigment{
     image_map{
       jpeg "G:\Public\9 - Geography & History\1 - Geography\2 - 
Cartography\Earth\Global\5400\fixed.gebco_bathy.5400x2700.jpg"
       map_type 1
       once
       interpolate 4
     }
   }
}
#declare IsoEarthTex=material{
   texture{
     image_pattern{
       jpeg  "G:\Public\9 - Geography & History\1 - Geography\2 - 
Cartography\Earth\Global\5400\watermask5400x2700.jpg"
       map_type 1
       once
       interpolate 4
     }
     texture_map{
       [0
         pigment{
           image_map{
             jpeg "G:\Public\9 - Geography & History\1 - Geography\2 - 
Cartography\Earth\Global\5400\world.200406.3x5400x2700.jpg"
             map_type 1
             once
             interpolate 4
           }
         }
         finish{
           ambient 0
           diffuse 1
           phong 0.5
           metallic 1
           conserve_energy
           reflection{
             0.05,0.05
             fresnel off
             falloff 1
             exponent 1
             metallic 1
           }
         }
       ]
       [1
         pigment{
           image_map{
             jpeg "G:\Public\9 - Geography & History\1 - Geography\2 - 
Cartography\Earth\Global\5400\world.200406.3x5400x2700.jpg"
             map_type 1
             once
             interpolate 4
           }
         }
         finish{
           ambient 0
           diffuse 0.38
           metallic 1
           conserve_energy
           reflection{
             0.38,0.38
             fresnel off
             falloff  1
             exponent 1
             metallic 1
           }
         }
       ]
     }
   }
}

#declare EarthIso=isosurface{
   function{f_sphere(x, y, z, 
0.633)-(fn_EarthPigm1(x,y,z).red*0.006)+(fn_EarthPigm2(x,y,z).red*0.008 
    )}
   contained_by{sphere{0,0.7}}
   material{IsoEarthTex}
   scale  <-1,1,1>
   rotate <90,0,-90>
}
object{EarthIso rotate -23.44*x}
//---- EOF ----

(the above-sea-level values I calibrated by putting references at sea 
level and the top of everest, playing with the multiplication factor 
until they lined up, but the below-sea-level values I just threw in an 
approximation of the difference...)

I also recently added the stars.inc file to the mix and made a flyaround 
animation, I might post that to p.b.animations...since I only know how 
to do animations in Moray, and don't know how I'd combine one in POV 
with one in Moray anyways, the the Earth and stars in it are fixed while 
the camera and sun orbit...

-- 
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

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