POV-Ray : Newsgroups : povray.general : Lights only in shadows? Server Time
25 Dec 2024 13:45:12 EST (-0500)
  Lights only in shadows? (Message 1 to 6 of 6)  
From: Sven Littkowski
Subject: Lights only in shadows?
Date: 27 May 2006 12:19:07
Message: <44787bfb$1@news.povray.org>
Greetings again!

I am searching for a way to have lights (ambient 1.0) only in shadow regions 
of a planet. Does anyone know a way to do that?

At the moment, I have a made a planet out of three layers: the planet itself 
(a sphere with a high-resolution image map), another sphere with a 
semi-transparent PNG map at ambient 1.0 for the city lights, and a sphere 
with a semi-transparent PNG map for the clouds.

Altogether, it looks quite okay, but with this technology there are lights 
on the dayside of mother earth, as well. And I really would prefer if my 
citizens would prefer to "save energy" on the dayside...

Any suggestions?

Greetings,

Sven


Post a reply to this message

From: PM 2Ring
Subject: Re: Lights only in shadows?
Date: 27 May 2006 13:05:01
Message: <web.447885df9215ab7e76ba2c900@news.povray.org>
"Sven Littkowski" <sve### [at] jamaica-focuscom> wrote:
> Greetings again!
>
> I am searching for a way to have lights (ambient 1.0) only in shadow regions
> of a planet. Does anyone know a way to do that?
>
> At the moment, I have a made a planet out of three layers: the planet itself
> (a sphere with a high-resolution image map), another sphere with a
> semi-transparent PNG map at ambient 1.0 for the city lights, and a sphere
> with a semi-transparent PNG map for the clouds.

You can do this with a texture_map, with the gradient pattern using the
vector from the centre of the Earth to the centre of the Sun. Sorry, I'm
too tired to write any code right now. :)


Post a reply to this message

From: Sven Littkowski
Subject: Re: Lights only in shadows?
Date: 27 May 2006 13:23:12
Message: <44788b00$1@news.povray.org>
That sounds pretty interesting!

I would like to consider that. If not now and today, can you post it 
tomorrow? I, and for sure many others, would appreciate it a lot!

Best greetings,

Sven


"PM 2Ring" <nomail@nomail> schrieb im Newsbeitrag 
news:web.447885df9215ab7e76ba2c900@news.povray.org...
> You can do this with a texture_map, with the gradient pattern using the
> vector from the centre of the Earth to the centre of the Sun. Sorry, I'm
> too tired to write any code right now. :)


Post a reply to this message

From: Chris B
Subject: Re: Lights only in shadows?
Date: 27 May 2006 13:36:25
Message: <44788e19@news.povray.org>
"Sven Littkowski" <sve### [at] jamaica-focuscom> wrote in message 
news:44788b00$1@news.povray.org...
>
> "PM 2Ring" <nomail@nomail> schrieb im Newsbeitrag 
> news:web.447885df9215ab7e76ba2c900@news.povray.org...
>> You can do this with a texture_map, with the gradient pattern using the
>> vector from the centre of the Earth to the centre of the Sun. Sorry, I'm
>> too tired to write any code right now. :)
>
> That sounds pretty interesting!
>
> I would like to consider that. If not now and today, can you post it 
> tomorrow? I, and for sure many others, would appreciate it a lot!
>

Why not just use a hemisphere for the lights. You can orient that in the 
same way.
If the hemisphere is centred at the origin you can just use reorient_trans() 
to point the blunt end at the light source.

Regards,
Chris B.


Post a reply to this message

From: PM 2Ring
Subject: Re: Lights only in shadows?
Date: 27 May 2006 13:55:00
Message: <web.4478916f9215ab7e76ba2c900@news.povray.org>
"Chris B" <c_b### [at] btconnectcomnospam> wrote:
> "Sven Littkowski" <sve### [at] jamaica-focuscom> wrote in message
> news:44788b00$1@news.povray.org...
> >
> > "PM 2Ring" <nomail@nomail> schrieb im Newsbeitrag
> > news:web.447885df9215ab7e76ba2c900@news.povray.org...
> >> You can do this with a texture_map, with the gradient pattern using the
> >> vector from the centre of the Earth to the centre of the Sun. Sorry, I'm
> >> too tired to write any code right now. :)
> >
> > That sounds pretty interesting!
> >
> > I would like to consider that. If not now and today, can you post it
> > tomorrow? I, and for sure many others, would appreciate it a lot!

I'm sure you can figure it out, Sven. :) I'm a bit busy, ATM, chasing
links...

> Why not just use a hemisphere for the lights. You can orient that in the
> same way.

That sounds simpler, Chris.

> If the hemisphere is centred at the origin you can just use reorient_trans()
> to point the blunt end at the light source.

And splitting the atmosphere into two hemispheres will also solve Sven's
problem with the nighside atmosphere glowing.


Post a reply to this message

From: PM 2Ring
Subject: Re: Lights only in shadows?
Date: 27 May 2006 14:15:01
Message: <web.447896b69215ab7e76ba2c900@news.povray.org>
"PM 2Ring" <nomail@nomail> wrote:
> "Chris B" <c_b### [at] btconnectcomnospam> wrote:

> > Why not just use a hemisphere for the lights. You can orient that in the
> > same way.
>
> That sounds simpler, Chris.

Although the texture_map method isn't really that much more difficult to
implement. Also, it doesn't require the use of intersection (which can slow
things down), and it allows a smooth transition between night and day.


Post a reply to this message

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