POV-Ray : Newsgroups : povray.text.scene-files : Looking for rendering Omnidirectional Stereo images for VR headset Server Time
21 Dec 2024 09:23:32 EST (-0500)
  Looking for rendering Omnidirectional Stereo images for VR headset (Message 11 to 20 of 38)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Jaime Vives Piqueres
Subject: Re: Looking for rendering Omnidirectional Stereo images for VR headset
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

From: William F Pokorny
Subject: Re: Looking for rendering Omnidirectional Stereo images for VRheadset
Date: 11 Mar 2016 07:44:05
Message: <56e2bd95$1@news.povray.org>
On 03/11/2016 06:35 AM, Jaime Vives Piqueres wrote:
>
>    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?
>

I see the same with your scene. This user defined camera:

camera {
        user_defined
        location {
          function { x }
          function { y }
          function { 0 }
        }
        direction {
          function { x }
          function { y }
          function { 1 }
        }
}

works for me. Something other than the new camera amiss I guess, but 
what...

Bill P.


Post a reply to this message

From: Clodo
Subject: Re: Looking for rendering Omnidirectional Stereo images for VR headset
Date: 11 Mar 2016 09:35:00
Message: <web.56e2d72e6ae27ba34e8811590@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
>    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?


- I downloaded the official POV-Ray.
- I downloaded this build (64 bit) and replace only the .exe in the POV-Ray
official
https://github.com/POV-Ray/povray/releases/tag/v3.7.1-alpha.8509766%2Bav119
- Open, create jaime.pov with exactly your code above, render:
http://www.clodo.it/host/images/a1c9425560bdcc869a362d71bfb6b11b339e3512.png
(480000 rays count).

Maybe you have a different Alpha build?


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Looking for rendering Omnidirectional Stereo images for VR headset
Date: 11 Mar 2016 10:03:47
Message: <56e2de53$1@news.povray.org>

> Maybe you have a different Alpha build?

   Yes, I have the latest one (8514084), compiled from sources with gcc.
It should have the user defined camera too, because it accepts the
syntax and works when using functions that mimic the default camera:

camera{
   user_defined
   location{
     function{x}
     function{y}
     function{-1}
   }
   direction{
     function{x*4/3}
     function{y}
     function{1}
   }
}


hmmmm...

--
jaime


Post a reply to this message

From: William F Pokorny
Subject: Re: Looking for rendering Omnidirectional Stereo images for VR headset
Date: 11 Mar 2016 10:17:23
Message: <56e2e183$1@news.povray.org>
On 03/11/2016 09:33 AM, Clodo wrote:
> Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
>>     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?
>
>
> - I downloaded the official POV-Ray.
> - I downloaded this build (64 bit) and replace only the .exe in the POV-Ray
> official
> https://github.com/POV-Ray/povray/releases/tag/v3.7.1-alpha.8509766%2Bav119
> - Open, create jaime.pov with exactly your code above, render:
> http://www.clodo.it/host/images/a1c9425560bdcc869a362d71bfb6b11b339e3512.png
> (480000 rays count).
>
> Maybe you have a different Alpha build?
>

I am on Ubuntu 14.04 - as is Jamie normally - and using 
3.7.1-alpha.8514084.unofficial.

I am starting to wonder if this is another windows/unix difference. I 
think Christoph said something like a direction of 0 renders nothing. If 
I change Jamie's directional functions only to :

                    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) }
             function { 1 }
           }

I do see a result though not the correct one. Guess I'll see if I can 
step back to 8509766 first.

Bill P.


Post a reply to this message

From: William F Pokorny
Subject: Re: Looking for rendering Omnidirectional Stereo images for VRheadset
Date: 11 Mar 2016 10:31:16
Message: <56e2e4c4$1@news.povray.org>
On 03/11/2016 10:17 AM, William F Pokorny wrote:
>
> I am on Ubuntu 14.04 - as is Jamie normally - and using
> 3.7.1-alpha.8514084.unofficial.
>
> I am starting to wonder if this is another windows/unix difference. I
> think Christoph said something like a direction of 0 renders nothing. If
> I change Jamie's directional functions only to :
>
>                     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) }
>              function { 1 }
>            }
>
> I do see a result though not the correct one. Guess I'll see if I can
> step back to 8509766 first.
>
> Bill P.

8509766 gives me the same result on Ubuntu 14.04.

Interesting too is that changing the z directional function to:

function { 0.1+cos((select(x,(x+0.5)*2,(x*2)) * 2 * pi) - pi) * cos(pi / 
2 - (1-(y+0.5))*pi) }

gives a partial image.

Bill P.


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Looking for rendering Omnidirectional Stereo images for VRheadset
Date: 11 Mar 2016 10:37:17
Message: <56e2e62d$1@news.povray.org>

> Interesting too is that changing the z directional function to:
>
> function { 0.1+cos((select(x,(x+0.5)*2,(x*2)) * 2 * pi) - pi) * cos(pi /
> 2 - (1-(y+0.5))*pi) }
>
> gives a partial image.

   Yes, for me +1 gives one part, and -1 seems to give the rest.

--
jaime


Post a reply to this message

From: William F Pokorny
Subject: Re: Looking for rendering Omnidirectional Stereo images for VRheadset
Date: 11 Mar 2016 19:13:37
Message: <56e35f31$1@news.povray.org>
On 03/11/2016 10:37 AM, Jaime Vives Piqueres wrote:

>> Interesting too is that changing the z directional function to:
>>
>> function { 0.1+cos((select(x,(x+0.5)*2,(x*2)) * 2 * pi) - pi) * cos(pi /
>> 2 - (1-(y+0.5))*pi) }
>>
>> gives a partial image.
>
>    Yes, for me +1 gives one part, and -1 seems to give the rest.
>
> --
> jaime
>

It looks like the difference has something to do with this test in 
<install>/source/core/render/tracepixel.cpp :

//          if (cameraDirection.IsNearNull(EPSILON))
//              return false;

because if commented as shown above, I get the same result seen from the 
posted windows exe result. I'm still playing and I'll post more if I 
learn more.

Bill P.


Post a reply to this message

From: William F Pokorny
Subject: Re: Looking for rendering Omnidirectional Stereo images for VRheadset
Date: 11 Mar 2016 19:47:31
Message: <56e36723$1@news.povray.org>
On 03/11/2016 07:13 PM, William F Pokorny wrote:
>
> It looks like the difference has something to do with this test in
> <install>/source/core/render/tracepixel.cpp :
>
> //          if (cameraDirection.IsNearNull(EPSILON))
> //              return false;
>
> because if commented as shown above, I get the same result seen from the
> posted windows exe result. I'm still playing and I'll post more if I
> learn more.
>
> Bill P.

Using fabs() instead of abs() in the following two places in 
<install>/source/coure/math/vector.h fixes the Ubuntu 14.04 issue for me.

... for 2D vectors
          inline bool IsNearNull(T epsilon) const
         {
             return (fabs(vect[X]) < epsilon) &&
                    (fabs(vect[Y]) < epsilon);
         }
... for 3D vectors
         inline bool IsNearNull(T epsilon) const
         {
             return (fabs(vect[X]) < epsilon) &&
                    (fabs(vect[Y]) < epsilon) &&
                    (fabs(vect[Z]) < epsilon);
         }


I believe fabs() is the safe function to use. Must be the MS compiler in 
use did the right thing with just abs() on seeing the input is a float.

Bill P.


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Looking for rendering Omnidirectional Stereo images for VRheadset
Date: 12 Mar 2016 04:43:20
Message: <56e3e4b8$1@news.povray.org>

>
> Using fabs() instead of abs() in the following two places in
> <install>/source/coure/math/vector.h fixes the Ubuntu 14.04 issue for
> me.
>

   Yep... that fixes it also for me. Good job, Bill... thanks!

   I will let rendering the cave in ODS format this night, then will make
the image available so those with VR glasses can test it (I did buy
yesterday some cheap Cardboard glasses for 3 euros, and lost an hour
mounting them just to discover that my Android phone is not
compatible... :).

--
jaime


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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