views:

491

answers:

1

Using Flash CS4 how can I create a function that will replicate the affects of different aperture settings on a camera. I want the user to be able to click on different 'focal points' of their picture and see how the aperture/depth of field would change depending on which focal point is in focus. In essence I want the blurring affect to move depending on where they click.

Also I was curious if anyone knows how to create a slider bar that would create the blurring affect of a low aperture on a camera. I am writing this program for my high school students to use in class - when they take a picture they upload it and look at what different apertures would do to their picture.

A: 

There aren't enough parameters on the Flash BlurFilter to simulate a camera aperture perfectly, but by manipluating the blurX and blurY you can generate varying amounts of blur. Set both to the same number, and use larger numbers for smaller apertures.

There's no set formula to determine the correct blurX and blurY, because it depends on too many variables. The lens parameters and the distance out of focus in the picture both need to be known to generate any kind of approximation. I would take a few real world pictures at different apertures, then adjust the blur parameters to generate the look that is closest to the real pictures.

Mark Ransom
thanks mark for the help
Scott Bartholomew