Actually, I have rendered 3 input images of a sphere with different light directions in PBRT.
As the next step of the process, I am going to compute surface normals of this sphere, so I need to put the Focal length value in my formula.
All that I now is that I have the value of Field of View (FOV) in my PBRT input files which is 45.
The dimensions of the whole image is 32*32 and the dimensions of the sphere in the image is 26*26.
How can I compute the exact amount of the Focal length using this information?
you can not use perspective without knowing the focal length in 3D graphics. It is also called z_near
and it is the distance from camera origin (point from which you cast the rays) to the projection plane. Look at this:
where: Point P
near Camera
label is the focal point and the blue rectangle labeled Screen(z_near)
is the projection plane. The focal length is perpendicular distance of this point to the plane.
PS. boyfarrell is right you do not need focal length for normal computations. It does not make sense. You could need it to compute some physic process like pupil size etc but not for normals.