Notifications
Clear all

[Closed] Spotlight angle

I can’t figure out the math behind the spotlight aspect. I’m trying to create a spotlight that’s exactly in the shape of the camera. So I’m 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 can’t 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

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