POV-Ray : Newsgroups : povray.general : Focal blur (sorry for basic questions) Server Time
25 Dec 2024 01:58:27 EST (-0500)
  Focal blur (sorry for basic questions) (Message 1 to 9 of 9)  
From: Manuel
Subject: Focal blur (sorry for basic questions)
Date: 21 May 2003 16:49:52
Message: <3ecbe670$1@news.povray.org>
If I define a camera like

camera {
     perspective
     right <1, 0, 0>
     up <0, 1, 0>
     angle 59.4897625939
     scale <1.0, 1.0, 1.0>
     rotate <-90.0000161649, 0.0, 0.0>
     translate <0.0, -8.12885093689, 0.0>
}

instead the "look_at " sintax, can I use
focal blur??

Thx,

                Manuel


Post a reply to this message

From: Hughes, B 
Subject: Re: Focal blur (sorry for basic questions)
Date: 21 May 2003 18:57:04
Message: <3ecc0440$1@news.povray.org>
"Manuel" <man### [at] tinit> wrote in message
news:3ecbe670$1@news.povray.org...
>
> instead the "look_at " syntax, can I use
> focal blur??

No, focal_point used for blurring doesn't affect where the camera is
pointed. location defaults to <0,0,0> and look_at will default to +z, then
your transformations work from that.

Bob


Post a reply to this message

From: Hugo Asm
Subject: Re: Focal blur (sorry for basic questions)
Date: 21 May 2003 19:05:11
Message: <3ecc0627$1@news.povray.org>
> instead the "look_at " sintax, can I use
> focal blur??

The focal blur follows your transformations. So if you use "translate
<-10,0,0>" it will move the camera location, the look_at point, and the
focal_point all together, no matter in what order you specify them.

Not so basic question. I had to test this.

Regards,
Hugo


Post a reply to this message

From: Manuel
Subject: Re: Focal blur (sorry for basic questions)
Date: 21 May 2003 19:13:22
Message: <3ecc0812$1@news.povray.org>
> The focal blur follows your transformations. So if you use "translate
> <-10,0,0>" it will move the camera location, the look_at point, and the
> focal_point all together, no matter in what order you specify them.

Thanks.
It seem that "look_at point" is implicit
in my declaration. It's true?


Post a reply to this message

From: ABX
Subject: Re: Focal blur (sorry for basic questions)
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

From: ABX
Subject: Re: Focal blur (sorry for basic questions)
Date: 22 May 2003 02:09:23
Message: <46qocvs8tbghujeh59ouikjc65jngud4p7@4ax.com>
On Thu, 22 May 2003 01:19:33 +0200, "Manuel" <man### [at] tinit> wrote:
> Thanks.
> It seem that "look_at point" is implicit
> in my declaration. It's true?

All values in camera syntax have default values (as it is listed in chapter "6.4
Camera" of manual) which are used to initialize parameters. So even 'camera{}'
is correct syntax which assigns some values to camera parameters.

ABX


Post a reply to this message

From: Manuel
Subject: Re: Focal blur (sorry for basic questions)
Date: 22 May 2003 04:28:42
Message: <3ecc8a3a$1@news.povray.org>
> 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:
>
>[...]
>
> Can you do more tests with cases I described ?
>
> ABX

Well, this is a Titan battle!
I can only waiting for a your response...sorry, but I'm really newbie ...
:-(
Thanks.

        Manuel


Post a reply to this message

From: Hugo Asm
Subject: Re: Focal blur (sorry for basic questions)
Date: 22 May 2003 09:29:03
Message: <3eccd09f@news.povray.org>
ABX wrote:
> Can you do more tests with cases I described ?

You're right. It only works when transformations does not change the
distance between focal_point and camera location.

Manuel wrote:
> I can only wait for your response.
> sorry, but I'm really newbie ...

Newbies are welcome! To use focal blur together with camera transformations
such as scale, you could use the code below:

Regards,
Hugo


// Declare vectors and scale factor
#declare Scale = <1,1,1>;
#declare Camera_Location = <0,7,-12> * Scale;
#declare Camera_Lookat   = <0,0,0> * Scale;
#declare Focal_Point     = <0,0,0> * Scale;


// Setup camera
camera {
    location Camera_Location look_at Camera_Lookat

    focal_point Focal_Point
    aperture .8
    blur_samples 20

    // You can still apply other transformations in here
    rotate 45*z
    translate -3*x
}



// Enviroment
light_source { <-100,50,0>, 9000 fade_distance 1 fade_power 2 }
light_source { <-50,100,-100>, .35 shadowless }
plane { y,-1.5  pigment { checker rgb .5 rgb 1 } }
sphere { < 2, 0,  0>,1.5  pigment { rgb <1,.2,0> } }
sphere { <-4, 0, 12>,1.5  pigment { rgb <0,.4,1> } }
sphere { <-6, 0, -5>,1.5  pigment { rgb <1,.8,0> } }
// End


Post a reply to this message

From: Manuel
Subject: Re: Focal blur (sorry for basic questions)
Date: 22 May 2003 16:56:50
Message: <3ecd3992@news.povray.org>
> Newbies are welcome!

:-D Thanks!


>To use focal blur together with camera transformations
> such as scale, you could use the code below:
[...]
> // Setup camera
> camera {
>     location Camera_Location look_at Camera_Lookat

Ok, it work fine.

Thanks again,

         Manuel


Post a reply to this message

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