|
![](/i/fill.gif) |
Chris B wrote:
>
> Have you tried playing around with camera type cylinder 3 (vertical
> cylinder, viewpoint moves along the cylinder's axis)?
>
> plane {y,0
> pigment {checker}
> finish {ambient 1}
> scale 0.5
> }
> camera {
> cylinder 3
> angle 360
> up y
> location <0,0.5,0>
> look_at <0,0.4,1>
> }
The cylinder type 3 realizes some kind of parallel projection, which is
clearly not what I need. (It's only parallel to the xy-plane though)
> The docs seem a little light on an explanation of this and I don't know if
> this is exactly the sort of distortion you're trying to achieve.
I found the documentation on this to be of little help as well. What I want
to do is a central projection like you get from a pinhole camera, just with
the image plane being a cylinder. The result would be a full panorama view,
somethiung like this:
plane {
y,0
pigment {checker}
finish {ambient 1}
}
camera {
cylinder 1
angle 360
up y
location <0,0.5,0>
look_at <0,0.5,1>
}
I this case the cylinder reaches from 0 to 1 ("up y" defines the cylinder to
be of height 1, and the viewpoint is in the middle.) What I need for
example would be a viewpoint at <0,1,0> and a cylinder reaching from y=0,5
to y=1.0 (Viewpoint on top and looking down through the cylinder)
I found a kind of cheap workaround by simply defining a higher cylinder (in
this case y=0.5 to y=1.5) and then cropping all the images, which works,
but is quite uncomfortable.
> If this fails, you may be able to achieve what you want in two passes:
> If you are trying to map the scene to a cylinder and be able to place the
> camera so that it's looking down through the cylinder, you could first
> render the scene using a cylinder 1 camera, then use that image as an
> image_map that you map to a cylinder (ambient 1) and render the result.
> You'll then be able to place the camera wherever you want relative to the
> cylinder.
> Likewise, if you want to just add a perspective distortion to the result
> you could map the image from the first render to a plane and move the
> camera around for the second render.
If I got that right, then it is not what I mean. See my example above, I
think it should make it clearer.
>
> Otherwise, a few more words describing what you're trying to achieve would
> be helpful, or a link to an image that uses the sort of projection you
> seek.
>
> Regards,
> Chris B.
I am simulating a real camera, so the projection is given by the hardware
and can't be changed. The camera also flips the image vertically, so that
it goes from 0° on the left to 360° on the right. (this is in positive
direction (counter clock wise) instead of povray, which does it in negative
direction(clock wise)). A solution would be again to flip all images by
hand, but since i'm doing an animation with 250 frames, this would be
impracticable as well. So is there a way to change the coordinates of the
image plane in povray? For normal cameras, I think it can be done using
the "up" and "right" vector, but I couldn't find out how the "right" vector
is used for cylindrical cameras.
Best regards
Sebastian
Post a reply to this message
|
![](/i/fill.gif) |