|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm not sure if this question is advanced enough to post in this group, but
anyway, here it is.
I'm making a model of the Earth to be seen from space. I've got textures for
oceans, land, clouds, and "lights of civilization". What I want to do is,
to make the lights only visible on the nightside of the Earth, and still be
able to rotate the Earth by any amount, so you can see different areas of
lights on the nightside, and different areas of land on the dayside. At the
moment, the lights are visible on both sides of the Earth, so how do I make
them be off on the dayside ond on on the nightside?
Hopefully someone will be able to help me with this problem.
Rohan _e_ii
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rohan Bernett wrote:
>
> I'm not sure if this question is advanced enough to post in this group, but
> anyway, here it is.
>
> I'm making a model of the Earth to be seen from space. I've got textures for
> oceans, land, clouds, and "lights of civilization". What I want to do is,
> to make the lights only visible on the nightside of the Earth, and still be
> able to rotate the Earth by any amount, so you can see different areas of
> lights on the nightside, and different areas of land on the dayside. At the
> moment, the lights are visible on both sides of the Earth, so how do I make
> them be off on the dayside ond on on the nightside?
>
> Hopefully someone will be able to help me with this problem.
I have no idea if this will work as expected but on the off chance...
Two spheres of equal size.
The first sphere with the daylight image. Intersect the sphere with a fixed plane
resulting with half a sphere - call it Left_Hemisphere
The second sphere with the night time image. Intersect the sphere with a fixed plane
resulting with half a sphere - call it Right_Hemisphere.
Now you have two half-spheres that look like one whole sphere.
Now if you rotate both image_maps the images will rotate into the intersection
and it will appear that you have one whole sphere rotating on screen with the day
and night side images where they belong. In actuality the spheres never rotate
because you are rotate the image maps instead.
e.g.
intersection {
sphere { 0,.5
pigment {
image_map { tga "day_image.tga" map_type 1 }
rotate y*360*clock
}
}
plane { x,0 }
}
intersection {
sphere { 0,.5
pigment {
image_map { tga "night_image.tga" map_type 1 }
rotate y*360*clock
}
}
plane { -x,0 }
}
Does any of this make sense?
--
Ken Tyler
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ken wrote:
>
> The first sphere with the daylight image. Intersect the sphere with a fixed plane
> resulting with half a sphere - call it Left_Hemisphere
>
> The second sphere with the night time image. Intersect the sphere with a fixed plane
> resulting with half a sphere - call it Right_Hemisphere.
>
> Now you have two half-spheres that look like one whole sphere.
Would do it, yeah. The thing that might be an issue is the sharpness of
the boundary.
Having made this same thing before I had to overlay image maps and use
an extreme ambient on the nightside lights map while covering it with
Earth, clouds, and masking texture. The real trick being the mask, it
was a clear and black gradient which blended a little at the center to
act as a dusk/dawn area.
To describe in layers, it went like:
1) nightside lights, highly ambient (ambient 3 or more)
2) masking, clear to black (index 0.47 to 0.53 or thereabouts)
3) Earth, transmit 0.05 for the underlying lights to squeeze through
4) Clouds, clear to white basically
The mask layer counter-rotated so the black (opaque) side always faced
the Sun while the Earth layer rotated, as well as the clouds a little
faster over that. The little bit of transparency added overall to the
Earth layer wasn't enough to make it show anything through except for
the highly ambient nightside lights portions. I'm going by memory here
since it was years ago now and the numbers could be different, but tells
basically what I did to get it done.
If you'd like to see it the animation I did of it is at
http://hometown.aol.com/persistenceofv/anims.htm
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
But would the shading on the terminator still look correct?
Rohan _e_ii
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"hughes, b." wrote:
> Would do it, yeah. The thing that might be an issue is the sharpness of
> the boundary.
After posting I thought about the terminus boundary problem but figured it
was a good lesson left for the student to figure out :)
--
Ken Tyler
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3D76BE51.50BF521B@pacbell.net>, Ken <tyl### [at] pacbellnet>
wrote:
> Two spheres of equal size.
>
> The first sphere with the daylight image. Intersect the sphere with a fixed
> plane
> resulting with half a sphere - call it Left_Hemisphere
>
> The second sphere with the night time image. Intersect the sphere with a
> fixed plane
> resulting with half a sphere - call it Right_Hemisphere.
>
> Now you have two half-spheres that look like one whole sphere.
It would be easier to just use the object pattern:
sphere {0, 0.5
pigment {
object {plane {x, 0}
pigment {image_map {tga "day_image.tga" map_type 1}
rotate y*360*clock
},
pigment {image_map {tga "night_image.tga" map_type 1}
rotate y*360*clock
}
}
}
}
Alternatively, you could rotate the plane instead of the day/night
pigments or textures.
If you want a smooth blend, maybe a gradient pattern would do the trick.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
If your lights are just ambient spots, you could apply a gradient to them as
a group so they were invisible on the daylight side.
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
web.3d76afc2d9d2c03118ccf4f70@news.povray.org...
> I'm making a model of the Earth to be seen from space.
I did the following not so long ago. You'll have to adapt it to make it work
but that's the idea.
G.
// ----------------------------------------
// Main light
// ----------------------------------------
#declare RotaZ=30; // main light rotation
#declare RotaY=-20;
#declare colBackLight= rgb galaxy_colour2;
#declare colBackLight= GammaColor(galaxy_colour2,0.5);
// ----------------------------------------
// Earth
// ----------------------------------------
// The day map and the night map are set to the current light rotation !!!
#declare RotaAxis=-80; // earth rotation
#declare txtDay=texture{
pigment{
image_map{jpeg "earth_day2" map_type 1}
}
finish{ambient 0.3 diffuse 1}
rotate y*RotaAxis
}
#declare txtNight=texture{
pigment{
image_map{jpeg "earth_night2" map_type 1}
}
finish{ambient 1 diffuse 0}
rotate y*RotaAxis
}
#declare Earth=union{
sphere{0,1
texture{
pigment_pattern{
gradient x
scale 2
translate -x
rotate z*RotaZ
rotate y*RotaY
}
texture_map{
[0.45 txtNight]
[0.55 txtDay]
}
}
}
sphere{0,1
hollow
texture{
pigment{
pigment_pattern{
image_map{jpeg "clouds_2000" map_type 1}
}
color_map{
[0 Clear]
[1 White]
}
rotate y*RotaAxis
}
finish{ambient 0.1 diffuse 2}
}
scale 1.01
}
sphere{0,1
hollow
texture{
pigment{Clear}
finish{ambient 0 diffuse 0}
}
interior{
media{
emission galaxy_colour2*4
density{
spherical
}
}
}
scale 1.1
}
}
light_group{
light_source{<-5,0.5,-3> colBackLight*0.2}
object{Earth}
global_lights on
}
--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|