POV-Ray : Newsgroups : povray.programming : Photovista 360 panoramas of POV scenes Server Time
29 Jul 2024 04:30:21 EDT (-0400)
  Photovista 360 panoramas of POV scenes (Message 1 to 4 of 4)  
From: Steve Smith
Subject: Photovista 360 panoramas of POV scenes
Date: 18 Dec 1998 07:16:33
Message: <367A4942.E6C7368A@pavan.co.uk>
Im using the Photovista 360 panorama applet to view  ray traced scenes.
The results are quite good, they do give a very immersive effect (you
can see the the result at
http://www.pavan.co.uk/pavanvrml.html ).

My problem is....

I'm using povray animation to produce 4 views with 90 angles and
stitching them together to make a panorama. Photovista then requires me
to define the camera focal length.
Can anyone give me a povray camera definition which would correspond to
an 18mm camera? (better still a general formula)

Also, it possible to define a single 360 view? The panoramic camera
always seems to result in a view of about 180 degrees

Thanks in advance.

--
-------------------------------------------------------------------------

Steve Smith
Rhiwlan, Penrhyncoch, Aberystwyth, Ceredigion, SY23 3EH, Wales
Tel: 01970 820750
Email: ste### [at] pavancouk
http://www.pavan.co.uk


Post a reply to this message

From: Ken
Subject: Re: Photovista 360 panoramas of POV scenes
Date: 18 Dec 1998 17:24:41
Message: <367AD5EA.EE9@pacbell.net>
Steve Smith wrote:
> My problem is....
> 
> Can anyone give me a povray camera definition which would correspond to
> an 18mm camera? (better still a general formula)

Sorry no help here
 
> Also, it possible to define a single 360 view? The panoramic camera
> always seems to result in a view of about 180 degrees

I believe that the only camera type that supports 360 is the
fisheye camera and the raial distortion from that would
probably be un bearable for this work. I might be worth
a try anyway.

-- 
 Ken Tyler

 tyl### [at] pacbellnet


Post a reply to this message

From: Mike
Subject: Re: Photovista 360 panoramas of POV scenes
Date: 18 Dec 1998 17:43:19
Message: <367B7516.55004222@aol.com>
There was some discussion on this that I started here a little while
back.  Chris Colefax posted a method for creating these views using a
panoramic camera and later I posted a simple patch for doing it with one
render.

Here's a repost:

Unfortunately, the camera does not properly render angles over 180
degrees (possibly the same bug as Roland pointed out with the
ultra_wide_angle?).  This problem can be quite easily overcome by first
rendering the image with the desired camera:

   camera {location <0, 0, 0> look_at <0, 0, 1>
      right x up y panoramic angle 180}

at a 1:1 ratio, and then rotating the camera by y*180 and rendering to a
second image of the same size.  When the two images are combined
side-by-side you should have the perfect image_map for a sphere.  In
fact, I tried mapping an quick test scene to a semitransparent sphere in
front of the original scene, and all objects seemed to correlate very
well, with no distortion (even at the poles).

And here's the patch I came up with a few days later.  I've wanted to go
back and make it work better, but I haven't had the time to spend on it:

While I had noticed that I could get half of the spherical projection
this way, that was long before I had stared at the code for hours and
hours.  I decided to go back and look at the code and found that I could
get a full 360 view by simply changing x0 to go from 0 to 2 instead of 0
to 1.  Here's the code for anyone interested in trying it out:

   case TEST_CAMERA_1:

/* Convert the x coordinate to be a DBL from 0.0 to 2.0. */ //changed
from 0.0 to 1.0

      x0 = 2 * x / (DBL)Frame.Screen_Width;

      /* Convert the y coordinate to be a DBL from -1.0 to 1.0. */

      y0 = 2.0 * ((DBL)(Frame.Screen_Height - 1) - y) /
(DBL)Frame.Screen_Height - 1.0;

      /* Get cylindrical coordinates. */

      x0 = (1.0 - x0) * M_PI;

      y0 = M_PI_2 * y0;

      cx = cos(x0);
      sx = sin(x0);

      if (fabs(M_PI_2 - fabs(y0)) < EPSILON)
      {
        if (y0 > 0.0)
        {
          ty = BOUND_HUGE;
        }
        else
        {
          ty = - BOUND_HUGE;
        }
      }
      else
      {
        ty = tan(y0);
      }

      /* Create primary ray. */

      VLinComb3(Ray->Direction, cx, FCR, ty, FCU, sx, FCD);

      initialize_ray_container_state(Ray, Precompute_Camera_Constants);

      Precompute_Camera_Constants = FALSE;

      break;

If rendered with the following camera, the resulting image can be mapped
onto a sphere to recreate the scene.  There does appear to be a slight
amount of distortion, but that may be due to the scene I was rendering.
The top and bottom will be seamless.

camera {
test_camera_1
location <0, 0, 0> look_at <0, 0, 1>
right x
up y
angle 180
}

A 2:1 aspect ratio should be used for the image, so a 1000 pixel wide
image should be 500 pixels in height.  I'm sure this was an odd
workaround and that the code could be changed to work with an angle of
360, but I'm just happy to have found a solution. ;-)

-Mike


Steve Smith wrote:
> 
> Im using the Photovista 360 panorama applet to view  ray traced scenes.
> The results are quite good, they do give a very immersive effect (you
> can see the the result at
> http://www.pavan.co.uk/pavanvrml.html ).
> 
> My problem is....
> 
> I'm using povray animation to produce 4 views with 90 angles and
> stitching them together to make a panorama. Photovista then requires me
> to define the camera focal length.
> Can anyone give me a povray camera definition which would correspond to
> an 18mm camera? (better still a general formula)
> 
> Also, it possible to define a single 360 view? The panoramic camera
> always seems to result in a view of about 180 degrees
> 
> Thanks in advance.
> 
> --
> -------------------------------------------------------------------------
> 
> Steve Smith
> Rhiwlan, Penrhyncoch, Aberystwyth, Ceredigion, SY23 3EH, Wales
> Tel: 01970 820750
> Email: ste### [at] pavancouk
> http://www.pavan.co.uk


Post a reply to this message

From: Alain CULOS
Subject: Re: Photovista 360 panoramas of POV scenes
Date: 8 Jan 1999 16:25:48
Message: <367AC2E2.B9B6A99E@bigfoot.com>
Steve Smith wrote:

> Also, it possible to define a single 360 view? The panoramic camera
> always seems to result in a view of about 180 degrees

Read the Doc, it's all in there though I would appreciate more extensive
explanations. I understand these can be confusing for someone not on top of
POV, but then what's the purpose of the doc ?

For example, in a camera statement you can use :
1/
  cylinder 1
  angle 360

or
2/
  ultra_wide_angle
  angle 720
I know, weird as it may seem there seems to be a minor bug and this angle
gets (or seems to) divided by two !!! Just make it double and you get what
you want.

These two examples give very different results, so try and chose for best
match with your wishes.
In the cylinder bit, you'll need to adjust the height and width of your
picture and/or the aspect ratio of the camera. For a pixel ratio of 3.1415
(pi) you'll need an aspect ratio of 2 in the vertical direction for one in
the horizontal direction. (angle 360).
e.g. width = 1256   height = 400   up = 2*up_unit_vector    right =
right_unit_vector.
With the ultra wide angle, you want the pixel ratio to more or less match the
aspect ratio, same as for your normal camera.

I never tried the panoramic camera, so I don't know, but the doc probably
says it all.

I hope this helps,
Al.

--
ANTI SPAM / ANTI ARROSAGE COMMERCIAL :

To answer me, please take out the Z from my address.


Post a reply to this message

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