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 252 253 254 255 256 257 258 259
|
// Persistence of Vision Ray Tracer Scene Description File
// File: im_lights.pov
// Vers: 3.6 / 3.7
// Desc: Lights previews for Insert Menu
// Date: August 2001
// Auth: Bob Hughes
// modified Aug. 25 by Christoph Hormann
// Updated to 3.7 by Friedrich A. Lohmueller, June-2012.
// +w120 +h60 +a0.2 +r2 +am2 +j0.5
#version 3.7;
global_settings{ assumed_gamma 1.0 }
/*
#declare Typ=1; // point source
#declare Typ=2; // area light
#declare Typ=3; // cylindrical light
#declare Typ=4; // spotlight
#declare Typ=5; // parallel
#declare Typ=6; // fading
#declare Typ=7; // looks like
#declare Typ=8; // light group
#declare Typ=9; // projected through
*/
#declare LightS=Typ-1;
camera
{
location <0,6,-6>
right x*image_width/image_height
look_at 1
}
#declare Floor=
plane
{
y,-0.001
pigment {rgb 1}
}
#if (LightS!=7)
Floor
#end
#declare CSG1=
difference
{
box {0,2}
sphere {1,1.5 inverse}
sphere {1,1.25}
translate -1 // center on world origin
}
#declare CSG2=
difference
{
box {0,2}
sphere {1,1.25 inverse}
translate -1 // center on world origin
}
#if (LightS!=8)
#if (LightS!=6)
object
{
CSG1
pigment {rgb 1}
translate <2.75,1,1>
}
#end
object
{
CSG2
pigment {rgb 1}
translate <-0.75,1,1>
}
#end
#declare CSG0=
object
{
CSG1
pigment {rgb 1}
translate <2.75,1,1>
}
#declare CSG3=
object
{
CSG1
translate <5,10,-5>
}
#declare CSGs=
union
{
object
{
CSG1
translate <2.75,1,1>
}
object
{
CSG2
translate <-0.75,1,1>
}
}
#switch (LightS)
#case (0)
// point light
light_source
{
0,1.5
translate <10, 20, -10> // <x y z> position of light
}
#break
#case (1)
// An area light (creates soft shadows)
// WARNING: This special light can significantly slow down rendering times!
light_source
{
0*x // light's position (translated below)
color rgb 1.5 // light's color
area_light
<6, 0, 0> <0, 0, 6> // lights spread out across this distance (x * z)
6, 6 // total number of lights in grid (4x*4z = 16 lights)
adaptive 2 // 0,1,2,3...
jitter // adds random softening of light
circular // make the shape of the light circular
orient // orient light
translate <10, 20, -10> // <x y z> position of light
}
#break
#case (2)
// create a point "spotlight" (cylindrical directed) light source
light_source
{
0*x // light's position (translated below)
color rgb 1.5 // light's color
spotlight // this kind of light source
cylinder // this variation
translate <10, 20, -10> // <x y z> position of light
point_at <0, 1, 1> // direction of spotlight
radius 20 // hotspot (inner, in degrees)
tightness 10 // tightness of falloff (1...100) lower is softer, higher is tighter
falloff 30 // intensity falloff radius (outer, in degrees)
}
#break
#case (3)
// create a point "spotlight" (conical directed) light source
light_source
{
0*x // light's position (translated below)
color rgb 1.5 // light's color
spotlight // this kind of light source
translate <10, 20, -10> // <x y z> position of light
point_at <0, 1, 1> // direction of spotlight
radius 5 // hotspot (inner, in degrees)
tightness 10 // tightness of falloff (1...100) lower is softer, higher is tighter
falloff 10 // intensity falloff radius (outer, in degrees)
}
#break
#case (4)
light_source
{
0,1.5
translate <10, 20, -10> // <x y z> position of light
// put this inside a light_source to make it parallel
parallel
point_at <0, 1, 1>
}
#break
#case (5)
light_source
{
0,1.5
translate <10, 20, -10> // <x y z> position of light
// put this inside a light_source to add light fading
fade_distance 20
fade_power 3
}
#break
#case (6)
light_source
{
<2.75, 1, 1>,1.5
// put this inside a light_source to give it a visible appearance
looks_like { object {CSG1 pigment {rgbf <1,1,1,0.75>}}}
}
#break
#case (7)
// a light group makes certain light sources
// influence specific objects
light_group
{
light_source // light source(s) of this group
{
0,1.5
translate <10, 20, -10> // <x y z> position of light
}
object
{
Floor // objects illuminated by those light sources
}
object
{
CSG0 // objects illuminated by those light sources
}
//global_lights // add this to make all global lights
// also illuminating this light group
}
#break
#case (8)
light_source
{
0,1.5
translate <10, 20, -10> // <x y z> position of light
// put this inside a light_source to give the light beam
// the shape of the object
projected_through { object { CSGs } }
}
#break
#end
|