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
|
// This work is licensed under the Creative Commons Attribution 3.0 Unported License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/
// or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View,
// California, 94041, USA.
// Persistence Of Vision raytracer sample file.
// Illustrates how area light grid size affects soft shadows
//
// -w320 -h240
// -w800 -h600 +a0.3
// Left shadow - area_light <8,0,0>, <0,0,8>, 3, 3 (renders fastest)
// Middle shadow - area_light <8,0,0>, <0,0,8>, 5, 5
// Right shadow - area_light <8,0,0>, <0,0,8>, 17, 17 (renders slowest)
#version 3.7;
global_settings {
assumed_gamma 1
}
#include "colors.inc"
#include "textures.inc"
// A back wall to cast shadows onto
plane { -z, -20
pigment { Black }
finish { Dull }
}
#declare SpacingX = 20;
#declare Radius = 5;
#declare LightX = 15;
#declare LightY = 40;
#declare LightZ = -40;
#declare SRadius = 0;
#declare SFalloff = 11;
#declare SphereTexture = texture {
pigment { Red }
finish { Shiny }
}
sphere { <-SpacingX, 0, 0>, Radius
texture { SphereTexture }
}
light_source {
<0, LightY, LightZ> color White
area_light <8, 0, 0>, <0, 8, 0>, 3, 3
adaptive 0
jitter
spotlight
point_at <-SpacingX, 0, 0>
tightness 0
radius SRadius
falloff SFalloff
}
sphere { <0, 0, 0>, Radius
texture { SphereTexture }
}
light_source {
<0, LightY, LightZ> color White
area_light <8, 0, 0>, <0, 8, 0>, 5, 5
adaptive 0
jitter
spotlight
point_at <0, 0, 0>
tightness 0
radius SRadius
falloff SFalloff
}
sphere { <+SpacingX, 0, 0>, Radius
texture { SphereTexture }
}
light_source {
<0, LightY, LightZ> color White
area_light <8, 0, 0>, <0, 8, 0>, 17, 17
adaptive 0
jitter
spotlight
point_at <+SpacingX, 0, 0>
tightness 0
radius SRadius
falloff SFalloff
}
light_source { <0, -15, -120> color Gray10 }
camera {
location <0, -15, -120>
right x*image_width/image_height
angle 35 // direction 2*z
look_at <0, -15, 0>
}
|