|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> What happens if you shift the camera to the origin, apply the transform, and
> then shift it back?
Well, it definitely has an effect.
First I tried location <0, 0, 0> applying the transform, and then translate
CamLoc, but I just got a blue render (sky)
Then I did
#if (FC)
camera {
//FieldCam (CamLoc, CamLookAt)
FieldCam2 (CamLoc, CamLookAt)
perspective
location CamLoc
sky CamSky
up CamSky
direction z*CamZoom
right x*AspectRatio
angle CamAng
translate -CamLoc
transform {NoFall}
translate CamLoc
look_at CamLookAt
}
That lets me see the columns and seems to change the camera position as well.
replacing VCorr with 1 changes the camera position such that the columns are no
longer visible...
Juggling some things, so that's all I was able to play with for now.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
So I turned off the field cam, but added the macro invocation to the other
camera definition.
Then I made an axes object, made an object {axes transform {NoFall}}
and overlayed them.
There's no difference if they are at the origin, but when the axes are
translated up (by 50) before applying the transform, I indeed get the up and
forward behaviour.
I can fix the forward movement, but the vertical movement is really puzzling.
#declare NoFall =
transform {
matrix < 1, 0, 0,
ShearX, VCorr, ShearZ,
0, 0, 1,
0, 0, -50*ShearZ>
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
So for now, just try
#declare NoFall =
transform {
matrix < 1, 0, 0,
ShearX, 1, ShearZ,
0, 0, 1,
-CamLoc.y*ShearX, 0, -CamLoc.y*ShearZ>
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Op 19/11/2020 om 01:28 schreef Bald Eagle:
> So for now, just try
>
> #declare NoFall =
> transform {
> matrix < 1, 0, 0,
> ShearX, 1, ShearZ,
> 0, 0, 1,
> -CamLoc.y*ShearX, 0, -CamLoc.y*ShearZ>
> }
>
[aside: OK. New Thunderbird version... seems I clicked on wrong answer
button... Sorry]
YOU MADE MY DAY!! :-)
This is the correct answer indeed. I tried a couple of exotic scene
settings and the scene remains rock-solid.
Sir, I bow before your fathomless wisdom and sharp insight. I only got
as far as to understand that the last row of the matrix was crucial.
Thank you infinitely indeed.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Doctor John - FieldCam conundrum
Date: 19 Nov 2020 03:06:04
Message: <5fb6276c@news.povray.org>
|
|
|
| |
| |
|
|
Op 18/11/2020 om 13:16 schreef Jörg "Yadgar" Bleimann:
> My digital cameras (even the relatively sophisticated Panasonic Lumix
> DMC-LZ100) are no able to correct for falling lines... but perhaps this
> macro can do that with the photos?
>
I do not see how. If you import your photograph into a povray scene,
applying the macro will not correct the '/content/ of the photograph,
only the scene it is part of.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thomas de Groot <tho### [at] degrootorg> wrote:
Thanks, Thomas.
I'm glad that it seems that I've mostly solved the issue - at least for all of
the use cases you've tested.
I still have a feeling that there's a bit more to be done, and somehow VCorr
_may_ be needed in there.
It's not very noticeable from far away, you need steep viewing angles to see
what I mean.
> Op 18/11/2020 om 13:16 schreef Jörg "Yadgar" Bleimann:
> > My digital cameras (even the relatively sophisticated Panasonic Lumix
> > DMC-LZ100) are no able to correct for falling lines... but perhaps this
> > macro can do that with the photos?
> >
>
> I do not see how. If you import your photograph into a povray scene,
> applying the macro will not correct the '/content/ of the photograph,
> only the scene it is part of.
Possibly.
But you'd need the camera and look_at data from your original photo to get the
right angle of tilt needed.
You may just try making an animation with your photo and rotating it around -x
to see what happens, since AFAIA, that's the bulk of the effect.
Mr Le Coat seems to have a much firmer grasp of all of this:
http://news.povray.org/povray.advanced-users/thread/%3C5bb67852%40news.povray.org%3E/?mtop=425362
Post a reply to this message
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Doctor John - FieldCam conundrum
Date: 20 Nov 2020 02:27:32
Message: <5fb76fe4@news.povray.org>
|
|
|
| |
| |
|
|
Op 19/11/2020 om 12:30 schreef Bald Eagle:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>
> Thanks, Thomas.
> I'm glad that it seems that I've mostly solved the issue - at least for all of
> the use cases you've tested.
> I still have a feeling that there's a bit more to be done, and somehow VCorr
> _may_ be needed in there.
> It's not very noticeable from far away, you need steep viewing angles to see
> what I mean.
>
I agree with you. One of the things which still puzzles me is that there
seems also to be a slight zoom effect, mostly noticiably in cloud
patterns for instance in the background. Maybe that is what you observe.
However, for the time being, the macro is more useful than it was.
I shall put version 4.0 of the macro in povray.binaries,utilities.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Op 19/11/2020 om 12:30 schreef Bald Eagle:
>> Op 18/11/2020 om 13:16 schreef Jörg "Yadgar" Bleimann:
>>> My digital cameras (even the relatively sophisticated Panasonic Lumix
>>> DMC-LZ100) are no able to correct for falling lines... but perhaps this
>>> macro can do that with the photos?
>>>
>
> Possibly.
> But you'd need the camera and look_at data from your original photo to get the
> right angle of tilt needed.
> You may just try making an animation with your photo and rotating it around -x
> to see what happens, since AFAIA, that's the bulk of the effect.
>
> Mr Le Coat seems to have a much firmer grasp of all of this:
>
http://news.povray.org/povray.advanced-users/thread/%3C5bb67852%40news.povray.org%3E/?mtop=425362
>
>
I woke up this night with a possible solution. You need to simulate a
technical camera using the combinationof your digital camera and povray:
1. Take a photograph of a (tall) building with your camera, tilting it
/backwards/ by 20 degrees (for instance);
2. In povray, put this photograph on a vertical flat plane in front of
the camera, and tilt the plane /forwards/ by 20 degrees. Be sure that
the camera is level (both location and look_at with identical y-value);
3. In povray, you may need an orthographic camera for better results.
I /think/ this would do the trick; you will need to experiment.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thomas de Groot <tho### [at] degrootorg> wrote:
> I agree with you. One of the things which still puzzles me is that there
> seems also to be a slight zoom effect, mostly noticiably in cloud
> patterns for instance in the background. Maybe that is what you observe.
> However, for the time being, the macro is more useful than it was.
OK, I wanted to make sure that it wasn't just me.
The zoom, I think, is part uncorrected stuff, and part unexpected "optical
illusion". It's real, but it's the effect of tilting the camera's "film plane",
so that some parts are closer to the scene objects than they were.
Try 2 things.
use:
#local _j = vlength (<ShearX, VCorr, ShearZ>);
#debug "\nIgnore the following Parse Warning: \n"
#debug "----------------------------------- \n"
#declare NoFall =
transform {
matrix < 1, 0, 0,
ShearX, VCorr, ShearZ,
0, 0, 1,
-CamLoc.y*ShearX, -CamLoc.y/_j*VCorr, -CamLoc.y*ShearZ*_j>
_j is the length of the new modified y-axis, and I think that there needs to be
a shift back to compensate for that, and average out the "zoom" effect, as shown
in the new matrix term.
and _then_ follow up with:
#if (FC)
camera {
//FieldCam (CamLoc, CamLookAt)
FieldCam2 (CamLoc, CamLookAt)
perspective
location CamLoc
sky CamSky
up CamSky
direction z*CamZoom
right x*AspectRatio
angle CamAng
translate -CamLoc
transform {NoFall}
translate CamLoc
look_at CamLookAt
}
To apply the camera matrix with the camera at the origin.
I think any further work will really need to quantify the effect.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Op 20/11/2020 om 12:28 schreef Bald Eagle:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> I agree with you. One of the things which still puzzles me is that there
>> seems also to be a slight zoom effect, mostly noticiably in cloud
>> patterns for instance in the background. Maybe that is what you observe.
>> However, for the time being, the macro is more useful than it was.
>
> OK, I wanted to make sure that it wasn't just me.
>
> The zoom, I think, is part uncorrected stuff, and part unexpected "optical
> illusion". It's real, but it's the effect of tilting the camera's "film plane",
> so that some parts are closer to the scene objects than they were.
Yes, I guessed something like that.
>
> Try 2 things.
>
> use:
>
> #local _j = vlength (<ShearX, VCorr, ShearZ>);
>
> #debug "\nIgnore the following Parse Warning: \n"
> #debug "----------------------------------- \n"
> #declare NoFall =
> transform {
> matrix < 1, 0, 0,
> ShearX, VCorr, ShearZ,
> 0, 0, 1,
> -CamLoc.y*ShearX, -CamLoc.y/_j*VCorr, -CamLoc.y*ShearZ*_j>
>
> _j is the length of the new modified y-axis, and I think that there needs to be
> a shift back to compensate for that, and average out the "zoom" effect, as shown
> in the new matrix term.
>
> and _then_ follow up with:
>
>
> #if (FC)
> camera {
> //FieldCam (CamLoc, CamLookAt)
> FieldCam2 (CamLoc, CamLookAt)
> perspective
> location CamLoc
> sky CamSky
> up CamSky
> direction z*CamZoom
> right x*AspectRatio
> angle CamAng
> translate -CamLoc
> transform {NoFall}
> translate CamLoc
> look_at CamLookAt
> }
>
> To apply the camera matrix with the camera at the origin.
This does not work correctly: the camera is pushed below the surface
(above the surface when y becomes negative, obviously). the VCorr
remains a puzzle to me and the _j does not help in the matter. I also
have a hunch that putting the camera at the origin is not helpful. It
doe not make any difference as far as I can tell.
>
> I think any further work will really need to quantify the effect.
>
Yes, I think that is the correct conclusion. So far, you have done a
great job already and made the macro much more useful than it was
originally.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|