POV-Ray : Newsgroups : povray.general : Stereoscopic camera Server Time
31 Jul 2024 04:24:01 EDT (-0400)
  Stereoscopic camera (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Paul Bourke
Subject: Stereoscopic camera
Date: 28 Oct 2007 02:20:01
Message: <web.4724379617f999ac65f2686d0@news.povray.org>
A stereoscopic camera for PovRay.
   http://local.wasp.uwa.edu.au/~pbourke/modelling_rendering/stereopov/
Implemented as
   camera {
      stereoscopic
      location ...
      up y
      right ...
      angle ...
      sky ...
      look_at ...
      zeroparallax ...
      eyeoffset ...
   }
Now I know there are various ways at doing stereoscopic projections in PovRay,
unfortunately most are either plain wrong, only create stereo pairs suited to
"eye trick" viewing, create images pairs that are hard to view for extended
periods, or are not couched in terms of parameters stereoscopic content
producers need. While the above requires source code modification and
recompiling, it at least creates stereo pairs correctly and with a natural
specification.

ps: This is the first time I've modified the PovRay source, hope I've taken the
right approach and style.
-------------------------------------
P a u l   B o u r k e
http://local.wasp.uwa.edu.au/~pbourke/


Post a reply to this message

From: Warp
Subject: Re: Stereoscopic camera
Date: 28 Oct 2007 05:13:01
Message: <472460ad@news.povray.org>
Paul Bourke <pau### [at] uwaeduau> wrote:
> A stereoscopic camera for PovRay.
>    http://local.wasp.uwa.edu.au/~pbourke/modelling_rendering/stereopov/

  I don't completely understand
http://local.wasp.uwa.edu.au/~pbourke/modelling_rendering/stereopov/offaxis.gif

  The two arrows on the "eyes" are completely parallel, as if indicating
that the "eyes" are looking at infinity. However, the fields of view would
indicate that the "eyes" are actually looking at the center of the projection
plane. Which one is it?

  The example image at the bottom of the page also confuses me. If
I understand it correctly, the green sphere is at the projection plane,
where the "eyes" are focused, and thus remains at the same place in both
images. The blue sphere is closer to the camera than this focus point,
and thus gets doubled (with inverted parallax), and the white sphere is
farther away from tha camera than the focus point and also gets doubled
(with normal parallax).
  The floor tiles don't seem to match, though.

  (However, now that I look more closely, it seems that the floor is
actually some distance away from the cube, deducing from the shadow.
This was rather confusing. Perhaps it would be clearer if the cube
standed on the floor instead of hovering?)

-- 
                                                          - Warp


Post a reply to this message

From: Rune
Subject: Re: Stereoscopic camera
Date: 28 Oct 2007 10:23:31
Message: <4724a973$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message 
news:472460ad@news.povray.org...
> Paul Bourke <pau### [at] uwaeduau> wrote:
>> A stereoscopic camera for PovRay.
>>    http://local.wasp.uwa.edu.au/~pbourke/modelling_rendering/stereopov/
>
>  I don't completely understand
> http://local.wasp.uwa.edu.au/~pbourke/modelling_rendering/stereopov/offaxis.gif
>
>  The two arrows on the "eyes" are completely parallel, as if indicating
> that the "eyes" are looking at infinity.

Naturally, the eyes can look at many different point pairs in the picture. 
The points where the arrowed directions hit the plane is just one such pair, 
and this particular one would indeed have infinite distance.

However, I think the arrowed lines are more meant to show off that the image 
planes for the two eyes are in fact identical, which could not have been 
achieved using a standard perspective camera, unless you used a matrix to 
skew the camera. Any perspective image has only one point that is 
undistorted in the sense that a sphere looks like a circle and not like an 
ellipse. Normally, in standard perspective POV-Ray camera that is not 
skewed, this point is in the centre of the image. However, as illustrated in 
the above diagram, the images for the left and right eyes have this 
undistorted point to the left and to the right of the centre of the image 
respectively. This makes it possible for the two projection planes to be 
parallel (and even be identical in this case).

> However, the fields of view would indicate that the "eyes" are actually 
> looking
> at the center of the projection plane.

I don't think it indicates that.

>  The example image at the bottom of the page also confuses me.
<snipped>

You seem to have figured it out yourself. :)

Rune


Post a reply to this message

From: Jellby
Subject: Re: Stereoscopic camera
Date: 28 Oct 2007 10:53:39
Message: <jsnev4-man.ln1@badulaque.unex.es>
Among other things, Warp saw fit to write:

>   I don't completely understand
>
http://local.wasp.uwa.edu.au/~pbourke/modelling_rendering/stereopov/offaxis.gif
> 
>   The two arrows on the "eyes" are completely parallel, as if indicating
> that the "eyes" are looking at infinity. However, the fields of view would
> indicate that the "eyes" are actually looking at the center of the
> projection plane. Which one is it?

It may be clearer if you look at this diagram:

http://local.wasp.uwa.edu.au/~pbourke/projection/stereorender/raystereo2.gif

The two "eyes" are looking at two different points, which means their
respective fields of view are not exactly the same, but they overlap in
some region, and it is there where the stereoscopic vision works. The image
you pointed at first is somehow already "cropped" to this overlapping field
(the red line in the second image).

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: Warp
Subject: Re: Stereoscopic camera
Date: 28 Oct 2007 17:04:52
Message: <47250784@news.povray.org>
Jellby <me### [at] privacynet> wrote:
> It may be clearer if you look at this diagram:

> http://local.wasp.uwa.edu.au/~pbourke/projection/stereorender/raystereo2.gif

> The two "eyes" are looking at two different points, which means their
> respective fields of view are not exactly the same, but they overlap in
> some region, and it is there where the stereoscopic vision works. The image
> you pointed at first is somehow already "cropped" to this overlapping field
> (the red line in the second image).

  So the situation is modelled so that the eyes are assumed to be looking
at infinity?

  Could someone explain to me how this models reality? In reality when
you look at an object you don't look at infinitiy. Your eyes are not
parallel, but converge at a point (usually the object of interest).

-- 
                                                          - Warp


Post a reply to this message

From: Rune
Subject: Re: Stereoscopic camera
Date: 28 Oct 2007 19:59:38
Message: <4725307a$1@news.povray.org>
"Warp" wrote:
> Jellby <me### [at] privacynet> wrote:
>> It may be clearer if you look at this diagram:
>
>> http://local.wasp.uwa.edu.au/~pbourke/projection/stereorender/raystereo2.gif
>
>> The two "eyes" are looking at two different points, which means their
>> respective fields of view are not exactly the same, but they overlap in
>> some region, and it is there where the stereoscopic vision works. The 
>> image
>> you pointed at first is somehow already "cropped" to this overlapping 
>> field
>> (the red line in the second image).
>
>  So the situation is modelled so that the eyes are assumed to be looking
> at infinity?

No...!

Try to read this page in full before asking that question yet again...:
http://local.wasp.uwa.edu.au/~pbourke/projection/stereorender/

Rune


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Stereoscopic camera
Date: 28 Oct 2007 20:05:05
Message: <472531c1$1@news.povray.org>
Warp wrote:
> Jellby <me### [at] privacynet> wrote:
>> It may be clearer if you look at this diagram:
> 
>> http://local.wasp.uwa.edu.au/~pbourke/projection/stereorender/raystereo2.gif
> 
>> The two "eyes" are looking at two different points, which means their
>> respective fields of view are not exactly the same, but they overlap in
>> some region, and it is there where the stereoscopic vision works. The image
>> you pointed at first is somehow already "cropped" to this overlapping field
>> (the red line in the second image).
> 
>   So the situation is modelled so that the eyes are assumed to be looking
> at infinity?

No. Check one of the better books on virtual reality systems, they usually
have a good and comprehensive explanation of what is going on there.

	Thorsten


Post a reply to this message

From: Paul Bourke
Subject: Re: Stereoscopic camera
Date: 28 Oct 2007 21:45:00
Message: <web.4725483858c111e2e5a039020@news.povray.org>
>   (However, now that I look more closely, it seems that the floor is
> actually some distance away from the cube, deducing from the shadow.
> This was rather confusing. Perhaps it would be clearer if the cube
> standed on the floor instead of hovering?)

Actually, that is also intentional. I know the model/rendering is fairly lame
but everything there is created for a precise reason, namely so that it can be
verified when viewed in stereo.

So for example, if I match the offaxis frustums used in PovRay to the real
frustums my eyes make to the stereoscopic projected screen I have here then I
expect ...
- for the cube to be exactly half in and half out of the room
- the cube should appear to hover at the right height  *** to address your
comment.
- the floor to be a continuation of the real floor here with the right
perspective (VERY powerful)
- the balls to appear at the expected positions, in particular the blue one half
way between me and the scrreen and the green one exactly at the screen depth

Now of course most times one doesn't have the luxury of positioning your head at
just the right spot, or the screen is a different size, etc. These all cause the
depths to be distorted, scaled if one sits too close or far, sheared if one is
positioned off center ... we are quite intolerant to this (as long we one stays
still) and the depth relations still exist (if wrong) and are engaging. But for
some applications it is important to aim for a 1:1 relationship between the
real and the virtual, this can be acheived with this idea of matching the
frustums used to create the content with the real frustums.

Of course with OpenGL and realtime generation the frustums can be dynamically
modified to give the exactly right view no matter where the viewer is....hence
head tracked stereoscopic systems.


Post a reply to this message

From: Rune
Subject: Cool stereo effect
Date: 29 Oct 2007 04:47:41
Message: <4725ac3d@news.povray.org>
Sorry for being somewhat off-topic but I have a stereo-related anecdote. ;)

When setting up stereo cameras in a virtual scene, one should consider which 
eye separation will show off the virtual object or  scene in the best 
possible way.

For example, if you have a height-field of a mountain, you could show it off 
like a small model hovering in front of the screen (this will give great 
depth information to your eyes). This is achieved by using a very large 
stereo separation between the virtual cameras, as if you are a giant looking 
at the mountain.

Alternatively you can make the mountain 1:1 and have it be an enormous 
mountain that extends far into the screen. This gives less depth information 
to your eyes for the far parts (like with a real life mountain) but it gives 
a great sense of immersion, like actually being a small person looking at a 
real mountain. This is of course achieved by using a realistically small 
stereo separation between the virtual cameras.

Now, in animations and simulation, the stereo separation can be dynamically 
changed. The movement in camera positions is so subtle that the eyes don't 
even really notice it. So imagine this:
You are looking at a small model of a mountain hovering just a few feet away 
from your eyes. Then gradually, without the mountain or camera seeming to 
move at all, you're suddenly looking at the exact same image, except that 
you're looking down at a huge mountain underneath you. The mountain didn't 
seem to grow bigger, because it still fills the exact same area of your 
field of view - suddenly it just *is* bigger!

I have tried this in an OpenGL simulation I made together with two others, 
which we had the opportunity to see in a 3D panorama (wearing 3d glasses) 
and it's one of the weirdest visual effects I've seen. It literally takes a 
little while for the eyes to understand what have happened - they're not 
very good at spotting the changing separation as it happens.

Well, just one of the fun things you can try with stereo effects. :)

Rune


Post a reply to this message

From: Paul Bourke
Subject: Re: Cool stereo effect
Date: 29 Oct 2007 05:25:01
Message: <web.4725b4843c64de7a65f2686d0@news.povray.org>
> Well, just one of the fun things you can try with stereo effects. :)

Indeed, changes in eye separation and zero parallax distance (either together or
independently) are two things we don't experience in real life and I remember
the great surprise when I first did it and didn't have a neural meltdown.
Fortunate because in some cases you absolutely have to so this, for example,
flying about any model where there are large changes in scale .... for example
leaving earth and flying out to cosmological scale, or zooming in from human
scale to the molecular scale. My usual algorithm is to derive the zero parallax
distance from the scale of my immediate surrounds and then eye separation
becomes 1/30 of that, usually makes for easy on the eye stereo.

-------------------------------------
P a u l   B o u r k e
http://local.wasp.uwa.edu.au/~pbourke/


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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