POV-Ray : Newsgroups : povray.general : Stereoscopic camera Server Time
31 Jul 2024 08:25:49 EDT (-0400)
  Stereoscopic camera (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
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

From: Rune
Subject: Re: Cool stereo effect
Date: 29 Oct 2007 12:02:17
Message: <47261219$1@news.povray.org>
"Paul Bourke" wrote:
>> 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

I don't think there's any such thing as zero parallax distance in real 
life - that would require the presence of a projection plane. ;)

> and I remember
> the great surprise when I first did it and didn't have a neural meltdown.

Well, changing eye separation is equivalent to scaling the entire world up 
or down using the point between your eyes as the center of the scaling. The 
effect is unfamiliar but the concept is not completely alien.

Rune


Post a reply to this message

From: Dave Bodenstab
Subject: Re: Stereoscopic camera
Date: 15 Nov 2007 18:36:40
Message: <473cd808@news.povray.org>
Paul Bourke wrote:
> A stereoscopic camera for PovRay.
>    http://local.wasp.uwa.edu.au/~pbourke/modelling_rendering/stereopov/

Having experimented with generating stereo views with povray, I really
liked Mr. Bourke's stereoscopic camera patch.  However, it still relies
on one essentially having to run povray twice (once for the left view
and once for the right view).  It is true that while the example given on

   http://local.wasp.uwa.edu.au/~pbourke/modelling_rendering/stereopov/

produces both views, it relies on the animation loop to compute the
eye separation:

   eyeoffset -0.5*EYESEP + clock*EYESEP

This makes it difficult to generate a stereo animation; one has to
either run povray many, many times (once for each frame), or run povray
twice using a different .pov/.inc file.

Since povray handles animations by re-rendering each frame and writing
the resulting images as image000, image001, etc., I thought why not have
the stereoscopic camera make povray act in a similar fashion?

I have modified Mr. Bourke's stereoscopic camera slightly:

   #local VP = <0,0,1>;
   #local ZEROP = 2;              // Distance to zero parallax
   camera {
      stereoscopic                // New camera type
      location VP
      up y
      right image_width*x/image_height
      angle 60
      sky <0,0,1>
      look_at VP + <1,0,0>
      zeroparallax ZEROP          // Distance to zero parallax
      eyeseparation ZEROP / 30    // Separation between left/right images
   }

Instead of providing the eye offset for the left/right images,
the eye separation is provided.  Povray now does the math and renders
both images.  In the same way that the animation loop appends 0,
1, ... to the output image names for each frame, povray will append
'L' and 'R' to the left/right image names.  If used within an animation,
the image names become 'L0', 'R0', 'L1', etc.

---

I know that there have been macros and other stereo patches in the past.
For what it's worth, this is another one.  Some pluses might be:

   + all of the reasons mentioned by Mr. Bourke
   + integrated so it can be used with animations
   + using the Post_Frame_Command.sh automatically creates a red-cyan
     anaglyph from the left/right images
   + using the Post_Scene_Command.sh automatically creates a movie from
     the anaglyph images

See povray.unofficial.patches for the patch.  It also includes a modification
to scenes/advanced/ionic5/ionic5.pov to use the new stereoscopic camera to
render the stereo pair.

Thank you Mr. Bourke for the real work, and giving me the motivation for
this.

Dave Bodenstab


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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