POV-Ray : Newsgroups : povray.binaries.images : Doctor John - FieldCam conundrum : Re: Doctor John - FieldCam conundrum Server Time: 25 Jan 2021 22:55:47 GMT
  Re: Doctor John - FieldCam conundrum  
From: Bald Eagle
Date: 16 Nov 2020 22:15:01
Thomas de Groot <tho### [at] degrootorg> wrote:

> I am a regular user of Doctor John's FieldCam macro which enables
> slanting architecture to look straight. It simulates the professional
> cameras where this adjustment can be done through the lenses.

I think it's actually accomplished using the adjustable film plane of the view
The 3-book series on negative, print, and camera by Ansel Adams ought to
describe it fully and clearly.
<hint> One might think there are PDF's of those available...   ;) </hint>

> The macro works perfectly... as long as your scene camera is situated
> about the origin of the Y-axis. Recently, I have been working on scenes
> where the camera is situated at about y=170.00, and strange things
> happen: the camera is moved upwards and forwards, the more so as
> elevation gets greater.

Is this a custom version that you edited yourself, or a later version of the
All I found was this:

I'm puzzled by this:
#local VCorr = pow(vlength(CD), 2)/pow(HypoXZ, 2);
and its use in the matrix.  Seems to be some long-winded way to compute y^2 or a
multiple of it....

Maybe try
#local VCorr = CP.y;       ?    Totally guessing.

> To illustrate this, I have attached a little test scene and an image
> showing the problem. H is the value for the elevation of the scene
> elements along the Y-axis.

I don't really understand what I'm looking at in the scene, nor how the macro
corrects the one column and not the others...

> I can correct this by adding a translate after the "NoFall" transform in
> the camera code, but I assume that this could better be done within the
> "NoFall" matrix. I have not the slightest idea how to do this.

shear matrix:

The matrix just ... "corrects" the basis vectors of the world space that the
camera uses.

If you look at the thread that jr references:

we explain that the POV-Ray matrix keyword uses a proper 3x3 mathematical matrix
with an additional 1x3 translation matrix "bolted on"to the bottom.

So for

you have row-wise definitions of the basis vectors i, j, k (x, y, z) of the
world space.

ABC = <1, 0, 0> = x
DEF = <0, 1, 0> = y
GHI = <0, 0, 1> = z

and then you tack on a translate <x, y, z> to the bottom of that.

So, quick and dirty answer, to address moving your correctional translation to
the matrix would be (I think)

matrix <1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -CP.y, 0>

Doctor John has some mathematical hocus pocus going in with his squared terms,
and what assumptions he makes and why is currently beyond my ken, but perhaps at
some point when I return to having the time and energy to muck around with
POV-Ray stuff, I will puzzle it out.

I'm not sure what the Vcorr does, but I guess it is doing it... wrong?

That's all I've got - for now.


Post a reply to this message

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