|
![](/i/fill.gif) |
"TheMightyZog" <Chr### [at] HotPOP com> wrote:
> That is awesome Trevor, thank you very much.
>
> I have been playing with it and seeing how you put it all together for the
> last hour and have learnt a lot from following what you did.
>
> As a complete beginner, having examples to work through is a real help.
>
> It would have taken me years to define the RecAreaLight
>
> Once again thanks
No problem. I enjoy coming up with stuff like this.
As an addendum, you could change the macro to:
#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
translate y*DIST
projected_through{box{-<SIZ.x,0,SIZ.y>/2,<SIZ.x,0,SIZ.y>/2}}
#end
I.e. remove the jitter, adaptive, etc. from the macro itself. That way you
can control it in the light_source instead. Just add the jitter, adaptive
'n', orient and/or circular keywords as needed to each light_source after
invoking the macro.
-tgq
Post a reply to this message
|
![](/i/fill.gif) |