|
![](/i/fill.gif) |
#version unofficial megapov 0.5;
/* This scene produces image that, with Display_Gamma 2.2, matches
the image of the Cornell box available at
http://www.graphics.cornell.edu/online/box/box.jpg. It was
rendered using some fancy software. POV-Ray renders
the scene at 300x300 in 1 minute with AMD 400MHz.
The radiosity settings are not critical for realistic results.
More important are assumed_gamma, fade_power, fade_distance and
light source intensity distribution (spotlight). You can see this
for yourself by removing the lines marked IMPORTANT. You will find
that it is absolutely impossible to get even close to the reference
image without those statements. For this reason I present the recipe
for realistic radiosity scenes:
1. Use assumed_gamma 1.0 and set Display_Gamma in povray.ini
to a value that you measured using a test image. Adjust
monitor brightness and contrast using
http://hammer.prohosting.com/~kkivisal/adjust.gif
2. Use fade_power 2 and try 1.4*light_source_diameter as the
value for fade_distance first. Don't set it too high though.
3. If the light source is a flat panel use
spotlight radius 1 falloff 90 tightness -0.8.
For other shapes you'll have to improvise. Remember that large area_lights
don't produce correct direct llumination, you'll have to use several
area_lights or point sources instead to cover the area.
Tips.
If the shadows are too bright multiply light source colors by a factor
and divide diffuse by the same factor. Do the inverse if there is not
enough diffused light. Generally low diffuse values are more realistic,
try 0.5 first.
If you extract a color from an image or from some color selector remember
to inverse gamma correct it ( pow(color.x,Display_Gamma) ) before using it
in a scene file. This way the color looks more or less the same. The same
goes for image maps also. In PSP for example set gamma to 1/Display_Gamma.
Scene geometry from Cornell data by alb### [at] wanadoo fr.
June 11 2000 kar### [at] kivisalo net
http://www.kivisalo.net
*/
$Q=1;
global_settings{
assumed_gamma 1.0 // IMPORTANT, set also Display_Gamma in povray.ini
ini_option "+qr"
radiosity{
pretrace_start 0.04
pretrace_end 0.02/Q
count 150*Q
recursion_limit 4
nearest_count 3+(Q-1)*10
error_bound 1/Q
}
}
#declare Finish=finish{diffuse 0.75 brilliance 0.5 ambient 0}
#declare White=texture{pigment{rgb<1,1,1>} finish{Finish}}
#declare Red=texture{pigment{rgb<0.565,0,0>} finish{Finish}}
#declare Green=texture{pigment{rgb<0.02,0.236,0.002>} finish{Finish}}
/*
* light patch
* Spotlight used to simulate cos(angle) intensity falloff of
* planar light source (area_light only takes care of the shadows).
*/
light_source {
<27.8,54.88,27.95>
color <1,0.673,0.19>*2.81
area_light <13.0, 0, 0>, <0, 0, 10.5>, 10, 10 adaptive 0
/* -----------------IMPORTANT--------------------------- */
spotlight radius 1 falloff 90 tightness -0.8 point_at 55/2
fade_power 2 fade_distance (13+10.5)/2*1.4
/* ----------------------------------------------------- */
}
box{
<21.3,54.87,33.2><34.3,54.88,22.7> no_shadow
pigment{rgb<1,1,1>} finish{ambient 1 diffuse 0}
}
// ------------------------ OBJECTS ----------------------------
camera{
location <27.8, 27.3,-80.0>
direction <0, 0, 1>
up <0, 1, 0>
right <-1, 0, 0>
angle 39.5
}
union {
/*
* floor
*/
triangle {
<55.28, 0.0, 0.0>,
<0.0, 0.0, 0.0>,
<0.0, 0.0, 55.92>
}
triangle {
<55.28, 0.0, 0.0>,
<0.0, 0.0, 55.92>,
<54.96, 0.0, 55.92>
}
/*
* ceiling
*/
triangle {
<55.60, 54.88, 0.0>,
<55.60, 54.88, 55.92>,
<0.0, 54.88, 55.92>
}
triangle {
<55.60, 54.88, 0.0>,
<0.0, 54.88, 55.92>,
<0.0, 54.88, 0.0>
}
/*
* back wall
*/
triangle {
<0.0, 54.88, 55.92>,
<55.60, 54.88, 55.92>,
<54.96, 0.0, 55.92>
}
triangle {
<0.0, 54.88, 55.92>,
<54.96, 0.0, 55.92>,
<0.0, 0.0, 55.92>
}
texture {White}
}
union {
/*
* right wall
*/
triangle {
<0.0, 54.88, 0.0>,
<0.0, 54.88, 55.92>,
<0.0, 0.0, 55.92>
}
triangle {
<0.0, 54.88, 0.0>,
<0.0, 0.0, 55.92>,
<0.0, 0.0, 0.0>
}
texture {Green}
}
union {
/*
* left wall
*/
triangle {
<55.28, 0.0, 0.0>,
<54.96, 0.0, 55.92>,
<55.60, 54.88, 55.92>
}
triangle {
<55.28, 0.0, 0.0>,
<55.60, 54.88, 55.92>,
<55.60, 54.88, 0.0>
}
texture {Red}
}
union {
/*
* short block
*/
triangle {
<13.00, 16.50, 6.50>,
<8.20, 16.50, 22.50>,
<24.00, 16.50, 27.20>
}
triangle {
<13.00, 16.50, 6.50>,
<24.00, 16.50, 27.20>,
<29.00, 16.50, 11.40>
}
triangle {
<29.00, 0.0, 11.40>,
<29.00, 16.50, 11.40>,
<24.00, 16.50, 27.20>
}
triangle {
<29.00, 0.0, 11.40>,
<24.00, 16.50, 27.20>,
<24.00, 0.0, 27.20>
}
triangle {
<13.00, 0.0, 6.50>,
<13.00, 16.50, 6.50>,
<29.00, 16.50, 11.40>
}
triangle {
<13.00, 0.0, 6.50>,
<29.00, 16.50, 11.40>,
<29.00, 0.0, 11.40>
}
triangle {
<8.20, 0.0, 22.50>,
<8.20, 16.50, 22.50>,
<13.00, 16.50, 6.50>
}
triangle {
<8.20, 0.0, 22.50>,
<13.00, 16.50, 6.50>,
<13.00, 0.0, 6.50>
}
triangle {
<24.00, 0.0, 27.20>,
<24.00, 16.50, 27.20>,
<8.20, 16.50, 22.50>
}
triangle {
<24.00, 0.0, 27.20>,
<8.20, 16.50, 22.50>,
<8.20, 0.0, 22.50>
}
texture { White }
}
union {
/*
* tall block
*/
triangle {
<42.30, 33.00, 24.70>,
<26.50, 33.00, 29.60>,
<31.40, 33.00, 45.60>
}
triangle {
<42.30, 33.00, 24.70>,
<31.40, 33.00, 45.60>,
<47.20 33.00 40.60>
}
triangle {
<42.30, 0.0, 24.70>,
<42.30, 33.00, 24.70>,
<47.20, 33.00, 40.60>
}
triangle {
<42.30, 0.0, 24.70>,
<47.20, 33.00, 40.60>,
<47.20, 0.0, 40.60>
}
triangle {
<47.20, 0.0, 40.60>,
<47.20, 33.00, 40.60>,
<31.40, 33.00, 45.60>
}
triangle {
<47.20, 0.0, 40.60>,
<31.40, 33.00, 45.60>,
<31.40, 0.0 45.60>
}
triangle {
<31.40, 0.0, 45.60>,
<31.40, 33.00, 45.60>,
<26.50, 33.00, 29.60>
}
triangle {
<31.40, 0.0, 45.60>,
<26.50, 33.00, 29.60>,
<26.50, 0.0, 29.60>
}
triangle {
<26.50, 0.0, 29.60>,
<26.50, 33.00, 29.60>,
<42.30, 33.00, 24.70>
}
triangle {
<26.50, 0.0, 29.60>,
<42.30, 33.00, 24.70>,
<42.30, 0.0, 24.70>
}
texture {White}
}
_______________________________________________________________________
Kari Kivisalo www.kivisalo.net
Post a reply to this message
|
![](/i/fill.gif) |