POV-Ray : Newsgroups : povray.binaries.images : MATCHMOVING in POV-ray Server Time
15 May 2024 15:11:21 EDT (-0400)
  MATCHMOVING in POV-ray (Message 21 to 30 of 35)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 5 Messages >>>
From: Alain
Subject: Re: MATCHMOVING in POV-ray
Date: 15 Feb 2014 21:14:43
Message: <53001f13@news.povray.org>

> "Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
>
>>
>> I have a 5 inch chrome sphere that I use for that very purpose (plus it looks
>> cool on my desk when not in use). Mount your camera on a tripod and take a set
>> of bracketed shots, then rotate the tripod ~90 degrees around the sphere and
>> take another set of bracketed shots. After you've combined the two bracketed
>> imagesets into 2 HDRs you can merge these offset images to eliminate the
>> camera/tripod completely from the final shot. Of course, Ive's IC is very useful
>> here:
>>
>> http://www.lilysoft.org/IC/ic_index.htm
>>
>
> So the 90-degree image is simply to get a clean area to 'replace' the
> camera-plus-photographer in the original straight-on image? That makes perfect
> sense. Here's a question, though: Is the *final* light probe ultimately made
> from BOTH of those images? (Meaning: Is the 'corrected' straight-on image
> somehow combined WITH the (similarly-corrected) 90-degree image to get a light
> probe that has MORE environment imagery in it? Or is only the straight-on image
> used?)
>
> There's also something *mysterious* about light probes that I still have trouble
> grasping: In my research into the subject, several sources stated that the
> mirrored ball actually gathers environment imagery from BEHIND itself-- in the
> spatial hemisphere out of view of the camera(!)-- implying that the very edges
> of the ball pick up the 'hidden' back-side environment. Is that true (or even
> possible?)
>
>

When using a mirrored sphere, there is a blind cone right behind it: The 
area of the view hiden from the camera by the sphere itself.
There is also a loss of definition near the edge.

remove the camera, to get a full spherical covering.


Post a reply to this message

From: Kenneth
Subject: Re: MATCHMOVING in POV-ray
Date: 16 Feb 2014 11:40:01
Message: <web.5300e8d1d1c8d4afc2d977c20@news.povray.org>
Alain <kua### [at] videotronca> wrote:

>
> When using a mirrored sphere, there is a blind cone right behind it: The
> area of the view hiden from the camera by the sphere itself.
> There is also a loss of definition near the edge.

> remove the camera, to get a full spherical covering.

Thanks, Alain; the idea is finally beginning to make sense to me.

I always like to have a theoretical understanding of how things work; but I have
not yet come across a physical description of how light rays behave as they
strike the circular edge of a mirrored sphere. So here is my own 'thought
experiment': The circular 'edge' can be thought of as an infinite number of tiny
'flat' mirrors, each one aligned *almost* parallel to the camera's line of
sight. Since "angle of incidence = angle of reflection", the reflected light
rays (from the surrounding environment) do indeed come from areas 'behind' the
sphere! :-) (Except for the small missing cone, as you mentioned.)

I tried this experiment by eye, with a flat mirror-- and it works (of course!)
Duh!  It all seems so obvious now.


Post a reply to this message

From: Kenneth
Subject: Re: MATCHMOVING in POV-ray
Date: 16 Feb 2014 12:35:01
Message: <web.5300f60bd1c8d4afc2d977c20@news.povray.org>
BTW, the most important part of this 'matchmoving' scheme was to determine, at
the beginning, what the proper POV-Ray camera ANGLE should be, to best match my
Canon camera's lens angle (at its default 'wide angle' setting, which is how I
shoot most videos.) At first, I thought this would be a simple and
straightforward
process: Take a video of some kind of subject matter that had clearly-seen
'vanishing-point lines', pick a representative still frame from it, then place
some CGI objects in the scene that 'matched' those, along with the proper
perspective (POV-Ray's Screen.inc include file was ideal for doing this.) The
process required quite a few test renders to 'zero in' on the proper matching
lens angles.

But a problem arose when doing the animated matchmoving: POV-Ray's default
perspective camera is a 'perfect pin-hole' camera. A 'real' camera is not; its
lens has spherical aberration, plainly seen at the outer edges of the image.
This discrepancy caused some visual 'sliding' of CG objects against the
background images, at the edges of the frame, as the video camera panned, tilted
and rolled. So I had to find a compromise between the two lens angles, to try
and eliminate this sliding (or at least minimize it)-- essentially by making the
POV-Ray camera lens a bit more of a 'telephoto' lens than it should be. (Meaning
that the 'perspective' of both lenses no longer matches.) But it seems that this
perspective mis-match is far less visually distracting than the (very obvious)
sliding of CG elements.

Here's something interesting: When professional CGI is done for Hollywood
movies, the original 'real' imagery-- with its spherical aberration distortion--
is first UN-distorted in software; then the CG elements are matched to that
(with a 'perfect pinhole-camera'); then the final composite imagery is
RE-distorted to add the spherical aberration back in, to all elements.


Post a reply to this message

From: Kenneth
Subject: Re: MATCHMOVING in POV-ray
Date: 16 Feb 2014 15:20:01
Message: <web.53011d16d1c8d4afc2d977c20@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

>
> But a problem arose when doing the animated matchmoving: POV-Ray's default
> perspective camera is a 'perfect pin-hole' camera. A 'real' camera is not; its
> lens has spherical aberration...

Oops, what I meant to say was 'barrel distortion' (and 'pincushion distortion'
and etc.) Spherical aberration is different, a lack of perfect focus of
different wavelengths of light. My Canon camera shows very little of that.


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: MATCHMOVING in POV-ray
Date: 16 Feb 2014 16:08:01
Message: <530128b1$1@news.povray.org>

> "Kenneth" <kdw### [at] gmailcom> wrote:
>
>>
>> But a problem arose when doing the animated matchmoving: POV-Ray's
>> default perspective camera is a 'perfect pin-hole' camera. A 'real'
>> camera is not; its lens has spherical aberration...
>
> Oops, what I meant to say was 'barrel distortion' (and 'pincushion
> distortion' and etc.) Spherical aberration is different, a lack of
> perfect focus of different wavelengths of light. My Canon camera
> shows very little of that.
>

   That looks like a new usage-case for the meshcam... if you can make a
mesh that gives the same barrel distortion as your real camera.

--
Jaime


Post a reply to this message

From: Kenneth
Subject: Re: MATCHMOVING in POV-ray
Date: 16 Feb 2014 19:05:00
Message: <web.530150c8d1c8d4afc2d977c20@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:

> >
> > Oops, what I meant to say was 'barrel distortion' (and 'pincushion
> > distortion' and etc.)
>
>    That looks like a new usage-case for the meshcam... if you can make a
> mesh that gives the same barrel distortion as your real camera.
>

That's a VERY intriguing idea, one that never occurred to me: to make my own
UN-distorter. (Then 'reversing' it later, to add the distortion back in.)
Wonderful! First, of course, I need to understand how the meshcam feature works
;-)

Prior to using that idea, I would need to do a useful little experiment: take a
large flat board (a real one), fill it with evenly-spaced horizontal and
vertical lines, and place it in front of my tripod-mounted video camera,
perpendicular to the lens axis. Then shoot a short video (maybe with some
pan/tilt/roll thrown into the mix.) This would give me a 'visual basis' for
determining the amount of distortion in the camera's lens.

The one *possible* problem I foresee with the meshcam idea (if I understand that
feature correctly) is that, during these un-distortions and re-distortions, the
POV-Ray camera might not make perfect 1:1 pixel reproductions of the original
images, causing possible moire effects or pixel jitter. (To explain that better:
I often use the VirtualDub/Deshaker combination to simply smooth out the motion
in my videos-- which necessarily means that the images are slightly 'moved
around' and then re-rendered. To do this accurately, it has a very sophisticated
interpolation mechanism that blends pixels with sub-pixel accuracy, so that the
'smoothed' video shows no moire effects at all. I don't know if that's possible
in POV-Ray, by using only interpolate 2 on the images.)


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: MATCHMOVING in POV-ray
Date: 17 Feb 2014 03:04:37
Message: <5301c295$1@news.povray.org>

> That's a VERY intriguing idea, one that never occurred to me: to make
> my own UN-distorter. (Then 'reversing' it later, to add the
> distortion back in.) Wonderful! First, of course, I need to
> understand how the meshcam feature works ;-)

   Well, I was thinking to just use it for the first CG rendering, not
for the final composite one... so you wouldn't need to do the
undistort-redistort trick. Or I'm missing something?

--
Jaime


Post a reply to this message

From: Mr
Subject: Re: MATCHMOVING in POV-ray
Date: 17 Feb 2014 08:55:00
Message: <web.5302139ad1c8d4af16086ed00@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> "Mr" <nomail@nomail> wrote:
> > "jhu" <nomail@nomail> wrote:
> > > Wow! That's awesome!
> >
> > Yes,
> >
> > Were you aware that Blender had matchmoving features?
> >
> > Maybe some pieces of the code might be of some help to your project?
>
> I did read that somewhere. What a nice feature! I wonder how expert it is in
> determining *spatial* movement of the video camera?
>
> There's another (dedicated) matchmoving program called MOCHA that I would love
> to have. But then, it would remove the fun of trying to code my own version in
> POV-Ray! ;-)

In the free dedicated apps realm there is also Voodoo:
http://www.digilab.uni-hannover.de/docs/manual.html


Post a reply to this message

From: Alain
Subject: Re: MATCHMOVING in POV-ray
Date: 17 Feb 2014 17:31:46
Message: <53028dd2@news.povray.org>

> "Kenneth" <kdw### [at] gmailcom> wrote:
>
>>
>> But a problem arose when doing the animated matchmoving: POV-Ray's default
>> perspective camera is a 'perfect pin-hole' camera. A 'real' camera is not; its
>> lens has spherical aberration...
>
> Oops, what I meant to say was 'barrel distortion' (and 'pincushion distortion'
> and etc.) Spherical aberration is different, a lack of perfect focus of
> different wavelengths of light. My Canon camera shows very little of that.
>

Barrel distortion, also called barelling, is when straight lines curve 
outwars. Most common lenses are not corrected, only premium, 
professional grade ones are. It's a common distortion for whide angles 
objectives.

The oposite distortion, called cushioning, is sometimes visible with 
telephoto images, often the cheapest ones.

The aberation due to different wave lenght is calles chromatic 
aberation. Normaly, the various objectives have good correction of this one.

Spherical aberation cause a coma effect. Bright points at some distance 
from the axis tend to show some egg or plume shaped fuzzyness oriented 
radialy arount the center point of the image. It's also present at the 
center, but much less noticeable as it's often mistaken as glare. It's 
due to the fact that rays hitting the lense at the center converge 
farther than those hitting it near the edges. It's compensated by having 
stronger curvature at the center than at the edges, making the shape 
elliptic.

Barreling can be simulated using the spherical or ultra whide angle POV 
cameras.


Alain


Post a reply to this message

From: Kenneth
Subject: Re: MATCHMOVING in POV-ray
Date: 18 Feb 2014 08:20:01
Message: <web.53035dded1c8d4afc2d977c20@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:

>
>    Well, I was thinking to just use it for the first CG rendering, not
> for the final composite one... so you wouldn't need to do the
> undistort-redistort trick.
>

YES, that makes more sense; it eliminates some unnecessary steps. Thanks for the
tip! I should have thought of it myself :-/


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 5 Messages >>>

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