POV-Ray : Newsgroups : povray.binaries.images : 35mm Camera Macro : Re: 35mm Camera Macro Server Time
1 Aug 2024 06:24:39 EDT (-0400)
  Re: 35mm Camera Macro  
From: Alain
Date: 27 Feb 2009 16:42:50
Message: <49a85e5a$1@news.povray.org>
Edouard Poor nous illumina en ce 2009-02-26 15:27 -->
> "Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
>> It is probably my misunderstanding of your macro, but I get weird results.
>> In particular by just changing fstop, the camera seems to jump from inside
>> one of the objects to outside. So, how do you define the parameters? just as
>> in RL photography? i.e. focal_length is 50 or 105; fstop is 1.4 or 16?
>>
>> Thomas
> 
> Yes - it should work like that. Since the camera is declared in mm, the rest of
> the scene has to be in mm as well. Or you can change the camera to be 0.05
> meters if you scene is in meters of course.
> 
> fstop is 1.4 or 16 as you say.
> 
> One sort of limitation is that I've only got a camera and look_at position. The
> focal plane goes through the look_at position, which made sense for me, but the
> macro could be changed to have a separate focal point, or a focal distance.
> 
> Future plans:
>   o Another macro to automatically focus at the hyperfocal distance
>   o Take the image size into account for the "circle of confusion" (in the
> hyperfocal case)
>   o Auto-focus! Give the camera an object, and use trace() to focus on it
>   o Also post my Stochastic Render Rig version of the same macro (just got to
> tweak the AA values a bit more).
> 
> Here's the scene:
> 
> #include "transforms.inc"
> 
> #macro Camera35mm( cam_pos, look_pos, focal_length, fstop, num_samples )
>  #local film_width = 35;
>  #local fov = degrees( atan( (film_width / 2) / focal_length ) * 2 );
>  #local apertureDiameter = focal_length / fstop;
>  #local focal_distance = vlength( look_pos - cam_pos);
> 
>  camera {
>   perspective
> 
>   focal_point look_pos
>   blur_samples num_samples
>   aperture (apertureDiameter / focal_distance) * 1000  // Magic Number
> 
>   location cam_pos
>   look_at look_pos
>   angle fov
>   right x * 1
>   up y * image_height/image_width
>  }
> #end
> 
> #declare cam_pos = < 0, 150, -500 >;  // in mm
> #declare look_pos = < 0, 50, 0 >;  // in mm
> 
> #declare lens = 50;  // mm
> #declare f_ratio = 4;  // Aperture as f ratio
> #declare num_samples = 19;  // 7, 19 & 37 happen to be hexagonal
> 
> Camera35mm( cam_pos, look_pos, lens, f_ratio, num_samples )
> 
> 
If I change look_pos to <0, -120, 1000>, the balls are blury, but the horizon is 
sharp. The ground start to be sharp about 2 or 3 tiles after the green ball. (at 
1024*768)

-- 
Alain
-------------------------------------------------
Existentialism: What is shit, anyway?


Post a reply to this message

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