|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |