POV-Ray : Newsgroups : povray.newusers : Camera position help Server Time
13 Nov 2024 05:18:38 EST (-0500)
  Camera position help (Message 1 to 7 of 7)  
From: Jong
Subject: Camera position help
Date: 18 Feb 2001 06:19:09
Message: <3A8FAF20.E33C2F69@mm.ewha.ac.kr>
Dear All,

 I've been experimenting a little bit with the camera position. I would
like to maintain my rendered
image orientation. For example, I want my x-axis(Red bar) positioned
horizontal z-axis(Green bar) vertical even if I change my camera
position while looking at the same position of the object.

One more question:
  What are the meanings of the non-zero values of y and z in "right
<0.35816, 0, 0.206784>".
I learned that x value of right< , , > maintains ratio of the image
output. But for the y and z, I have
hard time understanding.

Many thanks,

Jong

-----------------------------
// POV-Ray file generated from Rhinoceros.

camera {
   perspective
   location <12, 100, -102.089>
   right <1.1547, 0, 0.>
   up <0, 0.866025, 0.>
   //direction <-0.433013, -0.5, 0.75>
   angle 18.2474
   /*
   // to get an image that's the same as the viewport in Rhino,
   // uncomment this section and render with command line options
(alt+c):
   // +w884 +h513
   right <0.35816, 0, 0.206784>
   up <-0.06, 0.207846, 0.103923>
   direction <-0.433013, -0.5, 0.75>
   */
   look_at <-0.297046, 4.53777, 2.85368>
}
--------------------------------
[Image]


Post a reply to this message


Attachments:
Download 'us-ascii' (2 KB) Download 'c:\windows\temp\nsmail40.jpeg.jpg' (10 KB)

Preview of image 'c:\windows\temp\nsmail40.jpeg.jpg'
c:\windows\temp\nsmail40.jpeg.jpg


 

From: Christoph Hormann
Subject: Re: Camera position help
Date: 18 Feb 2001 08:03:10
Message: <3A8FC80D.5D0B4CD3@gmx.de>
Jong wrote:
> 
> Dear All,
> 
>  I've been experimenting a little bit with the camera position. I would
> like to maintain my rendered
> image orientation. For example, I want my x-axis(Red bar) positioned
> horizontal z-axis(Green bar) vertical even if I change my camera
> position while looking at the same position of the object.

If you want z vertical and x/y horizontal, you have to use something like:

camera {        
  location    <10, 10, 10> 
  direction   z
  sky         z  
  up          z  
  right       (4/3)*x                             
  look_at     <0, 0, 0>  
} 

> One more question:
>   What are the meanings of the non-zero values of y and z in "right
> <0.35816, 0, 0.206784>".
> I learned that x value of right< , , > maintains ratio of the image
> output. But for the y and z, I have
> hard time understanding.
> 

quoting from the doumentation:

"Note that the up, right, and direction vectors should always remain
perpendicular to each other or the image will be distorted. If this is not
the case a warning message will be printed. The vista buffer will not work
for non-perpendicular camera vectors. If you specify the 3 vectors as
initially perpendicular and do not explicitly re-specify the after any
look_at or rotate vectors, the everything will work fine."

BTW, please don't post html and binaries in this group, if an illustrating
picture is necessary post it to p.b.i.

Christoph


-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Peter Popov
Subject: Re: Camera position help
Date: 18 Feb 2001 11:12:56
Message: <6jsv8tgpuhuu6mmcmu2s599m6bmjup0t6j@4ax.com>
On Sun, 18 Feb 2001 14:03:09 +0100, Christoph Hormann
<chr### [at] gmxde> wrote:

>If you want z vertical and x/y horizontal, you have to use something like:
>
>camera {        
>  location    <10, 10, 10> 
>  direction   z
>  sky         z  
>  up          z  
>  right       (4/3)*x                             
>  look_at     <0, 0, 0>  
>} 

I guess you mean direction y there. Keep in mind that the use of the
direction keyword is somewhat outdated. Use angle instead and forget
about direction at all.


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


Post a reply to this message

From: Christoph Hormann
Subject: Re: Camera position help
Date: 18 Feb 2001 11:38:39
Message: <3A8FFA89.B11858F7@gmx.de>
Peter Popov wrote:
> 
> I guess you mean direction y there. Keep in mind that the use of the
> direction keyword is somewhat outdated. Use angle instead and forget
> about direction at all.
> 

You are right, it usually does not make a difference, but it should be y
of course.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Jong
Subject: Re: Camera position help
Date: 18 Feb 2001 14:10:40
Message: <3A901E06.4746247A@mm.ewha.ac.kr>
Dear Chris and Peter,

Thank you all.  I really appreciate your help.
Now the objects look OK within the frame maintaining x- and z- axes
horizontal/vertical.

Sorry I'd attached my pic together with this post.

Jong


Post a reply to this message

From: John VanSickle
Subject: Re: Camera position help
Date: 20 Feb 2001 03:13:01
Message: <3A922757.17B64A7A@hotmail.com>
Peter Popov wrote:
> 
> I guess you mean direction y there. Keep in mind that the use of the
> direction keyword is somewhat outdated. Use angle instead and forget
> about direction at all.

In order to place things so that they will always appear at a certain
spot in front of the camera (subtitling, for instance), it is needful
to calculate the up, right, direction, and location vectors, and the
length of the direction vector as well.  Since I've already gone to
this trouble, I simply use these vectors to declare the camera.

Regards,
John


Post a reply to this message

From: Pete
Subject: Re: Camera position help
Date: 21 Feb 2001 21:28:57
Message: <1379.452T1456T11934533PeterC@nym.alias.net>
>Peter Popov wrote:
>>
>> I guess you mean direction y there. Keep in mind that the use of the
>> direction keyword is somewhat outdated. Use angle instead and forget
>> about direction at all.

>In order to place things so that they will always appear at a certain
>spot in front of the camera (subtitling, for instance), it is needful
>to calculate the up, right, direction, and location vectors, and the
>length of the direction vector as well.  Since I've already gone to
>this trouble, I simply use these vectors to declare the camera.

>Regards,
>John

John:

Funny you should mention that, I've been recently writing "overlay"
code, to have objects move and rotate along with the camera (sort
of a heads up display or bomb site overlay effect).  This would be
darn near impossible if I didn't use the direction/right/up method of
specifying a camera!

All:

umm, I hope I don't get flamed for this ... but ... I like using the
direction, right and up keywords, followed by a rotate & translate, to
position the camera.  It might be more difficult to learn to do things
this way (at first!), but I like it.  It is more flexible.  It is easier
in the long run.

Sometimes I get concerned that the Pov Team might be persuaded to
drop the direction keyword from future versions of POV Ray and that
would be a shame.  Please leave it in!  Pleeeeeeze?  It's *very*
handy!

Pete


Post a reply to this message

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