|
![](/i/fill.gif) |
On Thu, 2 Oct 2003 15:12:45 -0500, Hughes, B. <omn### [at] charter net>
wrote:
>
> "Phil Cook" <phi### [at] deckingdeals co uk> wrote in message
> news:oprwfbhgleeybzwd@news.povray.org...
>>
>> I model a lot of outdoor stuff and use the excellent SunPos macro to
>> calculate the position of the sun. I would like to animate this by
>> altering the sun's position, this of course I can do easily, however the
>> sky_sphere colour won't match the sun position( blue sky at sunset etc.)
>>
>> Using the old adage of try and work it out yourself, I have written a
>> little macro that seems to solve this. Before I get too involved with
>> it,
>> altering light colour and creating a much better sun, I would really
>> like
>> to get some comments as to my script and the colours used.
>
> Looks like a great idea. If you add one more color_map following after
> the
> last #break, and add #else before the color_map, it'll be valid for all
> times not within the ranges given. That way you get the night sky at 3
> a.m.
> too, which is one of the times I tried.
Hmmm yes I forgot to test it during winter, the values only ran down to -3
million. Writes out 100 times "I must remember to trap errors"
>
> Sky coloring is always difficult. Right away I thought the purple didn't
> seem correct for the sunrise/sunset. Although, I think if a layer of thin
> clouds or water droplets were present in the air this is the color that
> might be seen. I'm just guessing, but perhaps a result of the very wide
> area
> it covers it looks out of place. The bright blue above it looks wrong to
> me
> too, too blue without other colors mixed in to offset it. Most times I
> think
> of the real sky colors as muted in some sense, except perhaps the Sun
> itself
> and intensely lit clouds. A bit of imaginative perception can enhance the
> coloring. I see a lot of sunrises from my location on a NE facing
> hillside,
> not as many sunsets, and yet I don't believe I could accurately
> reproduce it
> from memory in POV-Ray.
>
> Overall I'd say you have too much red mixed into the blue in those color
> maps.
Thanks, mixing colours is difficult. If I recall my physics correctly the
blue is due to atmospheric scattering when passing through all the atmos'
then as the sun sets the blue diminishes as green is added to make cyan
than the blue goes and the green is added to red to make yellow and then
finally the green goes to leave red. Taking the cyan out of the sunsets
does produce that magenta colour, but leaving it in seems to produce
either banding or unrealistic colours.
>
> Anyway, I'd suggest the orange range be thinner, closer to the horizon.
> Here's my attempt at adjusting all the sky colors. Use them if you wish
> to,
> change them some more, whatever. It's only my interpretation of sky
> coloring.
>
> #declare Skycolour = // sunrise
> colour_map{
> [0 rgb <1,0.1,0.1>]
> [0.5125 rgb <1.5,0.2,0.1>]
> [0.55 rgb <1,0.8,0.2>]
> [0.575 rgb <1,0.6,0.3>]
> [0.6 rgb <0.9,0.6,0.6>]
> [0.65 rgb <0.25,0.35,0.75>]
> [0.725 rgb <0.1,0.2,0.8>]
> [1 rgb <0.1,0.1,0.3>]}
>
> #declare Skycolour = // sunset
> colour_map{
> [0 rgb <1,0.1,0.1>]
> [0.5125 rgb <0.9,0.2,0.2>]
> [0.55 rgb <0.95,0.75,0.4>]
> [0.575 rgb <1,0.6,0.3>]
> [0.6 rgb <0.8,0.6,0.5>]
> [0.65 rgb <0.2,0.5,0.7>]
> [0.725 rgb <0.1,0.4,0.8>]
> [1 rgb <0.1,0.2,0.3>]}
>
>
> #declare Skycolour = // early morning/late afternoon
> colour_map{
> [0 rgb <1,0,0>]
> [0.5 rgb <0.65,0.6,0.9>]
> [0.525 rgb <0.35,0.6,0.9>]
> [0.6 rgb <0.3,0.55,0.8>]
> [0.8 rgb <0.1,0.3,0.9>]
> [1 rgb <0.2,0.3,0.7>]}
>
> #declare Skycolour = // midmorning/afternoon
> colour_map{
> [0 rgb <1,0,0>]
> [0.5 rgb <0.6,0.7,0.8>]
> [0.525 rgb <0.35,0.55,0.9>]
> [0.575 rgb <0.25,0.45,0.8>]
> [0.7 rgb <0.2,0.3,1>]
> [1 rgb <0.1,0.4,0.7>]}
>
> #declare Skycolour = // noon
> colour_map{
> [0 rgb <1,0,0>]
> [0.5 rgb <0.75,0.75,0.7>]
> [0.55 rgb <0.3,0.7,0.9>]
> [0.65 rgb <0.15,0.6,0.8>]
> [0.8 rgb <0.2,0.4,0.9>]
> [1 rgb <0.2,0.3,0.7>]}
>
> #declare Skycolour = // night
> colour_map{
> [0 rgb <1,0,0>]
> [0.5 rgb <0.05,0.075,0.075>]
> [0.525 rgb <0.025,0.025,0.1>]
> [1 rgb <0,0,0>]}
Which means adding a conditional to check if time is over 12 to
differentiate between sunset and sunrise, easy enough. Nice colours, still
seem to get than annoying banding between blue and orange though.
>
> Oh, and semicolons aren't required for those declares. :-)
I know, I know, I tend to stick them on out of habit :)
> I realize all
> you asked for was an opinion but I love to try sky colors myself.
>
> Bob H.
>
>
I was inspired after driving home this week by all the beautiful sunsets.
I must admit I was suprised not to see anything about this on the net or
ng's it seemed rather obvious to me to try and tie SunPos and sky_sphere
together expecially for doing animations.
The next stage after messing with colours and #range's is some clouds with
depth to reflect the sun properly and of course the sun itself which I
can't seem to get right,ah well back to dabbling with media.
--
Phil
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Post a reply to this message
|
![](/i/fill.gif) |