POV-Ray : Newsgroups : povray.newusers : objects turn white with raised ambience : Re: objects turn white with raised ambience Server Time
29 Jul 2024 12:21:41 EDT (-0400)
  Re: objects turn white with raised ambience  
From: PM 2Ring
Date: 23 Dec 2005 03:20:01
Message: <web.43abb098405ec266a6f2f67b0@news.povray.org>
Mike Williams <nos### [at] econymdemoncouk> wrote:
> Wasn't it PM 2Ring who wrote:
> >"Ian Crofoot" <nomail@nomail> wrote:
> >> I'm testing a scene with Christmas lights, and to get the effect of the
> >> lights I thought turning up the ambient values sufficiently high would work
> >> (with radiosity).  The only problem I run into is that four of the six
> >> colors of lights I use turn white when the ambient value is raised.  Two of
> >> them are function perfectly however.

> >I've only had a quick look at your scene, but if the section above is an
> >example of your problem, then I suggest not using white as your ambient
> >colour.
> >Instead use something like this:
> >
> > ambient rgb 100*<0.866667, 0, 0.286667>
> >
> >Sorry, I haven't tested this out.
>
> What happens is that the colours get clipped. The colours that don't
> turn white are the ones that have a zero component.

Of course. Oops! (I'm glad I put that disclaimer in :)

FWIW, until I started reading these newsgroups, I didn't even know you could
use colour values outside the zero to one range. I was puzzled when I first
saw SDL with fading light sources using rgb 100, but I'm so used to it now
that I'd forgotten all about colour clipping.

> E.g. when this colour gets multiplied by 100
>       pigment{ rgb <0.866667, 0.00000e+0, 0.286667>}
> it gives
>       pigment { rgb <86.6667, 0, 28.6667>}
> which when clipped to a max of 1.0 gives
>       pigment { rgb <1,0,1> }
> which is pure magenta.

That makes sense, Mike.

> Similarly, the coloured ambient value is only going to help when one of
> its colour components is zero or very small.
>
> E.g. for this colour
>       pigment{ rgb <0.920000, 0.700000, 0.220000>}
>       finish{ ambient rgb <0.920000, 0.700000, 0.220000>*100 }
> When you multiply the pigment by the ambient you get
>       pigment {rgb <84.64, 49, 4.84>}
> Which, when clipped to a max of 1.0 gives
>       pigment {rgb <1,1,1>}
> which is pure white.
>
>
> You could choose to only use colours that have at least one zero
> component. Even then, the high ambient is going to cause them to be
> clipped to one of the pure colours red, blue, green, yellow, magenta or
> cyan. The radiosity that they give off is from the unclipped colour.
>
>
> Alternatively you could consider this:
>   texture{
>       pigment{ rgb <92, 0.7, 0.22>}
>       finish {ambient 1}
>    }
> This causes the orange bulbs to be orange, but then cast red radiosity.
>
> --
> Mike Williams
> Gentleman of Leisure

What about using a layered texture, with the bottom layer having a high
white ambient and the top layer with the desired colour as filtered
transparency? Or even using two objects, a coloured bulb object,
containing a white glowing object?

Other possible techniques:
* Develop the scene using low light values & brighten up the scene with
post-processing.

* Use two-pass radiosity.


Post a reply to this message

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