POV-Ray : Newsgroups : povray.general : <no subject> : Re: <no subject> Server Time
29 Jul 2024 02:24:10 EDT (-0400)
  Re: <no subject>  
From: alefburzmali
Date: 3 Jun 2013 14:35:01
Message: <web.51ace0b66f92e856bc36dcf10@news.povray.org>
Thanks Alain, you helped me a lot :-)

Bye,

Alef,

Alain <kua### [at] videotronca> wrote:

> > Hi everyone,
> >
> > I am currently using POV-Ray to generate virtual scenes, next I've got to
> > analyse these generated images for a specific study. I have to simulate the
> > behavior of the default setting of the Go Pro 2 HD.
> >
> > The default setting of the Go Pro 2 HD :
> > ----------------------------------------
> >
> > Fixed-focal lens : 0.6m to infinity
> > Aperture : f/2.8
> > HFOV : 170deg
> > reso : 1920x1080
> >
> > I changed the camera setting accordingly :
> >
> > camera {
> >    perspective
> >    //spherical
> >    location camera_location
> >    look_at <0,8.25,0>
> >    //right       1.777777778*x
> >    right x*image_width/image_height
> >    //rotate <0,clock*360,0>
> >    //angle hfov
> >    //angle 170 43.59
> >    //aperture 2.8
> >    focal_point <0,6.0,0> //go pro fixed focal -> 0.6m to infinity
> >    aperture 0.3571 // go pro aperture : f/2.8
> >    blur_samples 20
> > }
> >
> > But everything is blurred from the focal point to infinity, I wanted the inverse
> > behavior, however I don't understand how to manage that with the POV-Ray syntax.
> >
> > Besides, when I set the horizontal FOV (angle) to 170deg, the image is deformed
> > and objects look very far.
> >
> > Does any of you have already tried to simulate the behavior of a real camera and
> > could help me fix my little problem ?
> >
> > Thanks a lot !
> >
> > Alef,
> >
> >
> >
> >
>
> The focal_point define a plane of maximum sharpness. That point IS NOT
> defined relative to the camera but relative to the global coordinate
> system. In your case, it define a plane passing by the point <0, 6, 0>
> and perpendicular to the axis going from the camera location and the
> point_at location. In fact, the focal_point don't even need to be
> located within the visible part of the scene.
>
> You can make it relative to the camera as follow (minimal case):
> #declare My_Camera = camera{location 0 look_at z focal_point<0,0,0.8>
> blur_samples 7 aperture 0.3571}
> Use a low blur_samples during testing (it will get grany), then set it
> higher for the final render to get a smooth result.
>
> This define a camera siting at the origin, looking toward +Z, using
> focal blur with a focal point situated 0.6 unit in front of it.
> If in your scene 1 unit = 10 cm, change 0.6 to 6, or to 60 if you use 1
> unit = 1 cm.
>
> You can now rotate and translate that camera as needed using:
> camera{My_Camera rotate Rotation location Cam_location}
> or
> camera{My_Camera location Cam_location look_at Target_point}
>
> You can set aperture in the declaration or when using the declared camera.
> Adjust aperture untill you get the zone of sharpness you want.
>
> I've set the focal plane slightly farther than what you set as the zone
> of sharpness start slightly before the focal plane in the same way it
> does for a real objective.
>
> angle set the angle between the axis of the camera (the center point of
> the image) and the rightmost point of the image. If your angle define
> the angle between the left and right edges, you need to divide it by 2.

> need to set: angle 85
>
>
> The default prespective camera is an ideal pin hole camera. Any straight
> line always remain traight.
>
> Spherical and ultrawhide_angle will display some "barelling", a
> distortion common to uncorrected objectives, especialy of the whide
> angle variety.
>
> For the spherical, you need to explicitely set
> angle Horizontal_angle , Vertical_angle.
>
> If you've done already, I highly recomend that you use the version 3.7
> RC7 available from the "Beta" page. It's very stable and is more
> performant. It will use all your cores on a multi-core computer and the
> code for focal blur is much more effecient than before.
>
>
>
>
> Alain


Post a reply to this message

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