POV-Ray : Newsgroups : povray.general : Omni-directional Stereo Content : Re: Omni-directional Stereo Content Server Time
26 Apr 2024 23:48:33 EDT (-0400)
  Re: Omni-directional Stereo Content  
From: Clodo
Date: 22 Mar 2016 07:15:00
Message: <web.56f12898976329954e8811590@news.povray.org>
> That's no surprise, because in the camera direction Z-axis formula you
> have a surplus "-1" factor at the end that's /not/ in the original
> Google formulae.

Ouch. Caused by my incompetence in 3D math... i'm a software security expert,
i'm working on ODS only for fun.

> My suggestion would be to go back to the original Google ODS formulas,
> and use a factor "Handedness" rather than a constant "-1" (also, make
> sure to use the factor on both Z-axis formulae), which can then be set
> to either "-1" for left-handed or "1" for right-handed.

Reverted to the original Google ODS:

// ODS - Top/Bottom
#declare odsIPD = 0.065; // Interpupillary distance
#declare odsLocationX = 0;
#declare odsLocationY = 0;
#declare odsLocationZ = 0;
#declare odsHandedness = -1; // "-1" for left-handed or "1" for right-handed
#declare odsAngle = 0; // Rotation, clockwise, in degree.

camera {
      user_defined
      location {
        function {  odsLocationX + cos(((x+0.5+odsAngle/360)) * 2 * pi -
pi)*odsIPD/2*select(-y,-1,+1) }
        function {  odsLocationY }
        function {  odsLocationZ + sin(((x+0.5+odsAngle/360)) * 2 * pi -
pi)*odsIPD/2*select(-y,-1,+1) * odsHandedness }
      }
      direction {
        function {  sin(((x+0.5+odsAngle/360)) * 2 * pi - pi) * cos(pi / 2
-select(y, 1-2*(y+0.5), 1-2*y) * pi) }
        function {  sin(pi / 2 - select(y, 1-2*(y+0.5), 1-2*y) * pi) }
        function {  -cos(((x+0.5+odsAngle/360)) * 2 * pi - pi) * cos(pi / 2
-select(y, 1-2*(y+0.5), 1-2*y) * pi) * odsHandedness }
      }
    }

The GOOD news for me: this generate pixel per pixel the same image of my
rewritten version of yesterday night.

So, the function above seem the release candidate for the Wiki page. I will
prepare the equivalent side-by-side and single-eye.

Thanks, thanks, thanks for your feedback.


Post a reply to this message

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