|
![](/i/fill.gif) |
> An area light with projected_through should work. You just need to make
> sure the area light is far enough away from the projected_through rectangle
> to get the amount of softness you want.
I've thown together a quick macro and scene to demonstrate this below. The
radius and falloff angles work the same as for spotlights, however, the
tightness parameter cannot be duplicated.
//START
global_settings {ambient_light 1}
camera{
up y*image_height
right x*image_width
angle 60
location <0,30,-30>
look_at <0,0,0>
}
#macro RecAreaLight(SIZ,GSIZ,RADIUS,FALLOFF)
#local
ASIZ=SIZ*(tan(radians(FALLOFF))-tan(radians(RADIUS)))/(tan(radians(FALLOFF))+tan(radians(RADIUS)));
#local DIST=(SIZ.x+ASIZ.x)/(2*tan(radians(FALLOFF)));
area_light
<ASIZ.x, 0, 0> <0, 0, ASIZ.y>
GSIZ.x,GSIZ.y
adaptive 1
jitter
translate y*DIST
projected_through{box{-<SIZ.x,0,SIZ.y>/2,<SIZ.x,0,SIZ.y>/2}}
#end
#declare P=<4,6>; //light size
#declare G=<4,4>; //area light grid size
#declare RA=30; //radius angle
#declare FA=45; //falloff angle
light_source{
0
rgb 2
fade_power 1
fade_distance 5
RecAreaLight(P,G,RA,FA)
looks_like{box{-<P.x,0,P.y>/2,<P.x,0,P.y>/2} pigment{rgb 1} finish{ambient
1 diffuse 1}}
rotate x*30
rotate y*90
translate y*5
}
plane{y,0 pigment{rgb 1}}
sphere{y*2,2 pigment{rgb 1}}
//END
-tgq
Post a reply to this message
|
![](/i/fill.gif) |