|
|
> I am working on a planet earth model, and I found this cool map of the
> cities at night (Thanks Jon Berndt! for the reference). I am using it as a
> mostly transparent shell 0.000001 bigger than my earth image map sphere.
Why? Can't you use layered textures?
> Now, the question. I of course want to only see the city lights on the
unlit
> side of earth. The easy unelegant way is to cut the sphere in half and
make
> sure that the city lights are applied only opposite the sun, but that
> requires a knowledge of where the sun is, and more calculations than I
care
> to do.
I did it using a slope-dependant texture, but of course you need the
position of the sun for this...
> Then I came up with a briliant (I thought) Idea: Set the ambient of the
> shell to 0.5, then the diffuse to -0.5. My thinking is that a negative
> diffuse setting means that the more light you hit it with, the darker it
> gets. So a full light hitting normal to this shell should result in a
total
> effect of 0.5 Ambient+(-0.5 Diffuse)=0 light.
I once did something similar... A negative diffuse didn't work, I think,
but a very large negative highlight did!
I can't check it right now, but I think the following code gives more or
less the result you're after...
camera {
location -z*5
look_at 0
}
light_source {
<500,500,-500>
rgb 1//<0,0,1>
}
sphere {
0,1
texture {
pigment {rgb <1,1,0>}
finish {diffuse 0 ambient 1}// specular 1 roughness .01}
}
texture {
pigment {rgbt <-2,-2,0,1>}
finish {diffuse 1 specular 1 roughness 1 metallic}
}
}
--
ZK
http://www.povplace.be.tf
Post a reply to this message
|
|