POV-Ray : Newsgroups : povray.general : How do i ...? Server Time
31 Oct 2024 06:03:38 EDT (-0400)
  How do i ...? (Message 1 to 4 of 4)  
From: Paul Vanukoff
Subject: How do i ...?
Date: 12 May 2000 15:40:24
Message: <391c5e28$1@news.povray.org>
My scene file is using an orthographic camera, and my object is exactly 20
units wide. My output is going to be 4:3 aspect ratio (1280 x 960 px). My
question is, how far away should I place the camera, facing square on with
the object, to get the side edges to meet exactly with the the side edges of
the screen? I got it pretty close (at 13 units away) using trial and error,
but it is not pixel perfect, which is what I need. Anyone have a formula or
a camera{} statement that will do this?

Here is my snippet (using offical 3.1):

object
{
    o_coolobject  // this object is exactly 20 units wide
}

camera
{
     location < 0.0, 0.0,-13.0>
    orthographic
}


--
Paul Vanukoff
van### [at] primenetcom


Post a reply to this message

From: Margus Ramst
Subject: Re: How do i ...?
Date: 12 May 2000 16:16:18
Message: <391C58B9.BDF0E352@peak.edu.ee>
With orthographic, the distance of the camera has no effect on the apparent size
of the object. You only need to place the camera far enough so that the camera
is not inside the object.
The FOV of an ortho camera is determined solely by the up and right vectors. So
if you want a 20 unit wide object to fit the image edges exactly, you need to
set the 'right' vector to 20*x (and center the camera on the object, obviously).
Ypu also need to set the 'up' vector to 20*3/4*y to correspond to the image
aspect ratio.

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Paul Vanukoff
Subject: Re: How do i ...?
Date: 12 May 2000 16:25:14
Message: <391c68aa$1@news.povray.org>
Cool. Thanks... that fixed it.

"Margus Ramst" <mar### [at] peakeduee> wrote in message
news:391C58B9.BDF0E352@peak.edu.ee...
> With orthographic, the distance of the camera has no effect on the
apparent size
> of the object. You only need to place the camera far enough so that the
camera
> is not inside the object.
> The FOV of an ortho camera is determined solely by the up and right
vectors. So
> if you want a 20 unit wide object to fit the image edges exactly, you need
to
> set the 'right' vector to 20*x (and center the camera on the object,
obviously).
> Ypu also need to set the 'up' vector to 20*3/4*y to correspond to the
image
> aspect ratio.
>
> --
> Margus Ramst
>
> Personal e-mail: mar### [at] peakeduee
> TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Rune
Subject: Re: How do i ...?
Date: 12 May 2000 17:06:17
Message: <391c7249@news.povray.org>
"Margus Ramst" wrote:
> With orthographic, the distance of the
> camera has no effect on the apparent size
> of the object. The FOV of an ortho camera
> is determined solely by the up and right
> vectors.

If you place the orthographic keyword in the end of the camera statement,
the distance of the camera does have effect on the apparent size of the
object, and the FOV of the camera is not determined solely by the up and
right vectors.

I often find it easier using it that way.

Greetings,

Rune

---
Updated April 25: http://rsj.mobilixnet.dk
Containing 3D images, stereograms, tutorials,
The POV Desktop Theme, 350+ raytracing jokes,
miscellaneous other things, and a lot of fun!


Post a reply to this message

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