POV-Ray : Newsgroups : povray.general : Realistic sky sphere at twilight : Re: Realistic sky sphere at twilight Server Time
29 Jul 2024 10:19:03 EDT (-0400)
  Re: Realistic sky sphere at twilight  
From: Anthony D  Baye
Date: 20 Feb 2012 23:15:01
Message: <web.4f43191cb6d52b38d7f39bd00@news.povray.org>
"rodv92" <nomail@nomail> wrote:
> hello group !
>
> I found on the net a decent model of the sunset sky some years ago.
>
> http://povray.tashcorp.net/tutorials/qd_realskysphere/
>
> the problem is that with the function max(min(y,1),0) or simply gradient y
> the sky is red at the horizon at all azimuth.
>
> To be 100% realistic it should be blue and darker at the opposite direction of
> the sunset.
>
> So i thought : Change the function, but correct me if i am wrong, the function
> should be (z,y) -> f(z,y) and not y -> f(y) only (when the camera is looking
> along the +z axis)
>
> I don't think that a color map can handle two degrees of freedom ??
>
> Other option : two pigment declarations for the sky sphere, one for x, other for
> z, and play with transparency : results are quite disappointing , since a dark
> streak appears from 0 to 180*y (the goal is to make the sky darker / blue only
> near the horizon at the opposite azimuth of the sunset.
>
> Thanks for any ideas !

Excellent idea!

I only have one suggestion.  Why not construct the color_map automatically using
a loop and eval_pigment?

load the image as an image_map pigment, scale it to the right proportions
(dimensions don't matter), an

color_map {
    #local cStep = 0;
    #while(cStep < pigment_size)
        [1/numSteps srgb eval_pigment(...) ]
    #local cStep = cStep + stepSize * (pigment_size / image_height);
    #end
    }

Regards,

A.D.B.


Post a reply to this message

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