POV-Ray : Newsgroups : povray.general : How can I shift the image plane? Server Time
6 Aug 2024 10:24:10 EDT (-0400)
  How can I shift the image plane? (Message 17 to 26 of 26)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Hermann Voßeler
Subject: Re: How can I shift the image plane?
Date: 28 Apr 2002 18:59:49
Message: <3CCC7CBC.1080504@webcon.de>
Thorsten Froehlich wrote:

>>This *DID* work always.
> 
> No, the example you are quoting never worked.  When look_at was applied
> POV-Ray always made the up and right vectors perpendicular.  If you didn't
> want perpendicular up and right vectors, you could not use look_at.  The same
> is still true in POV-Ray 3.5.
> 

Thanks, I overlooked the "look_at".
I never used look_at when generating stereo pairs.

But if we omit look_at, we can use non-perpendicular right and
direction vectors, is this correct?

If this were correct, the mentioned problem could be solved this way,
without the need of a matrix transform.
Of course it is inconvienient to set up the camera without look_at,
but one could write a macro for this.

Hermann


Post a reply to this message

From: Alex
Subject: Re: How can I shift the image plane?
Date: 29 Apr 2002 00:25:39
Message: <AvkrojF0iLz8EwjU@lazysod.org.uk>
In message <3ccc75bc@news.povray.org>, Thorsten Froehlich 
<tho### [at] trfde> writes

>wrote:
>
>> This *DID* work always.
>
>No, the example you are quoting never worked.  When look_at was applied
>POV-Ray always made the up and right vectors perpendicular.

Ah, now that's interesting. Shame the beta's just expired, I was gonna 
experiment with this.

>If you didn't
>want perpendicular up and right vectors, you could not use look_at.  The same
>is still true in POV-Ray 3.5.
>
>    Thorsten

-- 
Alex


Post a reply to this message

From: Vic
Subject: Re: How can I shift the image plane?
Date: 29 Apr 2002 14:28:45
Message: <3ccd90dd@news.povray.org>
Hi Pov fans!

Bad news: The "matrix" solution is wrong. It works only if the camera
direction vector is very close to the z axis. Sorry guys, other solution is
required. Other matrix values? Manual camera setup including a replacement
of look_at?


solution. Only stereo_base required and scene parsing and transformations
can be reused efficiently. The stereo cache has some problems (sky_sphere
and others), but it could be a good idea.

I'm trying to create my own "Stereo.inc" include file with a special camera
macro to set up a stereo camera. Left and right images are based on the
lowest bit of frame_number, so new clock and frame_number constants had to
be introduced. Animations always have a doubled number of frames, and so on.
This is only an "transitional" solution. Pov should provide support for
stereo_base camera modifier and a double-width output image format, like the
StereoPov patch.

I'll try to implement this feature if I have time to do this.
But now, I've to work on my thesis and 3 other applications.

Best wishes - Vic


Post a reply to this message

From: Rune
Subject: Re: How can I shift the image plane?
Date: 29 Apr 2002 14:35:16
Message: <3ccd9264@news.povray.org>
Vic wrote:
> Bad news: The "matrix" solution is wrong. It works
> only if the camera direction vector is very close
> to the z axis. Sorry guys, other solution is required.
> Other matrix values?

Yes. A single matrix transformation can be used to specify any possible
transformation. Place the camera at the origin facing in the +z
direction and then use just the matrix to align the camera. The first
three values are used for the x (right) vector, the next three the y
(up) vector, the next three for the z (direction) vector and the last
three for the location.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:  http://rsj.mobilixnet.dk (updated Apr 14)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Ring:  http://webring.povray.co.uk


Post a reply to this message

From: Vic
Subject: Important information for camera placement and keystone distortion problems
Date: 29 Apr 2002 15:14:56
Message: <3ccd9bb0@news.povray.org>
Important:

I've tried to replace look_at with my own mechanism to get rid of keystone
distortion. I've faced a vector rotation problem, where the base angle of
the rotation had not been determined. I've recognized, that not only
stereo_base (the distance between the eyes of the viewer in the appropriate
metric)  important, but the direction of the vector between the two eyes!
This is the base (zero degrees) of the camera rotation around the distance
vector (the roll of the camera as I know).

With the "monoscopic" camera model this was not an issue, because this can
be corrected by trial and error camera placement. With stereoscopy this must
be the result of precise calculation, otherwise the left and right images
stress your eyes and brain. This could be the source of most stereography
problems arised using PovRay.

Hermann and Harold? What's your opinion about the issue detailed above?

- Vic -


Post a reply to this message

From: Warp
Subject: Re: How can I shift the image plane?
Date: 29 Apr 2002 16:01:26
Message: <3ccda696@news.povray.org>
Vic <let### [at] fwhu> wrote:
> Bad news: The "matrix" solution is wrong. It works only if the camera
> direction vector is very close to the z axis.

  Ever heard of the rotate and translate commands?

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Harold Baize
Subject: Re: Important information for camera placement and keystone distortion problems
Date: 30 Apr 2002 02:43:05
Message: <3cce3cf9@news.povray.org>
Vic,

Great precision in stereo base calculation is not necessary.
Stereo photographers rarely need to resort to complex
equations, the 1:30 rule is more than enough unless extreme
lens focal lenghths are involved.

By "vector between the two eyes" do you mean convergence?
Again, parallel cameras is your best solution, but if you do
"toe in" or converge the cameras then you do need to be
precise. You will also need to limit the depth of field because
what is sometimes called "on screen deviation" (the displacement
of left and right images on the screen) may cause the eyes to
diverge (rotate out) which is very uncomfortable!

I've never created an difficult to view stereo pair result from
using the 1:30 rule and parallel cameras.

HB

Vic <let### [at] fwhu> wrote in message news:3ccd9bb0@news.povray.org...
> Important:
>
> I've tried to replace look_at with my own mechanism to get rid of keystone
> distortion. I've faced a vector rotation problem, where the base angle of
> the rotation had not been determined. I've recognized, that not only
> stereo_base (the distance between the eyes of the viewer in the
appropriate
> metric)  important, but the direction of the vector between the two eyes!
> This is the base (zero degrees) of the camera rotation around the distance
> vector (the roll of the camera as I know).
>
> With the "monoscopic" camera model this was not an issue, because this can
> be corrected by trial and error camera placement. With stereoscopy this
must
> be the result of precise calculation, otherwise the left and right images
> stress your eyes and brain. This could be the source of most stereography
> problems arised using PovRay.
>
> Hermann and Harold? What's your opinion about the issue detailed above?
>
> - Vic -
>
>


Post a reply to this message

From: Vic
Subject: Re: Important information for camera placement and keystone distortion problems
Date: 30 Apr 2002 05:39:25
Message: <3cce664d@news.povray.org>
Harold,

> Great precision in stereo base calculation is not necessary.

You must have much more experience in this field accoring to your postings.
The human eyes and brain can compensate large keystone distortions in some
cases. In other cases a small distortion causes the eyes not to converge.
What is the important difference between the situations?

> Stereo photographers rarely need to resort to complex
> equations, the 1:30 rule is more than enough unless extreme
> lens focal lenghths are involved.

But the resulting images are adjusted when mounted. In raytracing, my goal
is to do this adjustment by setting the camera properly.

> By "vector between the two eyes" do you mean convergence?

Unfortunately (due to my poor English), I don't know the English counterpart
of all the ususal expressions in this field. For example: I've learned the
"keystone distortion" expression from this thread. Can I learn convergence
too? ;-))

"vector between the two eyes":

#declare rv=<0.0325,0,0>    // position vector of the right eye
#declare lv=<-0.0325,0,0>    // position vector of the left eye
#declare ev=rv-lv                    //vector between the two eyes

> Again, parallel cameras is your best solution, but if you do
> "toe in" or converge the cameras then you do need to be
> precise.

This can be the difference between the situations mentioned above. :-)

You're right. Parallel cameras are the best solution, but post-rendering
adjustment of images are needed to view with red-green glasses or shutter
glasses, where the images should go to the same surface (not cross-eyed
view).

> You will also need to limit the depth of field because
> what is sometimes called "on screen deviation" (the displacement
> of left and right images on the screen) may cause the eyes to
> diverge (rotate out) which is very uncomfortable!

StereoTestA.pov renders a "star field" pattern to the skyglobe at infinite
distance. It causes the human eyes to converge at infinity, so the eyes goes
parallel. Divergence is really unconfortable. I couldn't cause my eyes to
diverge, because stereo_base measured in display metric did not exceed
6.55cm. Conclusion: Physical dimensions of display is important when
displaying stereo images, because stereo_base can easily go above 6.55cm in
real world (monitor) metrics.

> I've never created an difficult to view stereo pair result from
> using the 1:30 rule and parallel cameras.

Are your final prictures (on paper or something else) much smaller than the
visible area of a 17" computer monitor?

Thanks for your help, Vic


Post a reply to this message

From: Hermann Voßeler
Subject: Re: Important information for camera placement and keystone distortion problems
Date: 30 Apr 2002 19:05:44
Message: <3CCF211E.1020908@webcon.de>
Vic wrote:
> ... I've recognized, that not only
> stereo_base (the distance between the eyes of the viewer in the appropriate
> metric)  important, but the direction of the vector between the two eyes!
> This is the base (zero degrees) of the camera rotation around the distance
> vector (the roll of the camera as I know).
> 
> With the "monoscopic" camera model this was not an issue, because this can
> be corrected by trial and error camera placement. With stereoscopy this must
> be the result of precise calculation, otherwise the left and right images
> stress your eyes and brain. This could be the source of most stereography
> problems arised using PovRay.
> 
> Hermann and Harold? What's your opinion about the issue detailed above?
> 

Vic,

You are 100% right.
All vectors of the camera must be transformed as a whole.
It's a good idea to treat the stereoscopic base as a vector too.
See my other post in the new "Stereoscopy" thread for details.

The whole theme is tricky and often very frustrating for beginners.
In my opinion, the reason is: you have to be extremely precise in some
points (e.g alignement, mounting of slides). And then there are other
important points, where you have to be rather intuitive. I mean 
especially the length of the stereo base or (in photography) the 
horizontal alignement of the slides while mounting. There are certain
limits to obey, there are some empirical rules (like the 1:30 rule), 
but to a large extent it's a question of taste.

What is most interesting to me as an artist is, that image composition 
works somewhat different to common (2D) photography or painture.

Hermann


Post a reply to this message

From: Hermann Voßeler
Subject: Re: Important information for camera placement and keystone distortion problems
Date: 30 Apr 2002 20:38:25
Message: <3CCF36D6.6010602@webcon.de>
Vic,

 > Unfortunately (due to my poor English), I don't know the English
 > counterpart of all the ususal expressions in this field. For
 > example: I've learned the "keystone distortion" expression from
 > this thread. Can I learn convergence too? ;-))
 >
:-) I often have the same problem. You probably noticed this,
when reading the texts on my StereoPOV webpage.

If I understand your first posting right, you didn't mean
"convergence", but the stereoscopic base interpreted as a vector.
Convergence measures, how much the eyes are turned inward to look
at a given object. If we shoot a (virtual) ray from the eye through
the corresponding image element on the stereoscopic pair, then
the two rays (one for each eye) usually will be convergent, i.e
they intersect at the location, where the original object is/was.
And at this location, you will percieve the 3D image of the object.

That means, for near objects, there is much convergence of the
"viewing rays", and for distant objects, there is less convergence.

With convergence, there is one "hard limit": For objects at infinite
distance, the viewing rays are parallel ("they intersect at
infinity"). With natural stereoscopic viewing, there will be never
divergence of the viewing rays.

This limit is very hard. Even if there is a little bit tolerance,
people viewing stereoscopic images won't have much fun, if their
eyes are forced to diverge in order to see the image.


Maybee, I should summarize some important rules for
getting easy-to view stereoscopic images.

Hard limits:
(1) Vertical Alignement: Corresponding image elements must be
     presented at exactly the same height.
(2) No Divergence: The spacing for image elements for objects
     at infinite distance must not be larger than the average
     human eye spacing (65 mm). This spacing often is called
     "maximal on screen deviation"

"Should be"-Rules:
(3) You should try to avoid to large "depth contrasts" or
     "depth gaps". The overall depth-of-field should not be to large.
(4) You should try to arrange your objects behind a well defined
     stereoscopic window. Objects placed before the window
     ("off screen") should not touch the image borders.



Vic wrote:
 > You must have much more experience in this field accoring to your
 > postings. The human eyes and brain can compensate large keystone
 > distortions in some cases. In other cases a small distortion causes
 >  the eyes not to converge. What is the important difference between
 >  the situations?
 >

In many cases, there is a large range of tolerance when breaking the
mentioned rules or limits. In my opinion, the key concept for
understanding this tolerance is "image pregnance".
If you are presenting a very visually pregnant, eye-catching Sujet,
then there will be much tolerance. If the things you show are
complicated (I mean visually), difficult to recognize etc, then
allredy going a little bit beyond the mentioned rules will cause
problems for a lot of people.
If you nicely arrange your objects near the stereoscopic window,
give them a well-balanced distribution in space etc. then your
stereo image will "work" on virtually every device (monitor,
anaglyph print, slide projection...) and you can be shure everyone
will be saying "WOW".
If you want to show architecture, large landscapes, mountains in
there real dimensions and proportions, you have to be much more
precise.

It is well known, that we stereo enthusiasts have allmost infinite
tollerance with respect to stereo images. We can fuse (=see in 3D)
allmost everything, even 2 beer bottles posed side by side on a table
:-)


Harold wrote
 >> Stereo photographers rarely need to resort to complex equations,
 >> the 1:30 rule is more than enough unless extreme lens focal
 >> lenghths are involved.
 >

Vic wrote
 > But the resulting images are adjusted when mounted. In raytracing,
 > my goal is to do this adjustment by setting the camera properly.
 >
....
 > I couldn't cause my eyes to diverge, because stereo_base measured
 > in display metric did not exceed 6.55cm. Conclusion: Physical
 > dimensions of display is important when displaying stereo images,
 > because stereo_base can easily go above 6.55cm in real world
 > (monitor) metrics.
 >

This is especially an issue when making stereo films (or videos).
In most cases, it is practically impossible to readjust the film
after the shot, so the camera has to be constructed in a way, that
it gets the window adjustment right from beginning. This is ofted
done by shifting the optics inward, so the optical axes converge.
(This again is often denoted by the term "convergence")
The intersection point of the optical axes defines, where the
stereoscopic window will be. Note the image planes stay parallel.

This was the background, why I built a similar behaviour into
my StereoPOV patch. Stereo images indeed are linked to specific
physical display dimensions. (Of course, there is tolerance
to view them on a display with differing dimensions; see my
discussion about tolerance breaking the rules above)

If a stereo image is *optimally* suited for a slide projection
screen of 1,80 m width, it can not be scaled arbitrary. If you
make it larger, you will get divergence. If you make it smaller,
you will get less depth (i.e. objects at larger distance will
look "flat"). You can compensate by readjusting the images though.

So, for my StereoPOV patch, I defined the camera in a way, that
the stereoscopic window ist identical with the "natural window"
defined by the image plane, i.e. defined by the "up" and "right"
vector. So, if you define the "up" and "right" vector to the
size of your final presentation device, you will get the correct
maximal on screen deviation, i.e. the correct spacing of 65mm
for objects at infinite distance.

It showed up, that some users were rather confused by this
behaviour of my patch. In normal 2D imaging, the image size is
not this important. "up" and "right" there only define the
aspect ratio. Especialy scenes of the type of the "skyvase"
mentioned by Harold Baize caused problems.
So I need to introduce some means to readjust the distance
of the stereoscopic window. I am considering to add a second
keyword besides "stereo_base" in the next Version of StereoPOV
(that will be POV 3.5-based, if possible). What is to be done
internally is evenly scaling the whole camera while pertaining
the position and look_at.


Hermann


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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