POV-Ray : Newsgroups : povray.advanced-users : Perspective problem Server Time
1 Nov 2024 17:22:09 EDT (-0400)
  Perspective problem (Message 1 to 7 of 7)  
From: Thomas
Subject: Perspective problem
Date: 19 Jun 2001 11:09:01
Message: <3B2F6AFD.128F9B9F@gmx.net>
Hello all,

I have a bit of a problem with one of my scene's and I have no clue on
how to fix it. In order to get every thing in to the picture I need to
tilt the camera a bit backwards ie. look slightly up. But since I'm
using a big angle (80) I get a bit of a distorted image, things that
should look straight are pointing inwards. This is what I want:

__________________
|                                   |
|  |                             |   |
|  |                             |   |
|                                   |
------------------------

but this is what I get:

__________________
|                                   |
|   /                           \   |
|  /                             \  |
|                                   |
------------------------
I know that I get that because the camera is pointing upwards. But in
real life there are lenses available that can be shifted a bit ( I have
no clue what the official name for this is) so that this doesn't happen,
are there any ways that this can be simulated in pov or are there any
other ways around this?

Regards,

Thomas

ps. I can post a picture if anyone needs it.


Post a reply to this message

From: Ron Parker
Subject: Re: Perspective problem
Date: 19 Jun 2001 11:50:06
Message: <slrn9iut5g.4b0.ron.parker@fwi.com>
On Tue, 19 Jun 2001 16:08:45 +0100, Thomas wrote:
>I know that I get that because the camera is pointing upwards. But in
>real life there are lenses available that can be shifted a bit ( I have
>no clue what the official name for this is) so that this doesn't happen,
>are there any ways that this can be simulated in pov or are there any
>other ways around this?

You might be able to get the desired effect by messing with the right, up,
and direction vectors so they're not perpendicular.  POV will give you
a warning, and will give you an error if you don't specify -UV on the
command line (or in the INI file) but it should still work.  Something like
this:

camera {location 10*z right 4*x up 3*y direction y-.5*z}

is what I envision.  Basically, you're saying the film plane is parallel
to the XY plane, but the camera is pointed slightly upward.  It's like moving
the lens on an old-style view camera without moving the film plane.

-- 
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's


Post a reply to this message

From: ingo
Subject: Re: Perspective problem
Date: 19 Jun 2001 12:03:31
Message: <Xns90C5B7B382C69seed7@povray.org>
in news:3B2F6AFD.128F9B9F@gmx.net Thomas wrote:

> But since I'm
> using a big angle (80) I get a bit of a distorted image, things that
> should look straight are pointing inwards.

See example below.
You can also wrap your whole scene in a union and 'shear' that in the 
opposite direction.

---%<------%<---
//use -uv on commandline
#version 3.1;
global_settings {assumed_gamma 1.0}
light_source {<500,500,-500>,1}

#declare Shear= transform {
   matrix <  1,  0,  0,
             0,  1,  0.3333, //= look_at.y/location.z
             0,  0,  1,
             0,  0,  0 >
}

camera {
   location  <0.0, 0.01,-1.5>
   look_at   <0.0, 0.5, 0.0>
   angle 95
   transform Shear
}

plane { 
  y, 0
  texture {
    pigment {
        checker color rgb 1, color rgb <0, 0, 1> 
        scale 0.25
    }
  }
}
box {
  <-0.5,0,-0.5>,<0.5,1,0.5>
  pigment {rgb 1}
}
box {
  <-0.5,0,-0.5>,<0.5,1,0.5>
  scale 0.5
  translate <0.75,0,-0.5>
  pigment {rgb 1}
}
---%<------%<---

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: ingo
Subject: Re: Perspective problem
Date: 19 Jun 2001 12:13:37
Message: <Xns90C5B969B486Eseed7@povray.org>
in news:slr### [at] fwicom Ron Parker wrote:

> Basically, you're saying the film plane is parallel
> to the XY plane, but the camera is pointed slightly upward.  It's
> like moving the lens on an old-style view camera without moving the
> film plane. 
> 

It would realy be nice if this could be don in a more 'easy to 
understand' way. Something like:
camera {
    	loacation ...
    	look_at ...
    	lens_plane {rotate<..> translate<..>}
    	film_plane {translate<..>}
}

One problem with how it is done now is that the plane of focus is 
completly wrong is you use focal blur. Even nicer would it be if it 
followd the rules of 'Scheimpflug' and 'Hinge' 
http://fox.nstn.ca/~hmmerk/HMArtls.html to get the right 'plane' of 
focus.

http://www.benderphoto.com/8x10.htm it may look 'old-style' but mine 
has been working perfectly for the last 15 years.

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Warp
Subject: Re: Perspective problem
Date: 19 Jun 2001 14:16:17
Message: <3b2f96f1@news.povray.org>
Thomas <tho### [at] gmxnet> wrote:
: __________________
: |                                   |
: |  |                             |   |
: |  |                             |   |
: |                                   |
: ------------------------

  You should seriously consider switching to a fixed-width font when
writing news.

  Variable-width fonts and news don't mix. If you use variable width
font and any type of ascii-art, you are supposing that *everyone* else
is using the *exact* same fonts and news reader settings that you are.
  This is comparable to assuming that in everyone's houses the fridge
is exactly 10 m 20 cm away from the front door of the house..

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Bob H 
Subject: Re: Perspective problem
Date: 20 Jun 2001 00:30:59
Message: <3b302703@news.povray.org>
Terrific solution.  Tried it out with a tiny clear red sphere at the camera
location before transforming and it does work; I just had to prove it to
myself first though.
I'd think this could be easily added into the source code if one of the
programmers would do so, but perhaps a simple macro is the answer.
Hmm, maybe not.  At least not until someone comes up with all the possible
parameters needed.  'angle' and 'location' needs to be accounted for, as
well as other things probably.

Btw, there are lenses are called Tilt and Shift, for use in getting a focal
plane to change or perspective distortion removed, respectively.

Bob H.


Post a reply to this message

From: Thomas
Subject: Re: Perspective problem
Date: 21 Jun 2001 06:49:32
Message: <3B31D137.5A0977B@gmx.net>
Hi All,

Thanks for all the suggestions! In the end I used the shear for the camera
which worked fine, it took  a bit of work though becuase my picture doesn't
have a 4:3 ratio. So I had to figure it out by trial and error.

Thanks again,


Thomas

ps. and I will have a look at my fonts next time when I do ASCII art.


Post a reply to this message

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