OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Jffsieg on 07 Apr 2007, 00:07:22

Title: Camera focusing
Post by: Jffsieg on 07 Apr 2007, 00:07:22
Ok, what I need to know is if you can focus your camera on someone while everything else it blurred.  Is it even possible?
Title: Re: Camera focusing
Post by: Cheetah on 07 Apr 2007, 00:11:35
You're probably looking for one of these:

camPrepareFocus (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=c#camPrepareFocus)
and/or
camSetFocus (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=c#camSetFocus)

I don't know what it exactly blurs, can't say that after reading the description, but I'm sure that you can work it out after some trail-and-error.
Title: Re: Camera focusing
Post by: Jffsieg on 07 Apr 2007, 00:19:10
Nope, I dont think it blurs anything, unless it takes a long time.  Any other suggestions?
Title: Re: Camera focusing
Post by: Cheetah on 07 Apr 2007, 01:04:13
Damn, it sounds easy, but there is something preventing me from getting it working. I tried _a lot_ of values for the distance and blur, but nothing seemed to work. I guess there is something I forgot which prevents this from working.
Title: Re: Camera focusing
Post by: nominesine on 10 Apr 2007, 01:16:05
It's done in the beginning of the campaign. Check the intro script that comes with the first campaign mission (sharp soldiers, blurred background). I intend to open it up next weekend, but if you run out of patience that's where you'll find a solution.

ArmA cameras seems to be on a constant auto focus by default. If something passes the line of sight of the camera, it will adjust it's focus to the nearest target, closest to the central viewpoint of the lens - just as a real camera does.

I'm guessing here, but I would say that [50,1] from the script example in the comref refers to the distance where either the focus or the blur will be set to 100% (1 being 100%, since BIS is fond of scales ranging from 0 to 1 in almost all other commands, such as fadeSound and fadeMusic). The focus seems most likely, since the blur should appear at closer range as well as longer ranges than the selected focal point, while there is only one focus.

Will try this as soon as I have any testing opportunities. Supposedly, the changes doesn't occur until the camCommit X command is given.

EDIT: spelling

Title: Re: Camera focusing
Post by: Jffsieg on 12 May 2007, 03:53:10
I still cant seem to get it to blur up.  I want the soldiers face to be clear but everything else blured, or smudged.
Title: Re: Camera focusing
Post by: Mr.Peanut on 12 May 2007, 04:03:38
Rub vaseline on your monitor.
Title: Re: Camera focusing
Post by: Jffsieg on 12 May 2007, 04:04:31
didnt work either ;)