Notifications
Clear all
[Closed] Spotlight angle
Feb 10, 2013 7:58 pm
I cant figure out the math behind the spotlight aspect. Im trying to create a spotlight thats exactly in the shape of the camera. So Im setting it to rectangle and setting the aspect to renderwidth/renderheight.
By changing the aspect ratio in the spotlight it effectively changes/offsets the angle of the spotlight…so I cant figure out how to match the angle after setting the aspect…except matching it by eye…
Does anyone have an answer to this?
1 Reply
Feb 10, 2013 7:58 pm
I think i figured it out… was a pain in the ass though
fov=$Camera001.fov/2
aspect=renderwidth as float/renderheight/2
dist=aspect/(tan fov)
$Fspot001.aspect=aspect*2
$Fspot001.hotspot=atan(aspect/(dist*((aspect*2)^(1./2.))))*2