POV-Ray : Newsgroups : povray.binaries.images : Single Parse Stereoscopic? Server Time
5 Nov 2024 02:21:19 EST (-0500)
  Single Parse Stereoscopic? (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: Nekar Xenos
Subject: Single Parse Stereoscopic?
Date: 19 Nov 2007 03:36:06
Message: <47414af6@news.povray.org>
Here's a different approach to stereoscopic imaging without having to parse
twice or use the clock setting. I don't know enough about lenses but I think
someone might be able to tweak this to work correctly. I used a repeated
spherical camera normal to get 2 images.

//----------------------------------------------------

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
  max_trace_level 5
}

// ----------------------------------------


camera {
  right x*image_width/image_height
  location  <0.0, 0.5, -4.0>
  look_at   z

          normal {spherical /*scale <10,10,01>*/ translate <.5,.5,-.5>  //
pattern modifier
          warp {
                    repeat x           // repeat direction
                }
                translate -.5*y
                scale <.7,.7,10>
                  //
          }

}


sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

// ----------------------------------------

plane {               // checkered floor
  y, -1
  texture
  {
    pigment {
      checker
      color rgb 1
      color blue 1
      scale 0.5
    }
    finish{
      diffuse 0.8
      ambient 0.1
    }
  }
}

sphere {              // reflective sphere
  0.0, 1
  texture {
    pigment {
      color rgb <0.8,0.8,1.0>
    }
    finish{
      diffuse 0.3
      ambient 0.0
      specular 0.6
      reflection {
        0.8
        metallic
      }
      conserve_energy
    }
  }
}

//-----------------------------------------------------------------
-- 
-Nekar Xenos-


Post a reply to this message


Attachments:
Download 'Stereoscopic.png' (42 KB)

Preview of image 'Stereoscopic.png'
Stereoscopic.png


 

From: sooperFoX
Subject: Re: Single Parse Stereoscopic?
Date: 19 Nov 2007 07:45:00
Message: <web.474184b5f2015f4b943b35b60@news.povray.org>
Hi Nekar,

I am not a photographer (nor very advanced with pov camera) so I could not give
you any _technical_ advice but I think for this to work you'll either need to
move the camera *waaay* back and use a narrow camera angle, or use a different
type of projection because the radial angular perspective distortion ruins the
effect somewhat.

When looking at the image "wall-eyed" I notice that there is a little depth
information near the centre of the image (i.e. it works pretty well for the
sphere and its reflection), but as you get further out to the edges (and
particularly noticeable on the horizontal lines), the curvature distortion is
misaligned between the two images and the brain really struggles to find a
correlation on the two halves, and it becomes very 'distracting'.

I think it is perhaps because of the symmetrical effect in the curvature (it
looks like the distortion is 'mirrored'). If you could find a way to not mirror
the warp/normal but instead clone it from one side of the vertical axis to the
other (-x to +x) that might work. I'm sorry that I don't know enough about the
warp or the spherical pattern to actually help you HOW to do this. This is all
just my observation.

Frankly I am very impressed that it works! I think your theory is more than
halfway there and with some fine-tuning could have application.


Have you thought about modelling how a real stereoscopic camera might work? I.e.
four planar mirrors, two for each 'eye', angled just right so as to split and
spatially separate the viewport down the middle?

E.g. one half of the rays would hit the first mirror and bounce off to the left,
then get reflected back to the intended focal point, only their origin would be
slightly left of the camera's location, and the other half would hit the third
mirror and bounce off to the fourth, and be reflected back to the same focal
point, this time from the right. You should be able to use some geometry to
figure out the angle required for each of the two mirrors on one side, then
just flip it for the other side. Or, maybe you wanted to avoid this altogether
and try another method! :)


Anyway I hope I have helped in some small way, if you're not totally confused by
my non-technical understanding of this... :)


sooperFoX


"Nekar Xenos" <nek### [at] gmailcom> wrote:
> Here's a different approach to stereoscopic imaging without having to parse
> twice or use the clock setting. I don't know enough about lenses but I think
> someone might be able to tweak this to work correctly. I used a repeated
> spherical camera normal to get 2 images.


Post a reply to this message

From: sooperFoX
Subject: Re: Single Parse Stereoscopic?
Date: 19 Nov 2007 08:25:01
Message: <web.47418e7ff2015f4b943b35b60@news.povray.org>
I was just thinking about this some more.. I think it has to do with the
spherical normal to begin with. It looks like the 'splitting' of the viewport
is happening OK (thanks to the warp I presume) but the spherical nature of the
normal is what is causing the distortion.

What if you tried a gradient, something like (forgive my syntax, I don't have
POV in front of me)


gradient x
normal_map {
[0.0 <1, -1>]
[0.5 <0, -1>]
[0.5 <0,  1>]
[1.0 <1,  1>]
}
translate -0.5*x


...or similar. I have absolutely no idea how you would focus something like that
though! Perhaps some clever scaling.. hehehe

Just throwin' it out there.


sooperFoX


P.S. the more I think about it, the more it seems like just trying to find a
"short-cut" for the method I described at the end of my last post.. maybe
prisms instead of mirrors though.. hmmm


"sooperFoX" <bon### [at] gmailcom> wrote:
> ...the radial angular perspective distortion ruins the
> effect somewhat..

--->8--- snip


Post a reply to this message

From: Alain
Subject: Re: Single Parse Stereoscopic?
Date: 19 Nov 2007 11:22:53
Message: <4741b85d$1@news.povray.org>
Nekar Xenos nous apporta ses lumieres en ce 2007/11/19 03:36:
> Here's a different approach to stereoscopic imaging without having to parse
> twice or use the clock setting. I don't know enough about lenses but I think
> someone might be able to tweak this to work correctly. I used a repeated
> spherical camera normal to get 2 images.
> 
> //----------------------------------------------------
> 
> #include "colors.inc"
> 
> global_settings {
>   assumed_gamma 1.0
>   max_trace_level 5
> }
> 
> // ----------------------------------------
> 
> 
> camera {
>   right x*image_width/image_height
>   location  <0.0, 0.5, -4.0>
>   look_at   z
> 
>           normal {spherical /*scale <10,10,01>*/ translate <.5,.5,-.5>  //
> pattern modifier
>           warp {
>                     repeat x           // repeat direction
>                 }
>                 translate -.5*y
>                 scale <.7,.7,10>
>                   //
>           }
> 
> }
> 
> 
> sky_sphere {
>   pigment {
>     gradient y
>     color_map {
>       [0.0 rgb <0.6,0.7,1.0>]
>       [0.7 rgb <0.0,0.1,0.8>]
>     }
>   }
> }
> 
> light_source {
>   <0, 0, 0>            // light's position (translated below)
>   color rgb <1, 1, 1>  // light's color
>   translate <-30, 30, -30>
> }
> 
> // ----------------------------------------
> 
> plane {               // checkered floor
>   y, -1
>   texture
>   {
>     pigment {
>       checker
>       color rgb 1
>       color blue 1
>       scale 0.5
>     }
>     finish{
>       diffuse 0.8
>       ambient 0.1
>     }
>   }
> }
> 
> sphere {              // reflective sphere
>   0.0, 1
>   texture {
>     pigment {
>       color rgb <0.8,0.8,1.0>
>     }
>     finish{
>       diffuse 0.3
>       ambient 0.0
>       specular 0.6
>       reflection {
>         0.8
>         metallic
>       }
>       conserve_energy
>     }
>   }
> }
> 
> //-----------------------------------------------------------------
> 
Try with this camera:

camera {
   right x*image_width/image_height/3 //Otherwise, the sphere is
//stretched verticaly, a lot!
   location  <0.0, 0.5, -4.0>
   look_at   z

           normal {cylindrical 0.5/*scale <10,10,01>*/ translate <.5,.5,-.5> 
//pattern modifier
           warp {
                     repeat x           // repeat direction
                 }
                 translate -.5*y
                 scale <.7,.7,10>
                   //
           }
   angle 60 // to keep the sphere images from drifting apart
}

This camera get rid of the spherical distortion.
Good for parallel vewing.

-- 
Alain
-------------------------------------------------
Grandchildren are God's reward for not killing your own.


Post a reply to this message

From: Leef me
Subject: Re: Single Parse Stereoscopic?
Date: 19 Nov 2007 15:45:01
Message: <web.4741f3fcf2015f4b2a7b15450@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> Nekar Xenos nous apporta ses lumieres en ce 2007/11/19 03:36:
> > Here's a different approach to stereoscopic imaging without having to parse
> > twice or use the clock setting. I don't know enough about lenses but I think
> > someone might be able to tweak this to work correctly. I used a repeated
> > spherical camera normal to get 2 images.
>

> > camera {
> >   right x*image_width/image_height
> >   location  <0.0, 0.5, -4.0>
> >   look_at   z
> >
> >           normal {spherical /*scale <10,10,01>*/ translate <.5,.5,-.5>  //
> > pattern modifier
> >           warp {
> >                     repeat x           // repeat direction
> >                 }
> >                 translate -.5*y
> >                 scale <.7,.7,10>
> >                   //
> >           }
> >
> > }




> >
> > //-----------------------------------------------------------------
> >
> Try with this camera:
>
> camera {
>    right x*image_width/image_height/3 //Otherwise, the sphere is
> //stretched verticaly, a lot!
>    location  <0.0, 0.5, -4.0>
>    look_at   z
>
>            normal {cylindrical 0.5/*scale <10,10,01>*/ translate <.5,.5,-.5>
> //pattern modifier
>            warp {
>                      repeat x           // repeat direction
>                  }
>                  translate -.5*y
>                  scale <.7,.7,10>
>                    //
>            }
>    angle 60 // to keep the sphere images from drifting apart
> }
>
> This camera get rid of the spherical distortion.
> Good for parallel vewing.
>
> --
> Alain
> -------------------------------------------------
> Grandchildren are God's reward for not killing your own.


I can't make any useful suggestions, I just complain ;)

In the upper picture
Alains' version seems to stretch the spheres toward the center
     ( >  |  < )
the spheres are curves on the outside edges, but stretched toward the center.

In the lower picture
Nekar's version seems to compress the sphere from the top


Leef_me


Post a reply to this message


Attachments:
Download 'stereo1&2.jpg' (142 KB)

Preview of image 'stereo1&2.jpg'
stereo1&2.jpg


 

From: William Tracy
Subject: Re: Single Parse Stereoscopic?
Date: 20 Nov 2007 00:58:10
Message: <47427772$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Your images keep giving me the feeling of the "cameras" being too far apart.

Anyway, here's someone who's successfully done what you're trying to do:
http://www.irtc.org/ftp/pub/stills/1998-02-28/dpatrol.jpg
http://www.irtc.org/ftp/pub/stills/1998-02-28/dpatrol.txt

- --
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

You know you've been raytracing too long when you install voice
recognition software to use in your script editor and a month later find
yourself using a tape recorder to speak for you because your voice is shot.
    -- Ken Tyler
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHQndxKrVIcTMekC8RAvVMAJ989l7xbCpwbMkkbYIOY6xe7+WGugCeNrda
zPYAW5iPAgwUBTbZEvRC9ts=
=8kRx
-----END PGP SIGNATURE-----


Post a reply to this message

From: Nekar Xenos
Subject: Re: Single Parse Stereoscopic?
Date: 20 Nov 2007 01:15:47
Message: <47427b93@news.povray.org>
"Leef_me" <nomail@nomail> wrote in message 
news:web.4741f3fcf2015f4b2a7b15450@news.povray.org...

> I can't make any useful suggestions, I just complain ;)
>
> In the upper picture
> Alains' version seems to stretch the spheres toward the center
>     ( >  |  < )
> the spheres are curves on the outside edges, but stretched toward the 
> center.
>
> In the lower picture
> Nekar's version seems to compress the sphere from the top
>
>
> Leef_me
>
>
changing the scale in the camera to <.8,1,10>"looks a lot better now

-- 
-Nekar Xenos-


Post a reply to this message


Attachments:
Download 'Stereoscopic.png' (96 KB)

Preview of image 'Stereoscopic.png'
Stereoscopic.png


 

From: scott
Subject: Re: Single Parse Stereoscopic?
Date: 20 Nov 2007 08:44:54
Message: <4742e4d6$1@news.povray.org>
> Anyway, here's someone who's successfully done what you're trying to do:
> http://www.irtc.org/ftp/pub/stills/1998-02-28/dpatrol.jpg
> http://www.irtc.org/ftp/pub/stills/1998-02-28/dpatrol.txt

Yeh, I was going to suggest that method too, we had a real digital camera 
lying around here somewhere with an attachment like that on it, specifically 
for taking photos to be shown on a 3D display.


Post a reply to this message

From: Nekar Xenos
Subject: Re: Single Parse Stereoscopic?
Date: 20 Nov 2007 09:35:47
Message: <4742f0c3@news.povray.org>
"scott" <sco### [at] laptopcom> wrote in message 
news:4742e4d6$1@news.povray.org...
>> Anyway, here's someone who's successfully done what you're trying to do:
>> http://www.irtc.org/ftp/pub/stills/1998-02-28/dpatrol.jpg
>> http://www.irtc.org/ftp/pub/stills/1998-02-28/dpatrol.txt
>
> Yeh, I was going to suggest that method too, we had a real digital camera 
> lying around here somewhere with an attachment like that on it, 
> specifically for taking photos to be shown on a 3D display.
>
This is very good but if the intent is for animation camera normal is 
faster, so I would like to stick to the camera normal.


-- 
-Nekar Xenos-


Post a reply to this message

From: Alain
Subject: Re: Single Parse Stereoscopic?
Date: 20 Nov 2007 09:58:03
Message: <4742f5fb$1@news.povray.org>
Nekar Xenos nous apporta ses lumieres en ce 2007/11/20 09:35:
> "scott" <sco### [at] laptopcom> wrote in message 
> news:4742e4d6$1@news.povray.org...
>>> Anyway, here's someone who's successfully done what you're trying to do:
>>> http://www.irtc.org/ftp/pub/stills/1998-02-28/dpatrol.jpg
>>> http://www.irtc.org/ftp/pub/stills/1998-02-28/dpatrol.txt
>> Yeh, I was going to suggest that method too, we had a real digital camera 
>> lying around here somewhere with an attachment like that on it, 
>> specifically for taking photos to be shown on a 3D display.
>>
> This is very good but if the intent is for animation camera normal is 
> faster, so I would like to stick to the camera normal.
> 
> 
Try this one:

camera {
   right x*image_width/image_height
   location  <0.0, 0.5, -8.0>
   look_at   z

           normal {marble -0.8 translate <.5,.5,-.5>  }
   angle 60

}

This get rid of the distortions as marble have a triangular shape. Also, it's 
repeating, so you no longer need the repeat warp. It act like a pair of 
achromatic prisms instead as a pair of shifted lences.

-- 
Alain
-------------------------------------------------
Fundamentalism: If shit happens to a televangelist, it's okay.


Post a reply to this message

Goto Latest 10 Messages Next 9 Messages >>>

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