POV-Ray : Newsgroups : povray.general : Questions about panoramic cameras and other stuff. Server Time
6 Aug 2024 00:17:45 EDT (-0400)
  Questions about panoramic cameras and other stuff. (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From: Hermann Voßeler
Subject: Re: Questions about panoramic cameras and other stuff.
Date: 2 Aug 2002 19:53:25
Message: <3D4B18ED.1070602@webcon.de>
Mike wrote:
> Hermann_Vosseler wrote:
> ...
> 
> So for the perspective camera, specifying angle after direction will
> override the value give in diection? I presume it works both ways, i.e.
> angle before direction means angle is overridden? I'll have to experiment
> with this on various camera types.
> 


(I can't look it up in the source to make it 100% shure at the moment.)

The perspective camera has only the "baseic parameters" location, 
direction, up and right. I.e. they need to be defined when the
rendering starts.

angle, sky and look_at are resolved in the parser.
When the parser e.g. finds a "angle" keyword, it takes the
right vector defined *at that moment* and modifies the direction
vector so the image will show the given angle.

To say it the other way round: perspective camera has no
parameter "angle". When "angle" is encountered, the parameter
"direction" ist modified, but the float value given behind the
"angle" keyword is not saved outside the parser. If you specify
"direction" again later in the camera definition, the
previous direction value (and thus the effect of the your
angle keyword) ist owerwritten.
The same holds true for look_at
If you specify direction again after the look_at or if you
rotate your camera, the effect of the look_at-statement is lost.


But -- on the contrary -- the panoramic-type cameras *do have*
a "angle" property, i.e. for this cameras "angle" is needed by
the raytracer itself (it needs to know how much of the image
cylinder has to be scanned)
On the other hand some cameras don't use direction. Bottom line:
rather confusing, can't find a simple rule.



Hermann


Post a reply to this message

From: Hermann Voßeler
Subject: Re: Questions about panoramic cameras and other stuff.
Date: 2 Aug 2002 20:06:40
Message: <3D4B1C07.8070209@webcon.de>
Mike wrote:
> Aha! I think I finally get it.
> 

"mid air collision" :-)
I tried to explain it further with my previous post,
but you alredy got how it works.


> 
> Now, I'll see if I can get angle to do something with my panoramic
> cameras...
> 
> 

If you excuse my shameless plug,
maybe, you want to have a look at the test images
for my stereo-patch. Of course, this page is focused
on how my stereoscopic camera behaves, but a bit more
down on this page there are some images renderd with
POV 3.5 builtin cameras "panoramic", "cylinder",
and "ultra-wide-angle". As you can see, the
"cylinder" camera has problems retaining the
given aspect ratio.

http://www.geocities.com/StereoPOV/camtest.html



Hermann Vosseler


Post a reply to this message

From: Mike
Subject: Re: Questions about panoramic cameras and other stuff.
Date: 2 Aug 2002 20:50:03
Message: <web.3d4b278b4746c3d78b0b6f760@news.povray.org>
Thanks I understand it now.

I just discovered that if angle is present it will take precedence over a
direction vector, no matter what order they are specified in. So a
direction vector following an angle will not have an effect and will not
override the angle value. The right vector can still be modified however. I
suppose this is the desired behavior.  :)

On the other hand, angle will still not affect my panoramic cameras at all.
I used marker posts as suggested and I'm getting what appears to be an
angle of 180 degrees no matter what I specify. The right and direction
vectors change the appearance of the image, but the overall angle remains
at 180.   :(


Post a reply to this message

From: Peter Popov
Subject: Re: Questions about panoramic cameras and other stuff.
Date: 3 Aug 2002 00:11:13
Message: <imlmku4ua772n4nu6r85s7vmnhetpmggcs@4ax.com>
Mike,

there have been substantial changes to the camera code in 3.5 to
eliminate any dependence on the order of keywords. The only
requirement is that camera type goes first.

That said, you should not use (angle) and (up or right or direction)
in the same camera statement. Since now camera keywords act
simultaneously, and not in order, you should not use keywords which
override each other.

If you want old-style camera behavior, set #version 3.1; before the
camera block:

#version 3.1;
camera { ... camera parameters ... }
#version 3.5;

Hope this helps.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Mike
Subject: Re: Questions about panoramic cameras and other stuff.
Date: 3 Aug 2002 21:45:04
Message: <web.3d4c86304746c3d723878ff90@news.povray.org>
Thanks everyone for the camera help.

I've given up on the panoramic camera though. No matter what I set angle to
I get identical results. I guess it's just me.  :(


Post a reply to this message

From: Peter Popov
Subject: Re: Questions about panoramic cameras and other stuff.
Date: 4 Aug 2002 02:45:33
Message: <o4jpku4vjp1g53dpcporo5lonr58pa4406@4ax.com>
On Sat,  3 Aug 2002 21:41:04 EDT, "Mike" <nomail@nomail> wrote:

>Thanks everyone for the camera help.
>
>I've given up on the panoramic camera though. No matter what I set angle to
>I get identical results. I guess it's just me.  :(

Here's an example using the #version work around:

#version 3.1;

camera {
  location -20*z
  look_at 0
  angle 20
  orthographic
}

#version 3.5;

It should work exactly as it did in POV-Ray 3.1.

If you don't want to do this, please re-read section 6.4.2.2 of the
manual, specifically this paragraph:

> If, in a perspective camera, you replace the perspective keyword by
> orthographic and leave all other parameters the same, you'll get an
> orthographic view with the same image area, i.e. the size of the image is
> the same. The same can be achieved by adding the angle keyword to an
> orthographic camera. A value for the angle is optional. So this second mode
> is active if no up and right are within the camera statement, or when the
> angle keyword is within the camera statement.

Hope this helps.

Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Mike
Subject: Re: Questions about panoramic cameras and other stuff.
Date: 4 Aug 2002 11:45:16
Message: <web.3d4d4bc54746c3d723878ff90@news.povray.org>
Thanks, but I'm not trying to recreate 3.1's behavior. I was asking about
keyword order, but I understand now that it doesn't matter.

What I'm confused about is section 6.2.4.6 of the docs state "The angle
keyword is used to determine the viewing angle." when referring to the
panoramic camera type.

I have a simple scene here:
camera{
  panoramic
  location     <0,0,-10>
  angle 170
}

light_source{
  <5,10,-15>
  color rgb<1,1,1>
}

#declare My_Cyl=cylinder{ -80*y 80*y .2 pigment{color
rgb<1,0,0>}finish{ambient 1}}
cylinder{My_Cyl}
cylinder{My_Cyl rotate<0,0,45>}
cylinder{My_Cyl rotate<0,0,90>}
cylinder{My_Cyl rotate<0,0,135>}


Now, no matter what angle value I use in the camera statement(I used 170
above) the scene will not change in way I can see. Is this an error in the
docs or something I'm just not seeing?


Post a reply to this message

From: Ichthyostega
Subject: Re: Questions about panoramic cameras and other stuff.
Date: 5 Aug 2002 10:55:13
Message: <web.3d4e91a84746c3d772f2eb850@news.povray.org>
Mike wrote:
>Thanks, but I'm not trying to recreate 3.1's behavior. I was asking about
>keyword order, but I understand now that it doesn't matter.
>
>What I'm confused about is section 6.2.4.6 of the docs state "The angle
>keyword is used to determine the viewing angle." when referring to the
>panoramic camera type.
>

Mike,

Thanks to Peter Popov, who pointed out
>
>there have been substantial changes to the camera code in 3.5 to
>eliminate any dependence on the order of keywords. The only
>requirement is that camera type goes first.

I had a look to the sources. It is clearly not your
fault, panoramic camera ignores the angle.

See the message "Camera Parameters, esp. angle"
I posted a minute ago.

Hermann


Post a reply to this message

From: Mike
Subject: Re: Questions about panoramic cameras and other stuff.
Date: 5 Aug 2002 17:35:19
Message: <web.3d4eeeb64746c3d78b0b6f760@news.povray.org>
Ichthyostega wrote:
>I had a look to the sources. It is clearly not your
>fault, panoramic camera ignores the angle.

Thanks!  This was true in 3.1 as well, but somehow I always figured it was
something I was doing wrong! I tried looking at the source, but I'm not
that experienced a programmer and I honestly can't follow much of it.

I've been trying to figure out default values for many things, and the
source hasn't helped me much...like yesterday I was trying to find the
default distance value for a rainbow. I gave up trying, but I know from
experimenting that it is greater than 10,000.   :)

Any recommendations on how to find things like default values in the source?


Post a reply to this message

From: Peter Popov
Subject: Re: Questions about panoramic cameras and other stuff.
Date: 6 Aug 2002 01:07:34
Message: <ebmuku4oupl1n2fgf6lr6nv5t25luv9qek@4ax.com>
On Mon,  5 Aug 2002 17:32:22 EDT, "Mike" <nomail@nomail> wrote:

>Any recommendations on how to find things like default values in the source?

Yes - look into parse.cpp :)


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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