|
|
Hi,
I've get the sample-scene 'woodbox.pov' of POV-Ray and added some
radiosity.
The rendering time was 0:44 h on a PIII XEON 550 with MegaPOV 0.3.
Here is the source of 'woodbox2.pov':
--------------------------------------------------------------------
// woodbox2.pov
// MegaPOV 0.x scene file. Changes by Paul Blaszczyk at 13-Jan-2000
// POV-Ray 3.1 scene file by Dan Farmer
// Copyright POV-Team, 1995
// Demonstrates some of the woods.inc textures.
// Several wooden spheres (and one glass one), in and around
// a wooden box.
//---Macro for light-spectrum---// Created by Nathan Kopp
#macro create_spectrum(nelems,bright)
#local elem=1;
color_map{
#while(elem<=nelems)
/* h goes from 0 at red end to 1.0 at blue end */
#local h = (elem-1)/(nelems-1);
/* co-h goes from 1.0 at red end to 0.0 at blue end */
#local coh = 1.0 - h;
#local Huered = 0.9 - (h/0.45);
#local Hueblue = 1.0 - (coh/0.6);
#if (Huered < 0.0) #local Huered = 0.0; #end
#if (Hueblue < 0.0) #local Hueblue = 0.0; #end
#local Huered=1.0 - (1.0-Huered)*(1.0-Huered);
#local Hueblue=1.0 - (1.0-Hueblue)*(1.0-Hueblue);
#local Huegreen = 1.0 - Huered - Hueblue;
#if (h>0.85)
#local Huered = 4*(h-0.85); // was 4 - changed to 8
#end
#local ybulge = -4.0*(h-0.1)*(h-0.6);
#if (ybulge<0) #local ybulge=0; #end
#local Huered = Huered+ybulge;// * 0.5; // added * 0.5
#local Huegreen = Huegreen+ybulge;
[bright, color rgb<Huered,Huegreen,Hueblue>]
//#debug
concat("<",str(Huered,0,3),",",str(Huegreen,0,3),",",str(Hueblue,0,3),">\n")
#local elem=elem+1;
#end // while
}
#end // macro
#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"
#include "metals.inc"
#include "glass.inc"
#include "woods.inc"
global_settings {
ini_option "+QR"
ini_option "Preview_Start_Size=16"
ini_option "Preview_End_Size=4"
radiosity{
count 150
brightness 1
recursion_limit 4
max_sample 1
error_bound 1.5
low_error_factor .6
gray_threshold 0.0
minimum_reuse 0.015
nearest_count 5
}
#declare phd=0.75;
photons {
gather 20,160
radius .05*phd*sqrt(20)*3/2,2,0
expand_thresholds .2,30
//save_file "woodbox.ph"
//load_file "woodbox.ph"
}
}
camera {
location <-5, 10, -15>
direction <0, 0, 2.0>
right x*1.33
look_at <-0.5,0.2,0>
}
// Uncomment the area lights only if you've got lots of time.
#declare Dist=80.0;
light_source {< -50, 25, -50> color White
fade_distance Dist fade_power 2
create_spectrum (16,0.2)
area_light <-15, 0, -10>, <15, 0, 10>, 13,13
adaptive 0
}
sky_sphere {
pigment {
gradient y
color_map {
[0, 1 color rgb <0.2,0.5,0.8> color rgb <0.4,0.65,1.0> ]
}
}
}
#declare M_Wood18B =
colour_map {
[0.00 0.25 color rgbf < 0.50, 0.26, 0.12, 0.10>
color rgbf < 0.54, 0.29, 0.13, 0.20>]
[0.25 0.40 color rgbf < 0.54, 0.29, 0.13, 0.20>
color rgbf < 0.55, 0.28, 0.10, 0.70>]
[0.40 0.50 color rgbf < 0.55, 0.28, 0.10, 0.70>
color rgbf < 0.50, 0.23, 0.15, 0.95>]
[0.50 0.70 color rgbf < 0.50, 0.23, 0.15, 0.95>
color rgbf < 0.56, 0.29, 0.17, 0.70>]
[0.70 0.98 color rgbf < 0.56, 0.29, 0.17, 0.70>
color rgbf < 0.54, 0.29, 0.13, 0.20>]
[0.98 1.00 color rgbf < 0.54, 0.29, 0.13, 0.20>
color rgbf < 0.50, 0.26, 0.12, 0.10>]
}
#declare Floor_Texture =
texture { pigment { P_WoodGrain18A color_map { M_Wood18A }}}
texture { pigment { P_WoodGrain12A color_map { M_Wood18B }}}
texture {
pigment { P_WoodGrain12B color_map { M_Wood18B }}
finish { reflection 0.2 reflect_metallic 0.2}
}
#declare Floor =
plane { y,0
texture { Floor_Texture
scale 0.5
rotate y*90
rotate <10, 0, 15>
translate z*4
}
}
#declare T0 = texture { T_Wood19 }
#declare T =
texture { T0
finish { specular 0.50 roughness 0.1 ambient 0.0 diffuse 0.9}
}
#declare T1 = texture { T translate x*10 rotate <0, 87, 0> }
#declare T2 = texture { T translate y*10 rotate <0, 1, 0> }
#declare T3 = texture { T translate -x*10 rotate <0, 88, 0> translate
z*100}
#declare Front_Panel =
box { <-3.75, 0.00, -0.5>,
< 3.75, 1.75, 0.0> }
#declare Front_Top_Edge =
cylinder { <-3.75, 1.75, 0.0>,
< 3.75, 1.75, 0.0>, 0.5 }
#declare Front_Right_Edge =
cylinder { < 3.75, 0.00, 0.0>,
< 3.75, 1.75, 0.0>, 0.5 }
#declare Front_Left_Edge =
cylinder { <-3.75, 0.00, 0.0>,
<-3.75, 1.75, 0.0>, 0.5 }
#declare Front_UL_Corner = sphere { <-3.75, 1.75, 0.0>, 0.5 }
#declare Front_UR_Corner = sphere { < 3.75, 1.75, 0.0>, 0.5 }
#declare Left_Panel = box { <-0.50, 0, -2.75>, <0.50, 1.75, 2.75> }
#declare Left_Top_Edge = cylinder { <0, 1.75, -2.75>, <0, 1.75, 2.75>,
0.5 }
#declare Left_End =
intersection {
union {
object { Left_Panel }
object { Left_Top_Edge }
}
plane { x, 0 }
texture { T2 }
bounded_by { box { <-0.501, 0.01, -3.251>, <0.01, 2.251, 3.251> } }
}
#declare Box_Front =
intersection {
union {
object { Front_Panel }
object { Front_Top_Edge }
object { Front_Left_Edge }
object { Front_Right_Edge }
object { Front_UL_Corner }
object { Front_UR_Corner }
}
plane { z, 0 }
texture { T1}
bounded_by { box { <-4.251, 0.01, -0.51>, <4.251, 2.251, 0.01> }}
}
#declare Box_Bottom = box {<-3.75, 0.0, -2.75> <3.75, 0.25, 2.75>
texture {T3} }
#declare Box_Lid = box {<-3.75, 0.0, -2.75> <3.75, 0.25, 2.75>
translate -2.75*z // put "hinge" at origin
rotate x*25 // open the lid
translate 2.75*z // move "hinge" back
translate y*2 // lift to top
texture {T3}
}
#declare Box =
union {
object { Box_Front translate -z*2.75}
object { Box_Front scale <1,1,-1> translate z*2.75}
object { Left_End translate -x*3.75 }
object { Left_End scale <-1,1,1> translate x*3.75 }
object { Box_Lid }
object { Box_Bottom }
}
#declare Spheres =
union {
// Inside of box
sphere { <1.5, 1.5, -0.75>, 1.25
texture {
T_Wood14
finish { specular 0.35 roughness 0.05 ambient 0.0 diffuse
0.9}
translate x*1
rotate <15, 10, 0>
translate y*2
}
}
// Inside of box
sphere { <-1.5, 1.25, 0.5>, 1
texture { T_Wood18
finish { specular 0.25 roughness 0.025 ambient 0.0 diffuse
0.9}
scale 0.33
translate x*1
rotate <10, 20, 30>
translate y*10
}
}
// Inside of box
sphere { <-0.75, 1.0, -1.5>, 0.75
texture { T_Wood10
finish { specular 0.5 roughness 0.005 ambient 0.0 diffuse
0.9}
translate x*1
rotate <30, 10, 20>
}
}
// Outside of box
sphere { <-0.75, 0.75, -4.25>, 0.75
texture { T_Wood4
finish { specular 0.25 roughness 0.015 ambient 0.0 diffuse
0.9}
}
}
// Outside of box
sphere { <-2.25, 0.45, -4.5>, 0.45
texture { T_Wood20
finish { specular 0.15 roughness 0.15 ambient 0.0 diffuse
0.9}
rotate <45, 10, 45>
translate x*10
}
}
// Outside of box
sphere { <-5.5, 0.95, 1.0>, 0.95
texture {
pigment { rgb <1,1,1,0.9> }
finish{
ambient 0.0
diffuse 0.9
specular 1.0
roughness 0.0004
phong_size 100
phong 0.5
brilliance 8
reflection 0.24
reflect_metallic 1.0
irid { 0.2 thickness 0.2 turbulence 0.1 }
}
}
interior { I_Glass dispersion 1.1 ior 1.47 refraction 0.96
fade_distance 40 fade_power 2}
photons { separation 0.03 refraction on reflection off
ignore_photons }
}
// Outside of box
sphere { <-5.00, 0.75, -2.0>, 0.75
texture { T_Copper_2B
finish { ambient 0.0 diffuse 0.9
reflection 0.4 brilliance 3.5 reflect_metallic 1.0
//reflection_blur .04 reflection_samples 6
}
}
}
// Outside of box
sphere { <-1.75, 0.40, -5.4>, 0.40
texture { T_Brass_3B
finish { ambient 0.0 diffuse 0.9
reflection 0.4 brilliance 4 reflect_metallic 1.0
reflection_blur .08 reflection_samples 6 }
}
}
}
union {
object { Floor }
object { Box }
object { Spheres }
rotate -y*35
}
Post a reply to this message
Attachments:
Download 'woodbox2.jpg' (164 KB)
Preview of image 'woodbox2.jpg'
|
|