POV-Ray : Newsgroups : povray.binaries.images : Re: Regarding the defocus module : Re: Regarding the defocus module Server Time
10 May 2024 03:27:01 EDT (-0400)
  Re: Regarding the defocus module  
From: Alain
Date: 14 Sep 2016 14:47:40
Message: <57d99b4c$1@news.povray.org>

>> The direction vector set the reference plane of the image. Objects in
>> front of that point appear larger and those beyond appear smaller. Along
>> with the up and right vectors, it determine the field of view, not a
>> focal length.
>> The image plane is where the point computer by adding the camera's
>> location and the direction vector, and is perpendicular to the direction
>> vector. It's further modified if you use look_at or any transformation
>> on the camera.
>
> So if the direction vector is used to determine the field of view, how do I set
> the 'f' value exactly? Suppose I've made a scene where I assume focal length=2
> 'units' and all objects, lens and image plane are set according to that.
> How/Where do I set that in POVRay? As you must have seen in the .pov file, I say
> "X units" from the camera. What I really want is that distance to be as "Y*f",
> as in a multiplier of the f-value. How can I do that?
>
>> The f/x is a ratio. Say the focal_point is 100 unit in front of the
>> camera and you want an f/x of f100, you divide the distance between the
>> camera and focal_point by your f/x, in this case, it gives an aperture of 1.
>> Formula:
>> vlength(Camera_Location - focal_point)/ (f/x)
>
> Here the f/X I meant was like the f/1.4 or f/1.7 in real cameras. Supposing the
> focal_point is X*f from the camera, and I want an aperture of f/2.0, what should
> I set the 'aperture' parameter as? [Given that I know how to set 'f' value
> first?]

f/2 mean that the aperture is exactly half the distance between the 
optical center of the lens and the film/detector.
In POV-Ray terms, that should be about half the direction vector length.
Do some testing using a fraction of the direction vector and the 
distance between the camera and focal_point.

>
>> confidence is the probability that the resulting colour is correct.
>> It's a statistical thing. It's recommended to always use a value smaller
>> than 1.
>> variance is how much you are willing to deviate from the exact colour.
>
> I still didn't get how you say you know the 'correct' color. For computing
> probabilities, that knowledge
> is reqd. Is it approximated such that you keep adding the colors to the target
> pixel, and when that pixel's
> color stops changing much, you say you don't need more rays?
Yes. When the change from a new sample get less that a threshold value, 
you say, this is close enough and I don't need to get any new sample.

>
>> You need to set focal_point.
>> If left undefined, it may get located at the same place as the camera,
>> or extremely far away.
>
> But what does focal_point really do in the context of the tracing done?
>
It define the plane of sharpness, every ray shot toward any given point 
on that plane will represent exactly the same pixel in the final image.


Post a reply to this message

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