POV-Ray : Newsgroups : povray.general : Realistic sky sphere at twilight : Re: Realistic sky sphere at twilight Server Time
29 Jul 2024 10:31:51 EDT (-0400)
  Re: Realistic sky sphere at twilight  
From: rodv92
Date: 7 Feb 2012 22:15:01
Message: <web.4f31e82db6d52b385d50475e0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> rodv92 wrote:
>
> > I don't think that a color map can handle two degrees of freedom ??
>
> the pattern function is 3d to 1d (x,y,z) -> f(x,y,z)
>
> the color_map only maps the 1d value to a color.
>
> So the color may depend on more than one dimension,
> (of course, not when using the gradient pattern).

thanks, i updated the function, and in my case i can simplify the function since
sunset is at z = 1 on the sky sphere and the opposite point is z = -1, i think
that there are no variations along the x axis, or at least we can omit them and
still have a quite realistic sky sphere.

so i figured this function :

{function { min(max(min(y,1),0) * pow((1 + abs(z - 1)),2),1)

I think that using the f(x) * f(z) form is good to "squeeze" the color segments,
but maybe what i need is to "stretch" the sky sphere to make the entries with a
red hue on the color map go below the horizon.

so maybe this is what i need :

f(x) * f(z) + g(z) (with g(z) growing when z decreasing)
or simply f(x) - g(z)

of course if anyone has some knowledge of the "real" mathematical model for a
twilight sky sphere (and an approximative function) , i ll be glad to hear it !


Post a reply to this message

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