POV-Ray : Newsgroups : povray.text.scene-files : Looking for rendering Omnidirectional Stereo images for VR headset : Re: Looking for rendering Omnidirectional Stereo images for VR headset Server Time
29 Apr 2024 05:39:44 EDT (-0400)
  Re: Looking for rendering Omnidirectional Stereo images for VR headset  
From: Jaime Vives Piqueres
Date: 11 Mar 2016 06:35:35
Message: <56e2ad87$1@news.povray.org>

> 2- Use this camera in your scene:
> (sorry, actually doesn't support vector3 direction)
>
> #declare ipd = 0.065; // Interpupillary distance
> #declare cameraLocationX = 0;
> #declare cameraLocationY = 0;
> #declare cameraLocationZ = 0;
> camera {
>        user_defined
>        location {
>          function { cameraLocationX + cos(select(x,(x+0.5)*2,(x*2)) * 2 * pi -
> pi)*ipd/2*select(x,-1,1) }
>          function { cameraLocationY }
>          function { cameraLocationZ + sin(select(x,(x+0.5)*2,(x*2)) * 2 * pi -
> pi)*ipd/2*select(x,-1,1) }
>        }
>        direction {
>          function { sin(select(x,(x+0.5)*2,(x*2)) * 2 * pi - pi) * cos(pi / 2 -
> (1-(y+0.5))*pi) }
>          function { sin(pi / 2 - (1-(y+0.5))*pi) }
>          function { cos(select(x,(x+0.5)*2,(x*2)) * 2 * pi - pi) * cos(pi / 2 -
> (1-(y+0.5))*pi) }
>        }
>      }

   Hmmm... I don't know what I'm doing wrong, but even with a simple 
test scene all I get is a black image. I'm using the latest alpha, and 
it doesn't gives any error, but the ray count on the output is zero. Any 
ideas?

--
#version 3.7;

global_settings{
   assumed_gamma 1.0
}

plane{y,-10
   pigment{rgb 1}
}

sphere{0,10
   pigment{rgb <1,0,0>}
   translate <0,0,50>
}

light_source{
   100*y,10
}

/*
camera{
   location <0,0,-1>
   direction 1*z
}
*/

// ODS camera by Clodo
#declare odsIPD = 0.065;
#declare odsLocationX = 0;
#declare odsLocationY = 0;
#declare odsLocationZ = -1;
#declare odsDirectionX = 0;
#declare odsDirectionY = 0;
#declare odsDirectionZ = 1;
camera {
       user_defined
       location {
         function { odsLocationX + cos(select(x,(x+0.5)*2,(x*2)) * 2 * pi -
pi)*odsIPD/2*select(x,-1,1) }
         function { odsLocationY }
         function { odsLocationZ + sin(select(x,(x+0.5)*2,(x*2)) * 2 * pi -
pi)*odsIPD/2*select(x,-1,1) }
       }
       direction {
         function { sin(select(x,(x+0.5)*2,(x*2)) * 2 * pi - pi) * 
cos(pi / 2 -
(1-(y+0.5))*pi) }
         function { sin(pi / 2 - (1-(y+0.5))*pi) }
         function { cos(select(x,(x+0.5)*2,(x*2)) * 2 * pi - pi) * 
cos(pi / 2 -
(1-(y+0.5))*pi) }
       }
     }

--
jaime


Post a reply to this message

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