POV-Ray : Newsgroups : povray.programming : Panoramic (as in Zork Nemesis etc) Server Time
29 Jul 2024 04:31:18 EDT (-0400)
  Panoramic (as in Zork Nemesis etc) (Message 1 to 4 of 4)  
From: A Ratcliffe
Subject: Panoramic (as in Zork Nemesis etc)
Date: 11 Jun 1998 14:13:03
Message: <6lp6s8$pqa$1@oz.aussie.org>
I'm writing a game computer game which involves the player being able to
look round his location 360 degrees. I've been experimenting with panoramic
on the camera for this effect, but it doesn't seem to be working. The screen
resolution when the player is looking round is 640 x 480, truecolour. What
settings should I set for my camera (image size, angle, etc to get the 360
view that I require. I would think that aspect ratio would come into it, but
I couldn't find an aspect option in the camera setup)

Yours hopefully,


Andrew Ratcliffe
ara### [at] aratcliffedemoncouk

When I have the images finalise, I'll publish  some of them on the binaries,
including a small viewer to see them as you will in the game.


Post a reply to this message

From: Nieminen Mika
Subject: Re: Panoramic (as in Zork Nemesis etc)
Date: 12 Jun 1998 10:51:16
Message: <6lrf94$sg7$1@oz.aussie.org>
A Ratcliffe <ara### [at] aratcliffedemoncouk> wrote:
: I'm writing a game computer game which involves the player being able to
: look round his location 360 degrees. I've been experimenting with panoramic
: on the camera for this effect, but it doesn't seem to be working. The screen
: resolution when the player is looking round is 640 x 480, truecolour. What
: settings should I set for my camera (image size, angle, etc to get the 360
: view that I require. I would think that aspect ratio would come into it, but
: I couldn't find an aspect option in the camera setup)

  The aspect ratio is controlled with the 'right' vector.
  Suppose you want an image for example 3 times as wide as tall (for example
600x200). Then you should add "right x*3" to the camera definition.
  The general way to set the aspect ratio is to add
right x*(image_width/image_height)

  For the image you want, the best I can think of, is something like this:

camera
{ ultra_wide_angle
  location ... look_at ...
  right x
  angle 360*pi
}

  And then render with options: -w3840 -h3840 +sr1680 +er2160
and you should get a 3840x480 sized image which you can scroll horizontally.
  I don't know why it's not possible to calculate the image directly, but
you have to make a "hack" like that. Maybe it's a ultra_wide_angle camera
feature or just a bug (like the angle fix).

-- 
                                                              - Warp. -


Post a reply to this message

From: Nieminen Mika
Subject: Re: Panoramic (as in Zork Nemesis etc)
Date: 12 Jun 1998 10:55:08
Message: <6lrfgc$sg7$2@oz.aussie.org>
Nieminen Mika <war### [at] assaricctutfi> wrote:
:   And then render with options: -w3840 -h3840 +sr1680 +er2160

  Actually the starting row should be 1681 (or you'll get 481 pixels of
image height). Just noted that after posting :)

-- 
                                                              - Warp. -


Post a reply to this message

From: Chris Colefax
Subject: Re: Panoramic (as in Zork Nemesis etc)
Date: 14 Jun 1998 10:10:09
Message: <3583D9C1.E148BC72@geocities.com>
A Ratcliffe wrote:
> 
> I'm writing a game computer game which involves the player being able to
> look round his location 360 degrees. I've been experimenting with panoramic
> on the camera for this effect, but it doesn't seem to be working. The screen
> resolution when the player is looking round is 640 x 480, truecolour. What
> settings should I set for my camera (image size, angle, etc to get the 360
> view that I require. I would think that aspect ratio would come into it, but
> I couldn't find an aspect option in the camera setup)

There are a variety of ways to do what you want; you could try the
cylindrical camera to get a full 360-degree view, eg:

   camera {location <0, 0, 0> look_at <0, 0, 1>
      right x up y cylinder 1 angle 360}

which you can rotate/translate to get the desired view of your scene.

Regarding aspect ratios - in the above case, the ratio is 2 * pi (the
circumference of the cylinder) to 1, which works out to a  3016x480
image!  One option might be to use a lower resolution with a letterbox
format (black space above and below the image).

Alternatively, you can increase the size of the up vector in the camera,
to show more of the scene vertically, eg. up y * pi works out to a 2:1
ratio, which you could render as a 1000x500 image (to allow for a little
vertical movement, as well as the left-right navigation).  You can
increase this as far as you like, but the larger the value the larger
the distortion at the top and bottom of the image.

You can get around this, and render a 360-degree view horizontally and
vertically to give a spherical projection of your scene, using the
panoramic camera, eg:

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

Unfortunately, the panoramic camera doesn't allow for viewing angles
over 180-degrees (a possible bug, perhaps?), so you will need to render
the scene once (with an aspect ratio of 1:1, eg. 600x600), and then
rotate the camera by y * 180, and render to another image of the same
resolution.  You can then join the two images side-by-side, and view
them spherically (ie. as if they were mapped to a globe).


Post a reply to this message

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