POV-Ray : Newsgroups : povray.advanced-users : Zooming orthographic camera Server Time
22 Dec 2024 12:15:04 EST (-0500)
  Zooming orthographic camera (Message 1 to 7 of 7)  
From: Bald Eagle
Subject: Zooming orthographic camera
Date: 5 Dec 2016 12:15:01
Message: <web.5845a06cc97737fcc437ac910@news.povray.org>
I'd like to know the best way to calculate the amount of zoom the orthographic
camera needs when changing render size from smaller to larger.

I typically define a Zoom variable and then divide up and right by that to zoom
in.
I can "ball park" it, but I never seem to be able to make a calculation that
gets me exact results.

Has anyone been able to manipulate the orthographic view accurately and
reliably, and can offer a suggestion or solution?

Thanks!   :)


Post a reply to this message

From: Mike Horvath
Subject: Re: Zooming orthographic camera
Date: 5 Dec 2016 21:08:18
Message: <58461d92$1@news.povray.org>
On 12/5/2016 12:14 PM, Bald Eagle wrote:
> I'd like to know the best way to calculate the amount of zoom the orthographic
> camera needs when changing render size from smaller to larger.
>
> I typically define a Zoom variable and then divide up and right by that to zoom
> in.
> I can "ball park" it, but I never seem to be able to make a calculation that
> gets me exact results.
>
> Has anyone been able to manipulate the orthographic view accurately and
> reliably, and can offer a suggestion or solution?
>
> Thanks!   :)
>
>

You mean, like this?

https://commons.wikimedia.org/wiki/File:Camera_focal_length_distance_house_animation.gif

Mike


Post a reply to this message

From: Le Forgeron
Subject: Re: Zooming orthographic camera
Date: 6 Dec 2016 12:07:52
Message: <5846f068$1@news.povray.org>
Le 06/12/2016 à 03:08, Mike Horvath a écrit :
> On 12/5/2016 12:14 PM, Bald Eagle wrote:
>> I'd like to know the best way to calculate the amount of zoom the
>> orthographic
>> camera needs when changing render size from smaller to larger.
>>
>> I typically define a Zoom variable and then divide up and right by
>> that to zoom
>> in.
>> I can "ball park" it, but I never seem to be able to make a
>> calculation that
>> gets me exact results.
>>
>> Has anyone been able to manipulate the orthographic view accurately and
>> reliably, and can offer a suggestion or solution?
>>
>> Thanks!   :)
>>
>>
> 
> You mean, like this?
> 
>
https://commons.wikimedia.org/wiki/File:Camera_focal_length_distance_house_animation.gif
> 
> 
> Mike

I do not get it.

Bald Eagle talked about orthographic camera, a camera with parallel
rays, usually orthogonal to rendered image.

Mike Horvath showed an animation of a perspective camera with a zoom
using a transformation. Only frame 0 is orthographic.

If you want to have bigger details (bigger than the increase of final
resolution) at the center of the image, you can reduce the up & right
vectors of the orthographic.

Povray camera are not sensible to the final resolution: the same part of
"world" is to be seen, at 64x48, at 640x480 as well as 6400x4800.


Post a reply to this message

From: Leroy
Subject: Re: Zooming orthographic camera
Date: 6 Dec 2016 15:10:01
Message: <web.584719f97c1309eec6bb200e0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> I'd like to know the best way to calculate the amount of zoom the orthographic
> camera needs when changing render size from smaller to larger.
>
> I typically define a Zoom variable and then divide up and right by that to zoom
> in.
> I can "ball park" it, but I never seem to be able to make a calculation that
> gets me exact results.
>
> Has anyone been able to manipulate the orthographic view accurately and
> reliably, and can offer a suggestion or solution?
>
> Thanks!   :)

What are trying to do?
I've been playing with the orthographic camera to make images for Quake2.
I wanted the scene to match different render sizes.
I use
camera{  orthographic
        location <0,0,-10>
        look_at <0,0,0>
        right x*10
        up y*10
        }

I use image_width & image_height to calculate where things should go.
With image_width & image_height are the same the render image is just bigger or
small.
If they are different then one direction will always be limit by 5. That is when
looking from the -z direction a object place in the  x or y (depends on size)
will be on the border of a rendered image.

I just thought of something I need to try.(it didn't work)
But maybe this is what you need(haven't tried it).
if image_width > image_height  right x*10*image_width / image_height
if image_width < image_height  up x*10*image_height  / image_width

Hope this helps!
Have fun!


Post a reply to this message

From: Alain
Subject: Re: Zooming orthographic camera
Date: 6 Dec 2016 19:55:38
Message: <58475e0a$1@news.povray.org>

> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> I'd like to know the best way to calculate the amount of zoom the orthographic
>> camera needs when changing render size from smaller to larger.
>>
>> I typically define a Zoom variable and then divide up and right by that to zoom
>> in.
>> I can "ball park" it, but I never seem to be able to make a calculation that
>> gets me exact results.
>>
>> Has anyone been able to manipulate the orthographic view accurately and
>> reliably, and can offer a suggestion or solution?
>>
>> Thanks!   :)
>
> What are trying to do?
> I've been playing with the orthographic camera to make images for Quake2.
> I wanted the scene to match different render sizes.
> I use
> camera{  orthographic
>         location <0,0,-10>
>         look_at <0,0,0>
>         right x*10
>         up y*10
>         }
>
> I use image_width & image_height to calculate where things should go.
> With image_width & image_height are the same the render image is just bigger or
> small.
> If they are different then one direction will always be limit by 5. That is when
> looking from the -z direction a object place in the  x or y (depends on size)
> will be on the border of a rendered image.
>
> I just thought of something I need to try.(it didn't work)
> But maybe this is what you need(haven't tried it).
> if image_width > image_height  right x*10*image_width / image_height
> if image_width < image_height  up x*10*image_height  / image_width
>
> Hope this helps!
> Have fun!
>
>

With your camera defined as in the sample, you see a 10 units by 10 
units area.
If you want to double the image size while keeping the same dimention 
for the elements of the image, you need to also double the up and right 
vectors. So, that become : right x*20 up y*20

If you want to make it automatic, then you need to link those values to 
image_width and image_height.

right x*image_width/Size_Adjustment
up y*image_height/Size_Adjustment


one POV unit in the scene. A value of 10 mean that 10 pixels will be 
needed to represent each unit.


Alain


Post a reply to this message

From: Leroy
Subject: Re: Zooming orthographic camera
Date: 7 Dec 2016 13:35:01
Message: <web.584856137c1309eec56c0b2c0@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> With your camera defined as in the sample, you see a 10 units by 10
> units area.
> If you want to double the image size while keeping the same dimention
> for the elements of the image, you need to also double the up and right
> vectors. So, that become : right x*20 up y*20
>
> If you want to make it automatic, then you need to link those values to
> image_width and image_height.
>
> right x*image_width/Size_Adjustment
> up y*image_height/Size_Adjustment
>

> one POV unit in the scene. A value of 10 mean that 10 pixels will be
> needed to represent each unit.
>
>
> Alain

I couldn't have said it better!


Post a reply to this message

From: Mike Horvath
Subject: Re: Zooming orthographic camera
Date: 8 Mar 2017 03:20:44
Message: <58bfbedc$1@news.povray.org>
On 12/6/2016 12:07 PM, Le_Forgeron wrote:
> I do not get it.
>
> Bald Eagle talked about orthographic camera, a camera with parallel
> rays, usually orthogonal to rendered image.
>
> Mike Horvath showed an animation of a perspective camera with a zoom
> using a transformation. Only frame 0 is orthographic.

Well, the question did not make sense, because if you have an 
orthographic image, then it is already set to 100% infinite zoom. Any 
smaller value for zoom and you get a perspective projection.

Mike


Post a reply to this message

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