Page 1 of 1

How to calculate blur?

Posted: February 6th, 2020, 2:35 pm
by davidlamhauge
Hi Jonathan,
I'm a member of the small team that develop and maintain the open source software Pencil2D. It is a software for traditional, hand drawn 2D animation.
Currently I'm working on the camera in Pencil2D, which is not working too good. You can do some camera zoom, pan and tilt, but no depth. No blur.
I want it to be possible to define distances to the different layers in Pencil2D, and the camera should have settings for distance and aperture.
If I have a scene with a person 2 metres from the camera and a person 10 metres away, and the camera set to 10 metres, then the first person should be blurred and the second should be sharp.
If I then make a change on the camera, so distance setting goes from 10 to 2 metres, and it takes two seconds, then the transition from blurred to sharp (and vice versa) should be smooth. For this I need some equations...
I can see that your app has a value for blur, that changes when I change distance. How is this blur calculated?
Can you tell me how you calculate blur, or where I can find the equations?
It would mean a lot to me.
Thanks!
David Lamhauge

Re: How to calculate blur?

Posted: March 15th, 2020, 10:37 am
by jsachs

Re: How to calculate blur?

Posted: March 16th, 2020, 1:46 am
by davidlamhauge
Thank you very much!
I guess I'll be an expert, when I've read that book.