POV-Ray : Newsgroups : povray.general : Focal blur (sorry for basic questions) : Re: Focal blur (sorry for basic questions) Server Time
5 Nov 2024 09:23:12 EST (-0500)
  Re: Focal blur (sorry for basic questions)  
From: ABX
Date: 22 May 2003 02:04:29
Message: <qsoocv0bs1n42fe8be54a98s395hl099dg@4ax.com>
On Thu, 22 May 2003 01:05:31 +0200, "Hugo Asm" <hua### [at] post3teledk> wrote:
> The focal blur follows your transformations.

Are you sure ? It looks like following but what I've seen in sources it can not
follow when scale or shearing matrix is involved. On script side focal_point is
defined but on engine side focal_distance is stored. Here is piece of code where
during parsing focal_point considers location and is stored as Focal_Distance:

      CASE (FOCAL_POINT_TOKEN)
        Parse_Vector(New->Focal_Point);           // get vector
        Assign_Vector(tempv, New->Focal_Point);   // store it in temporary value
        VSubEq(tempv, New->Location);             // substract location
        VLength (New->Focal_Distance, tempv);     // calculate distance
      END_CASE

But when transformation is applied to the camera parameters, it does not
consider Focal_Distance:

  void Transform_Camera(CAMERA *Camera, TRANSFORM *Trans)
  {
    MTransPoint(Camera->Location, Camera->Location, Trans);
    MTransDirection(Camera->Direction, Camera->Direction, Trans);
    MTransDirection(Camera->Up, Camera->Up, Trans);
    MTransDirection(Camera->Right, Camera->Right, Trans);
  }

So it looks like it works as long as transformation does not change distance
between focal_point and location. I think it is changed at least when used in
zoomin.inc
http://news.povray.org/povray.binaries.scene-files/24335/170827/zoomin.inc

> Not so basic question. I had to test this.

Can you do more tests with cases I described ?

ABX


Post a reply to this message

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