POV-Ray : Newsgroups : povray.general : spherical camera upside down? Server Time
30 Nov 2024 01:27:34 EST (-0500)
  spherical camera upside down? (Message 1 to 4 of 4)  
From: Elias Pschernig
Subject: spherical camera upside down?
Date: 17 Feb 2005 20:35:00
Message: <web.421544136878739221c474120@news.povray.org>
With the scene below, frames 1, 2, 3 have the green side up (since the up
vector is y, and the plane at y is green). For some reason, frame 4 has the
green side down.. how can it be explained? I'd like to switch between the 2
projection types (or rather, between perspective and spherical) - and this
effect makes everything in the spherical appear upside down. I was thinking
of using the postprocessing of megapov to rotate the end-result by 180
degree - but hopefully someone here has an easier solution :)

#include "colors.inc"
camera {
#if (frame_number = 1 | frame_number = 2)
    fisheye
#else
    spherical
#end
    angle 360
    location 0
    right x
    up y
    direction
#if (frame_number = 1 | frame_number = 3)
    z
#else
    -z
#end
}

plane {x 1 pigment { Red } finish { ambient 1 } }
plane {y 1 pigment { Green } finish { ambient 1 } }
plane {z 1 pigment { Blue } finish { ambient 1 } }

plane {-x 1 pigment { Cyan } finish { ambient 1 } }
plane {-y 1 pigment { Magenta } finish { ambient 1 } }
plane {-z 1 pigment { Yellow } finish { ambient 1 } }

//Run with:
//povray +W100 +H100 +KFI1 +KFF4 +Isphericaltest.pov


Post a reply to this message

From: Elias Pschernig
Subject: Re: spherical camera upside down?
Date: 19 Feb 2005 06:55:00
Message: <web.421728acd1edab8e2bb4b0c10@news.povray.org>
Don't know how to edit a post in the web interface - but I posted the output
of the above here, so it's easier to see:
http://news.povray.org/web.421725b7aaaa1acb2bb4b0c10%40news.povray.org


Post a reply to this message

From: Jellby
Subject: Re: spherical camera upside down?
Date: 19 Feb 2005 07:24:17
Message: <42172ff0@news.povray.org>
Among other things, "Elias Pschernig" <elias at users sf net> saw fit to
write:

> I was thinking of using the postprocessing of megapov to rotate the
> end-result by 180 degree - but hopefully someone here has an easier
> solution :)
> 
> [...]
>     direction 
> #if (frame_number = 1 | frame_number = 3)
>     z
> #else
>     -z
> #end

Use "look_at" instead of "direction". As far as I know, direction is mainly
useful to get the length of the camera vector (which I guess is not used
these projections). To define the direction the camera is facing, use
look_at.

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: Elias Pschernig
Subject: Re: spherical camera upside down?
Date: 19 Feb 2005 15:20:01
Message: <web.42179e42d1edab8edc761f060@news.povray.org>
Jellby <me### [at] privacynet> wrote:
>
> Use "look_at" instead of "direction". As far as I know, direction is mainly
> useful to get the length of the camera vector (which I guess is not used
> these projections). To define the direction the camera is facing, use
> look_at.

Thanks, that did the trick.

It still is odd. Quoting the docs:
"
The POV-Ray camera has ten different models, each of which uses a different
projection method to project the scene onto your screen. Regardless of the
projection type all cameras use the location,  right, up, direction, and
keywords to determine the location and orientation of the camera. The type
keywords and these four vectors fully define the camera.
"

So apparently, the above isn't quite true. If any of the developers sees
this - might want to add: "As an exception, with spherical projection, you
shouldn't use the direction keyword". That would have avoided the confusion
in my case :)


Post a reply to this message

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