POV-Ray : Newsgroups : povray.general : focal_point Server Time
24 Nov 2024 23:44:33 EST (-0500)
  focal_point (Message 1 to 10 of 17)  
Goto Latest 10 Messages Next 7 Messages >>>
From: Mike Horvath
Subject: focal_point
Date: 8 Nov 2016 18:18:57
Message: <58225d61$1@news.povray.org>
I am trying to add focal_point to this scene (scroll down):

https://commons.wikimedia.org/wiki/File:Camera_focal_length_distance_house_animation.gif

I've replaced the camera with this:

camera
{
	#if (clock = 0)
		orthographic
	#end
	location		CameraLocation
	direction		CameraDirection
	up			CameraUp
	right			CameraRight

	#if (clock != 0)
		focal_point		<0,0,0>
		aperture		0.25 // 0.05 ~ 1.5; // more = more blurring
		blur_samples		25 // 4 ~ 100, more = higher quality; fewer = faster
//		confidence		0.9 // how close to the correct color, 0 ~ 1, default 0.9
//		variance		1/128 //(default) smallest displayable color difference
	#end

	transform {CameraTransform}
}

However, the text on the image disappears. Any idea why?


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: focal_point
Date: 8 Nov 2016 18:22:08
Message: <58225e20$1@news.povray.org>
Should I apply the camera transforms before or after I specify focal_point?

Mike


Post a reply to this message

From: Alain
Subject: Re: focal_point
Date: 8 Nov 2016 18:40:06
Message: <58226256$1@news.povray.org>
Le 16-11-08 à 18:22, Mike Horvath a écrit :
> Should I apply the camera transforms before or after I specify focal_point?
>
> Mike

If you apply your transformation before you set focal_point, it will 
affect the location and direction of the camera only. If you apply it 
after, then, focal_point will be transformes along with everything else.

So, if you want to move/rotate your camera and keep your focal_point 
stationary, set it after the transformation.
If you want the focal_point to remain stationary relative to the camera, 
set it before the transformation.


Post a reply to this message

From: Mike Horvath
Subject: Re: focal_point
Date: 8 Nov 2016 19:23:52
Message: <58226c98$1@news.povray.org>
If I comment out the focal blur stuff, the text returns. I also tried 
lowering the aperture size, but it does not help.

Mike


camera
{
     #if (clock = 0)
         orthographic
     #end
     location        CameraLocation
     direction        CameraDirection
     up            CameraUp
     right            CameraRight
/*
     #if (clock != 0)
         focal_point        <0,0,0>
         aperture        0.25 // 0.05 ~ 1.5; // more = more blurring
         blur_samples        25 // 4 ~ 100, more = higher quality; fewer 
= faster
//        confidence        0.9 // how close to the correct color, 0 ~ 
1, default 0.9
//        variance        1/128 //(default) smallest displayable color 
difference
     #end
*/
     transform {CameraTransform}
}


Post a reply to this message

From: Mike Horvath
Subject: Re: Focal Blur
Date: 8 Nov 2016 23:28:48
Message: <5822a600$1@news.povray.org>
http://wiki.povray.org/content/Reference:Camera#Focal_Blur

The docs say, "The center of the zone of sharpness is specified by the 
focal_point vector. The zone of sharpness is a plane through the 
focal_point and is parallel to the camera. Objects close to this plane 
of focus are in focus and those farther from that plane are more 
blurred. The default value is focal_point<0,0,0>."

How can a plane be parallel to the camera? Can't a plane only be 
perpendicular to a vector?

Also, I don't understand why a plane is used at all. All points 
equidistant from focal_point should form a sphere, don't they?

Mike


Post a reply to this message

From: omniverse
Subject: Re: Focal Blur
Date: 9 Nov 2016 00:30:00
Message: <web.5822b4063d3f48e79c5d6c810@news.povray.org>
Mike Horvath <mik### [at] gmailcom> wrote:
> http://wiki.povray.org/content/Reference:Camera#Focal_Blur
>
> How can a plane be parallel to the camera? Can't a plane only be
> perpendicular to a vector?
>
> Also, I don't understand why a plane is used at all. All points
> equidistant from focal_point should form a sphere, don't they?

Probably parallel in the view sense, every plane forward of the camera view
would be considered parallel.
Someone else would need to answer that second part, but I think the way it works
is to simply use a flat plane like orthographic projection does. Maybe... maybe
not.

I looked at your SDL and the new screen.inc (I renamed mine here screen2.inc to
not mix it up with the old one).

Found that by using aperture 0.01 to focus the blurring while testing, and using
the camera location instead of <0,0,0> I could get a look at the text again by
adding a little z to it.
Of course, it blurs away immediately after clock increases away from 0.

     focal_point     CameraLocation+z*0.4

If 0.3 or 0.5 is used the text blurs out, so obviously there's a very narrow
focus area.
I don't know if you will be able to discover a method to keep the text at the
focal plane but seems like it shouldn't be impossible either.

Bob


Post a reply to this message

From: clipka
Subject: Re: Focal Blur
Date: 9 Nov 2016 00:41:51
Message: <5822b71f$1@news.povray.org>
Am 09.11.2016 um 05:28 schrieb Mike Horvath:
> http://wiki.povray.org/content/Reference:Camera#Focal_Blur
> 
> The docs say, "The center of the zone of sharpness is specified by the
> focal_point vector. The zone of sharpness is a plane through the
> focal_point and is parallel to the camera. Objects close to this plane
> of focus are in focus and those farther from that plane are more
> blurred. The default value is focal_point<0,0,0>."
> 
> How can a plane be parallel to the camera? Can't a plane only be
> perpendicular to a vector?

Interpret it as "parallel to the image plane" -- or, in other words,
"perpendicular to the camera axis".

> Also, I don't understand why a plane is used at all. All points
> equidistant from focal_point should form a sphere, don't they?

Uh, yes, technically, all points equidistant from _any_ given point form
a sphere, but how would a sphere centered around focal_point (= an
arbitrary point by which the location of the zone of sharpness is
defined) be of any relevance?

Presuming that you mean "all points equidistant from the camera
location", the answer is: Yes, that would also be a sphere -- but the
zone of sharpness in a normal camera is _not_ the set of points
equidistant to the camera lens; rather, in a real-life camera it is the
set of points equidistant to the image plane, and that's also the case
for POV-Ray's camera.


Post a reply to this message

From: clipka
Subject: Re: focal_point
Date: 9 Nov 2016 00:43:24
Message: <5822b77c$1@news.povray.org>
Am 09.11.2016 um 01:23 schrieb Mike Horvath:
> If I comment out the focal blur stuff, the text returns. I also tried
> lowering the aperture size, but it does not help.

My guess would be that the text is far too close to the camera, and
therefore hopelessly out of focus.


Post a reply to this message

From: Mike Horvath
Subject: Re: Focal Blur
Date: 9 Nov 2016 16:23:23
Message: <582393cb$1@news.povray.org>
On 11/9/2016 12:41 AM, clipka wrote:
> Am 09.11.2016 um 05:28 schrieb Mike Horvath:
>> http://wiki.povray.org/content/Reference:Camera#Focal_Blur
>>
>> The docs say, "The center of the zone of sharpness is specified by the
>> focal_point vector. The zone of sharpness is a plane through the
>> focal_point and is parallel to the camera. Objects close to this plane
>> of focus are in focus and those farther from that plane are more
>> blurred. The default value is focal_point<0,0,0>."
>>
>> How can a plane be parallel to the camera? Can't a plane only be
>> perpendicular to a vector?
>
> Interpret it as "parallel to the image plane" -- or, in other words,
> "perpendicular to the camera axis".
>
>> Also, I don't understand why a plane is used at all. All points
>> equidistant from focal_point should form a sphere, don't they?
>
> Uh, yes, technically, all points equidistant from _any_ given point form
> a sphere, but how would a sphere centered around focal_point (= an
> arbitrary point by which the location of the zone of sharpness is
> defined) be of any relevance?
>
> Presuming that you mean "all points equidistant from the camera
> location", the answer is: Yes, that would also be a sphere -- but the
> zone of sharpness in a normal camera is _not_ the set of points
> equidistant to the camera lens; rather, in a real-life camera it is the
> set of points equidistant to the image plane, and that's also the case
> for POV-Ray's camera.
>

Okay, thanks.

Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: focal_point
Date: 9 Nov 2016 16:23:41
Message: <582393dd$1@news.povray.org>
On 11/9/2016 12:43 AM, clipka wrote:
> Am 09.11.2016 um 01:23 schrieb Mike Horvath:
>> If I comment out the focal blur stuff, the text returns. I also tried
>> lowering the aperture size, but it does not help.
>
> My guess would be that the text is far too close to the camera, and
> therefore hopelessly out of focus.
>

You are correct.

Mike


Post a reply to this message

Goto Latest 10 Messages Next 7 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.