POV-Ray : Newsgroups : povray.newusers : Light Source Maximum Brightness? Server Time
28 Jul 2024 16:22:45 EDT (-0400)
  Light Source Maximum Brightness? (Message 1 to 7 of 7)  
From: sam kim
Subject: Light Source Maximum Brightness?
Date: 14 Feb 2009 17:55:01
Message: <web.49974bb74c68a7e7b148ecf60@news.povray.org>
Hello,

I have two light_sources for each floor in a 2-story building.

I want to set a maximum illumination number (so an area that receives amount of

light past this number will not be brighter than this number) so that

the area of the building that receives light from both light_sources will not be

so bright compared to rest of the building.

Here's the code:

#include "colors.inc"


light_source {<30,96,50> White}
light_source {<30,49,50> White}

camera {location <50,90,-100> look_at <50,50,20>}

background {White}

//////////////// radiosity ////////////////////
 /*
  global_settings {
    radiosity {
      pretrace_start 0.08
      pretrace_end   0.01
      count 100

      nearest_count 5
      error_bound 1
      recursion_limit 1

      low_error_factor 0.5
      gray_threshold 0.0
      minimum_reuse 0.015
      brightness .5

      adc_bailout 0.01/2
    }
  }   */

////////////////////////////////////////// two - floor Building
/////////////////////////////////////////

               /// main frame///
#declare Main_Frame =

difference{

box {<0,0,0><100,100,100>}

box {<3,3,3><97,97,97>}

}

            /// floor separator  or just 2nd floor///

#declare Second =

difference {

box {<0,50,0><100,53,100>}

box {<50,49,100/3><90,54,90>}

}

          ///////// Main Frame + 2nd Floor /////////

#declare Building =

merge {object{Main_Frame} object{Second}}

          ////////// Cross Section of the Building ///////////

difference {

object{Building}

box {<-1,-1,-1><101,101,4>}

texture { finish {ambient .5}
pigment {color Gray75} }

}


Post a reply to this message

From: triple r
Subject: Re: Light Source Maximum Brightness?
Date: 14 Feb 2009 18:30:01
Message: <web.499753af90d0d596ef2b9ba40@news.povray.org>
"sam kim" <nomail@nomail> wrote:

> light_source {<30,96,50> White}
> light_source {<30,49,50> White}

The standard model for lights is not physical since it does not take into
account that light intensity fades with the square of distance.  To fix the
problem, I changed it to:

light_source {<30,96,50> White fade_power 2 fade_distance 30}
light_source {<30,49,50> White fade_power 2 fade_distance 30}

although you can certainly change the distance.  By the time the light gets to
the lower floor it has faded, but still illuminates the top floor.

 - Ricky


Post a reply to this message

From: sam kim
Subject: Re: Light Source Maximum Brightness?
Date: 15 Feb 2009 00:30:00
Message: <web.4997a84190d0d5967c859cee0@news.povray.org>
"triple_r" <nomail@nomail> wrote:
> "sam kim" <nomail@nomail> wrote:
>
> > light_source {<30,96,50> White}
> > light_source {<30,49,50> White}
>
> The standard model for lights is not physical since it does not take into
> account that light intensity fades with the square of distance.  To fix the
> problem, I changed it to:
>
> light_source {<30,96,50> White fade_power 2 fade_distance 30}
> light_source {<30,49,50> White fade_power 2 fade_distance 30}
>
> although you can certainly change the distance.  By the time the light gets to
> the lower floor it has faded, but still illuminates the top floor.
>
>  - Ricky

This certainly does the job I wanted to darken the part where both light sources

illuminate.

But do you know the answer to my second question?

Is there a way to define maximum amount of brightness of an object?

I guess I'll just have to use diffuse, but I was wondering if I can just

set a cap instead of using things that'll make it darker at a rate.

Thanks for the solution by the way.


Post a reply to this message

From: triple r
Subject: Re: Light Source Maximum Brightness?
Date: 15 Feb 2009 01:05:00
Message: <web.4997afe790d0d596ef2b9ba40@news.povray.org>
"sam kim" <nomail@nomail> wrote:
> This certainly does the job I wanted to darken the part where both light sources
>
> illuminate.
>
> But do you know the answer to my second question?
>
> Is there a way to define maximum amount of brightness of an object?
>
> I guess I'll just have to use diffuse, but I was wondering if I can just
>
> set a cap instead of using things that'll make it darker at a rate.
>
> Thanks for the solution by the way.

I do not know.  Two alternatives would be to add an ambient finish to brighten
the shadows and require less light, or use radiosity to bleed the colors
together a little.  You could also just move the lights a little farther from
the wall so you don't get such a spike in brightness.  As I said though, I
don't happen to know that it's not possible, but neither am I aware that it is.

 - Ricky


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Light Source Maximum Brightness?
Date: 15 Feb 2009 14:35:21
Message: <49986e79$1@news.povray.org>
sam kim wrote:

> But do you know the answer to my second question?
> 
> Is there a way to define maximum amount of brightness of an object?

Actually you didn't ask two questions, you said you wanted to cap
the brightness "so that" you could get rid of the problem with the
doubly illuminated area. triple_r gave you the physically correct
way to solve that problem instead. So, is there another reason
you want to cap the brightness to some absolute value? Likely
there is a better solution for whatever you wish to achieve.


Post a reply to this message

From: sam kim
Subject: Re: Light Source Maximum Brightness?
Date: 15 Feb 2009 22:55:00
Message: <web.4998e31390d0d5967c859cee0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> sam kim wrote:
>
> > But do you know the answer to my second question?
> >
> > Is there a way to define maximum amount of brightness of an object?
>
> Actually you didn't ask two questions, you said you wanted to cap
> the brightness "so that" you could get rid of the problem with the
> doubly illuminated area. triple_r gave you the physically correct
> way to solve that problem instead. So, is there another reason
> you want to cap the brightness to some absolute value? Likely
> there is a better solution for whatever you wish to achieve.

Well there was one question literally.

Triple_r's answer was sufficient, but I am still curious

if there's a way to define it. I guess not..


Post a reply to this message

From: Alain
Subject: Re: Light Source Maximum Brightness?
Date: 16 Feb 2009 13:40:10
Message: <4999b30a$1@news.povray.org>
sam kim nous illumina en ce 2009-02-14 17:54 -->
> Hello,
> 
> I have two light_sources for each floor in a 2-story building.
> 
> I want to set a maximum illumination number (so an area that receives amount of
> 
> light past this number will not be brighter than this number) so that
> 
> the area of the building that receives light from both light_sources will not be
> 
> so bright compared to rest of the building.
> 
> Here's the code:
> 
> #include "colors.inc"
> 
> 
> light_source {<30,96,50> White}
> light_source {<30,49,50> White}
> 
> camera {location <50,90,-100> look_at <50,50,20>}
> 
> background {White}
> 
> //////////////// radiosity ////////////////////
>  /*
>   global_settings {
>     radiosity {
>       pretrace_start 0.08
>       pretrace_end   0.01
>       count 100
> 
>       nearest_count 5
>       error_bound 1
>       recursion_limit 1
> 
>       low_error_factor 0.5
>       gray_threshold 0.0
>       minimum_reuse 0.015
>       brightness .5
> 
>       adc_bailout 0.01/2
>     }
>   }   */
> 
> ////////////////////////////////////////// two - floor Building
> /////////////////////////////////////////
> 
>                /// main frame///
> #declare Main_Frame =
> 
> difference{
> 
> box {<0,0,0><100,100,100>}
> 
> box {<3,3,3><97,97,97>}
> 
> }
> 
>             /// floor separator  or just 2nd floor///
> 
> #declare Second =
> 
> difference {
> 
> box {<0,50,0><100,53,100>}
> 
> box {<50,49,100/3><90,54,90>}
> 
> }
> 
>           ///////// Main Frame + 2nd Floor /////////
> 
> #declare Building =
> 
> merge {object{Main_Frame} object{Second}}
> 
>           ////////// Cross Section of the Building ///////////
> 
> difference {
> 
> object{Building}
> 
> box {<-1,-1,-1><101,101,4>}
> 
> texture { finish {ambient .5}
> pigment {color Gray75} }
> 
> }
> 
> 
> 
As you use radiosity, you should set ambient to zero UNLESS you want that part 
of the scene to actualy emit light.

Use fade_distance <some distance> and fade_power 2 to get realistic light fading 
acording to the distance. By default, ther is no fading.

As this is a radiosity scene, you can limit the maximum contribution to 
radiosity effects.
For that, you use the "max_sample" key word. Objects that are brighter than the 
specified value get ther brightness reduced to the provided value keeping the 
original hue. Please read the radiosity section in the documentation.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you've ever "lost" a Julia fractal 
because you're not quite sure how to align things in four dimensions.
Dylan Beattie


Post a reply to this message

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