POV-Ray : Newsgroups : povray.general : Music of the spheres... : Music of the spheres... Server Time
7 Aug 2024 17:27:40 EDT (-0400)
  Music of the spheres...  
From: David Nedrow
Date: 20 Aug 2001 18:00:11
Message: <3B81886A.7030900@usa.net>
Here's what I'm trying to do:

I'm trying to add city lights to the Earth scene file originally created 
by Constantine Thomas.

His scene file is pretty straightforward and uses several spheres to 
combine satellite imagery into a very nice globe. I've found a satellite 
view image of the nighttime earth that shows just the lights of cities 
on a black background. I'd like to somehow lay this in on Constantine's 
land sphere (which is above the ocean and below the clouds) but, and 
here is the important part, make it appear as though the light points 
are actually illuminated. This way, as the globe turns during an 
animation, the city lights will actually be seen on the dark side of the 
earth where they aren't occluded by the clouds.

Now the problem... I have no idea how to accomplish this. <G> Oh, it's 
easy enough to add another sphere just on top of the landmasses, but I 
can't figure out how to get them to appear "lit" when on the dark side.

I had thought about trying to extrude them through the first two spheres 
and "hide" a light inside the inner sphere, but I'm afraid that would 
look odd, as the lights facing the camera would be brighter than those 
not directed at the camera and that they may not be visible at all at 
extreme angles.

Is there a way to define a light that would only intersect the new 
sphere with the night light bitmap? That was another approach I thought 
of. Basically, use an area light (I know, there is no "fill" in space, 
but we'll pretend the moon is "full") to illuminate just the night light 
bitmap and also force the black areas to be transparent.

Any pointers would be appreciated. I've included Constantine's union to 
show what he is constructing.

#declare Earth=

union {

//Sea Map (specular)

       sphere {0, 6378

         pigment {image_map {png "earth-seas.png" map_type 1 interpolate 2}}

         finish {ambient 0 diffuse 1 specular 0.5 roughness 0.01}}



//Land map (not specular, overlaid above Sea Map)

//-NOTE: transmit statement below must not be changed- ; this makes blue
areas (ie. the oceans) transparent!

       sphere {0, 6378.01

         pigment {image_map {png "earth-land.png" map_type 1 interpolate 2
transmit 2, 1.0}}

         finish {ambient 0 diffuse 1}

              }



//Cloud map (above Land and Sea)

       sphere{0, 6380

         pigment{image_map {png "earth-clouds.png" map_type 1 interpolate 2

         #declare n=0

         #while (n<Indexes)

         transmit n,1-pow(n/(Indexes-1),T)

         #declare n=n+1

         #end

                 }}

//Cloud Bump map (for terminator)

         normal {bump_map {png "cloud-bump.png" map_type 1 interpolate 2
bump_size 0.5}}

         finish {ambient 0 diffuse 1}

             }



//Atmospheric haze

object {BlueAtm scale 6900}

        }// end Earth union


Post a reply to this message

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