1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
|
// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
// Persistence of Vision Raytracer Scene Description File
// File: diffuse_back.pov
// Author: Christoph Lipka
// Description: Demonstrates diffuse backside illumination
//
// -w640 -h480
// -w800 -h600 +a0.3
//
// Warning: this will take time!
#version 3.7;
#declare Photons=on;
#declare Radiosity=on;
global_settings {
max_trace_level 25
assumed_gamma 2.2
#if (Photons)
photons {
count 100000
}
#end
#if (Radiosity)
radiosity {
pretrace_start 0.04
pretrace_end 0.005
count 1000
nearest_count 10
error_bound 0.5
recursion_limit 2
low_error_factor .25
gray_threshold 0.0
minimum_reuse 0.002
brightness 1
adc_bailout 0.01/2
always_sample off
}
#end
}
#if (Radiosity)
default {
finish { ambient 0 }
}
#else
default {
finish { ambient 0.2 }
}
#end
// ----------------------------------------
#declare OverallBrightness = 8;
#declare OverallScale = 100;
camera {
right x*image_width/image_height // keep propotions with any aspect ratio
location < 1,1.6,-2.5>*OverallScale
look_at <-2.0,1.2,0>*OverallScale
}
light_source {
vnormalize(<-500,200,-250>)*1000*OverallScale
color rgb 1.3 * OverallBrightness
area_light x*10*OverallScale,y*10*OverallScale, 9,9 adaptive 1 jitter circular orient
photons {
refraction on
reflection on
}
}
sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb <0.6,0.7,1.0>*OverallBrightness*0.5]
[0.7 rgb <0.0,0.1,0.8>*OverallBrightness*0.5]
}
}
}
// ----------------------------------------
plane { y, -10
texture {
pigment { color rgb <1.0, 0.8, 0.6> }
finish { diffuse 0.5 }
}
}
#declare M_SolidWhite= material {
texture {
pigment { rgb 1 }
finish { ambient 0 diffuse 0.8 specular 0.2 reflection { 0.2 } }
}
}
// Room
difference {
box { <-3.1,-1,-4>, <3.1,3.5,4> } // solid block
box { <-3,-0.2,-3>, <3,2.5,3> } // main room cutout
box { <-3.2,0.3,-2>, <2.9,2,2> } // window cutout
texture {
pigment { color rgb <0.9, 0.9, 0.9> }
finish { diffuse 1.0 }
}
scale OverallScale
}
// Window Bars
union {
cylinder { <-3.05,0, 1>, <-3.05,2, 1>, 0.05 }
cylinder { <-3.05,0,-1>, <-3.05,2,-1>, 0.05 }
material { M_SolidWhite }
scale OverallScale
}
// Baseboards
#declare Baseboard = union {
cylinder { <-3,0.1,0>, <3,0.1,0>, 0.025 }
box { <-3,0,0>, <3,0.1,-0.025> }
material { M_SolidWhite }
translate z*3
}
union {
object { Baseboard }
object { Baseboard rotate y*90 }
object { Baseboard rotate y*180 }
object { Baseboard rotate y*270 }
scale OverallScale
}
box { <-3,0,-3>, <3,-0.1,3>
pigment { color rgb <1.0, 0.8, 0.6> }
scale OverallScale
}
// Curtains
#declare M_Curtains= material {
texture {
pigment { rgb <1.0,0.8,0.6> }
finish {
ambient 0
diffuse 0.7,0.2
}
}
}
#declare Curtain= union {
polygon{ 5, <0,0.1,2.0>, <0,0.1,0.1>, <0,2.45,0.1>, <0,2.45,2.0>, <0,0.1,2.0> material { M_Curtains } }
cylinder { <0,0.1,2.025>, <0,0.1,0.075>, 0.025 material { M_SolidWhite } }
cylinder { <0,2.45,2.025>, <0,2.45,0.075>, 0.025 material { M_SolidWhite } }
translate <-2.8,0,0>
material { M_Curtains }
}
union {
object { Curtain }
object { Curtain scale <1,1,-1> }
scale OverallScale
}
// Screen
#declare M_Screen= material {
texture {
pigment { rgbt <1,1,1, 0.01> }
finish {
ambient 0
diffuse 0.55,0.45
specular 0.2
reflection { 0.2 }
}
}
}
#declare Screen = cylinder { <0,0,0>, <0,1.0,0>, 0.5
open
clipped_by { plane { x, 0.1 } }
material { M_Screen }
}
union {
object { Screen rotate y*45 translate <-2.25,0,2> }
object { Screen rotate y*0 translate <-2.25,0,-1.0> }
scale OverallScale
}
// Glass Objects
#declare M_Glass= material {
texture {
pigment {rgbt 1}
finish {
ambient 0.0
diffuse 0.05
specular 0.6
roughness 0.005
reflection {
0.1, 1.0
fresnel on
}
conserve_energy
}
}
interior {
ior 1.5
fade_power 1001
fade_distance 0.9 * 10
fade_color <0.5,0.8,0.6>
}
}
sphere {
<0,1,0>, 1
scale 0.2
translate <-1.8,0,0.5>
material { M_Glass }
photons { // photon block for an object
target 1.0
refraction on
reflection on
}
scale OverallScale
}
cylinder {
<0,0.01,0>, <0,2.5,0>, 1
scale 0.2
translate <-3.05,0.3,0.4>
material { M_Glass }
photons { // photon block for an object
target 1.0
refraction on
reflection on
}
scale OverallScale
}
|