|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |