POV-Ray : Newsgroups : povray.general : Omni-directional Stereo Content : Re: Omni-directional Stereo Content Server Time
3 May 2024 03:50:27 EDT (-0400)
  Re: Omni-directional Stereo Content  
From: Clodo
Date: 9 Mar 2016 08:20:00
Message: <web.56e02265976329954e8811590@news.povray.org>
Thanks clipka.


Quick Benchmark: scenes/camera/spherical.pov, 4096x2048 AA 0.3, no-stereo
(tested 3 times each).
All three method generate the same identical image.
----------------
Default camera{spherical}: 22 seconds
----------------
With my C implementation of ODS, direct in tracepixel.cpp (
http://pastebin.com/fJ0Z978Q ), mode 0 (no-stereo): 19 seconds
----------------
With the below user-defined camera: 22 seconds

#declare ipd = 0.065;
#declare eye = 0; // 0: No-Stereo, 1: Left, 2: Right
camera {
      user_defined
      location {
        function { cos((x+0.5) * 2 * pi - pi)*ipd/2*eye }
        function { 0 }
        function { sin((x+0.5) * 2 * pi - pi)*ipd/2*eye }
      }
      direction {
        function { sin((x+0.5) * 2 * pi - pi) * cos(pi / 2 - (1-(y+0.5))*pi) }
        function { sin(pi / 2 - (1-(y+0.5))*pi) }
        function { cos((x+0.5) * 2 * pi - pi) * cos(pi / 2 - (1-(y+0.5))*pi) }
      }
    }
---------------

clipka, my C implementation can render directly in one image both side-by-side
or top-bottom.
I was unable to do the same thing with user_defined camera.
Besides the need of declaration/computation of common variables theta/phi in
each vector3 components (i can't find a method to define it outside),
i don't find the right syntax for inject some #if.
For example
function { #if(x<0.5) x #else 1/x #end }
don't work...
I'm missing something about syntax, or isn't possible? Thanks for any feedback.


Post a reply to this message

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