|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Having done this before I know what you're trying to do. But as of the
moment I can only think of to say what I did as an example.
The nightside lights image, same as how your clouds image was done for
transparency, except as a layer under the ground image layer (clouds were a
separate sphere) had a layer between the Earth surface texture. It was half
transparent and half black, for night (transparent) and day (opaque). So
there were 3 layers on one sphere. Very high ambient was added to bring out
the brightness of the lights. This of course means the overlying ground
image had to be slightly semitransparent too, then the large ambience
allowed for the lights to be seen through that.
The half transparent, half black gradient x (or z) texture was then rotated
opposite Earth rotation in animation.
Make sense? Hopefully I described it right.
I know there must be plenty of ways to go about it but that's what I did.
For example, you might make use clipping or differencing of another sphere
(not smooth transition terminator though).
Bob H.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I haven't looked at the source, but I think it
should work if you just add another sphere
with a texture that has
diffuse -light_intensity
ambient light_intensity
brilliance 0
of course this will only work with one light source.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hmmm, I'll give this a try. I think I can macro this so that the
light/dark sphere always has the dark side lock on my key light (in this
case, the sun).
-David
Bob H. wrote:
> Having done this before I know what you're trying to do. But as of the
> moment I can only think of to say what I did as an example.
> The nightside lights image, same as how your clouds image was done for
> transparency, except as a layer under the ground image layer (clouds were a
> separate sphere) had a layer between the Earth surface texture. It was half
> transparent and half black, for night (transparent) and day (opaque). So
> there were 3 layers on one sphere. Very high ambient was added to bring out
> the brightness of the lights. This of course means the overlying ground
> image had to be slightly semitransparent too, then the large ambience
> allowed for the lights to be seen through that.
> The half transparent, half black gradient x (or z) texture was then rotated
> opposite Earth rotation in animation.
>
> Make sense? Hopefully I described it right.
>
> I know there must be plenty of ways to go about it but that's what I did.
> For example, you might make use clipping or differencing of another sphere
> (not smooth transition terminator though).
>
> Bob H.
>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I have tried this method. The idea is that shining a light on an object with
negative diffuse actually makes it *darker*. However, it appears (This is
what the guys on the group said) that diffuse intensity is clipped at zero.
Having said that, I have rendered a model like this and (also based on
Thomas' model) I can't see the lights on the lit side of the earth, but can
on the dark side, so I call it acceptable.
"Simon" <sim### [at] surfeude> wrote in message
news:3b826f1a@news.povray.org...
> I haven't looked at the source, but I think it
> should work if you just add another sphere
> with a texture that has
>
> diffuse -light_intensity
> ambient light_intensity
> brilliance 0
>
> of course this will only work with one light source.
>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Try this: (of the top of my head)
FIrst image,: 2-color image, first color represents unlit
areas. 2nd color is lit areas.
Second image: existing planet mapping image
Use 1st image as a material map. Map the 2nd image
onto color one of the material map. Onto the second
color, map a glow/light texture, something like:
#declare city_glow = texture {
pigment { rgb 1 }
finish { ambient 1 diffuse 0 }
}
Pete
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Well, trying what several people have suggested I'm very close. now my problem
is that the "lights" that aren't lit are blocking the image underneath the
point. I'm posting a sample image in p.b.i. Look for "Earth Lights". If you
look at it, you'll see lights in the Pacific, Japan, and the east coast of
Australia.
However, if you look at India it's covered with black spots which is from the
texture I'm using for the light map.
I thought maybe no_shadow on the light sphere would help, but it doesn't seem
to make a difference.
If anyone could look at the sample smippet below and give me a pointer on what
I may be able to do to get rid of the black spots, I'd appreciate it. Note that
I simplified the scene a bit while working this out.
#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}}
// Nighttime City Lights
sphere
{
0, 6378.02
pigment {image_map {gif "earth_lights.gif" map_type 1 interpolate 2
transmit 93, 1.0}}
finish
{
diffuse -.9
ambient .3
brilliance 0
}
rotate <-2,-5,0>
}
//Atmospheric haze
object {BlueAtm scale 6900}
}// end Earth union
object {Earth rotate <0,-15,0>}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"David Nedrow" <dne### [at] usanet> wrote in message
news:3B8### [at] usanet...
> Well, trying what several people have suggested I'm very close. now my
problem
> is that the "lights" that aren't lit are blocking the image underneath the
> point. I'm posting a sample image in p.b.i. Look for "Earth Lights". If
you
> look at it, you'll see lights in the Pacific, Japan, and the east coast of
> Australia.
>
> However, if you look at India it's covered with black spots which is from
the
> texture I'm using for the light map.
This is a good example of why I went with a sublayer for the lights image
map. With it under the land/ocean image map it doesn't get in the way.
So if you were to try it that way and just make the land image very slightly
transparent so as not to bother the map and make the lights image extremely
ambient it should do okay.
It's a matter of adjusting for the proper setup. The black side of the
masking layer (inbetween layer) should still cover the overly bright lights
image when done right.
Bob H.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|