POV-Ray : Newsgroups : povray.general : defying perspective Server Time
5 Aug 2024 00:21:28 EDT (-0400)
  defying perspective (Message 1 to 8 of 8)  
From: James Taylor
Subject: defying perspective
Date: 22 Jan 2003 16:50:54
Message: <3e2f123e@news.povray.org>
Hi all,

This may be a little complicated to explain, but hopefully someone will know
what I'm trying to say.
How do I figure out the rotations and/or translations (scale is not a
problem) to make a objects in a perspective camera behave like an orthagonal
camera?

I'm guessing theres a simple relationship between distance from camera,
angle to viewing plane, etc etc

so any ideas?
thanks
jim


Post a reply to this message

From: Sir Charles W  Shults III
Subject: Re: defying perspective
Date: 22 Jan 2003 17:40:08
Message: <3e2f1dc8$1@news.povray.org>
Read the documents.  Use the orthographic camera setting.

Cheers!

Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip


Post a reply to this message

From: Christopher James Huff
Subject: Re: defying perspective
Date: 22 Jan 2003 18:09:11
Message: <cjameshuff-D33396.18080322012003@netplex.aussie.org>
In article <3e2f123e@news.povray.org>,
 "James Taylor" <jim### [at] blueyondercouk> wrote:

> How do I figure out the rotations and/or translations (scale is not a
> problem) to make a objects in a perspective camera behave like an orthagonal
> camera?

You don't. Think about how perspective works a bit more...you can't undo 
it by transforming the object, not with the transformations available in 
POV.
You need to use an actual orthographic camera, and you can't change 
things on a per-object basis, you will have to render separate images 
and combine them in an external program.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: James Taylor
Subject: Re: defying perspective
Date: 23 Jan 2003 11:28:08
Message: <3e301818$1@news.povray.org>
Ok, so here's an example of whta I'm trying to achieve.
Take two small(ish) spheres A and B. Place A near to the camera and B a fair
distance from the camera. Both A and B are at the same height above a ground
plane, but due to perspective B will appear lower on the screen than A. How
do I figure how much to vertically translate B by such that it appears at
the same height on the screen as A? (scale is not an issue in this scene)

hoping that all made sense.
thanks
jim


Post a reply to this message

From: Sir Charles W  Shults III
Subject: Re: defying perspective
Date: 23 Jan 2003 12:19:19
Message: <3e302417$1@news.povray.org>
Distances scale linearly.  So, three times the distance, three times the
height.  Also, three times the size to appear the same as the nearby object.

Cheers!

Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip


Post a reply to this message

From: Charles
Subject: Re: defying perspective
Date: 30 Jan 2003 20:01:59
Message: <3E39CC27.31786399@enter.net>
James Taylor wrote:
> 
> Ok, so here's an example of whta I'm trying to achieve.
> Take two small(ish) spheres A and B. Place A near to the camera and B a fair
> distance from the camera. Both A and B are at the same height above a ground
> plane, but due to perspective B will appear lower on the screen than A. How
> do I figure how much to vertically translate B by such that it appears at
> the same height on the screen as A? (scale is not an issue in this scene)
> 
> hoping that all made sense.
> thanks
> jim

#declare CamLoc=<someviewpoint>; /*pre-declare your camera's location
                                  so you can play with it below...*/
#declare ObjLoc1=<someplace>;
#declare ObjLoc2=<someplaceelse>;
#declare DiffScale=vlength(ObjLoc1-CamLoc)/vlength(ObjLoc2-CamLoc);
#declare DiffFactor=(1-DiffScale)*Loc2;

Having declared these ahead, the transform you want for Object 2 
(assuming you want Object 2 to look the same size as Object 1) 
is...

 matrix<
     DiffScale, 0, 0,
     0, DiffScale, 0,
     0, 0, DiffScale,
     DiffFactor.x, DiffFactor.y, DiffFactor.z
   >


This will, of course, not work well with large objects or short
distances
because the objects are not, naturally, at a single point in space and
you'll still get some perspective distortion, but for some cases, it
might
achieve more or less what you're trying for.

Just in case matrices make you gasp like being dunked in cold water,
all this does is takes a ratio of the distances between the objects,
translates object 2 to the origin, scales it according to the ratio,
then translates it back again. (The matrix is just a more compact way
of doing it all in one move, hence saving you 0.001 seconds of parsing
time). :) 

-- 
@C[$F];
The Silver Tome ::  http://www.silvertome.com 
"You may sing to my cat if you like..."


Post a reply to this message

From: James Taylor
Subject: Re: defying perspective
Date: 31 Jan 2003 12:11:20
Message: <3e3aae38@news.povray.org>
Thanks, Charles, I'll file that away if I need it in the future.

I have however managed to achieve the effect by using a camera with a long
"zoom" lens. ie placing the camera about a mile from the scene and then
using a very narrow angle.

thanks anyway
jim


Post a reply to this message

From: Charles
Subject: Re: defying perspective
Date: 31 Jan 2003 19:52:14
Message: <3E3B1B60.4209C857@enter.net>
James Taylor wrote:
> 
> Thanks, Charles, I'll file that away if I need it in the future.
> 
> I have however managed to achieve the effect by using a camera with a long
> "zoom" lens. ie placing the camera about a mile from the scene and then
> using a very narrow angle.

Yup. That'll work, for mostly the same reason the orthographic camera
works.
At that focal length, the rays are so close to parallel as could fool a
a moderately dumb protractor. *sigh* Guess I was overthinking the
problem.
Glad it worked out. 

-- 
@C[$F];
The Silver Tome ::  http://www.silvertome.com 
"You may sing to my cat if you like..."


Post a reply to this message

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