POV-Ray : Newsgroups : povray.newusers : distorted image Server Time
30 Jul 2024 12:32:51 EDT (-0400)
  distorted image (Message 1 to 5 of 5)  
From: SomeOne
Subject: distorted image
Date: 30 Jun 2004 13:25:34
Message: <40e2f78e$1@news.povray.org>
I have this simple scene (see below). I want to render this scene
at -w640 -h360. As per the manual, I adjusted the camera 'right' and 'up'
vector to allow for the different aspect ratio. However, as you will notice
when you render this scene, the spheres in the corners look distorted. I've
tried different settings for 'right' and 'up' but can't find a proper setting.
IMHO all three spheres should look round. It seems only natural someone has
already found the right camera settings for a 16:9 A/R.  Please share them with
me, because I'm at a loss here.

Thanks for your time,
-- 
Maurice
Scene attached:
-----8<-----
#version 3.6;
global_settings {
 assumed_gamma 1.0
}

// ==== Standard POV-Ray Includes ====
#include "colors.inc"   // Standard Color definitions
#include "textures.inc"   // Standard Texture definitions
#include "functions.inc"  // internal functions usable in user defined
functions
// ============================= GENERAL DECLARES
#declare SkyBlue_05=rgb <91,113,171>/255;
#declare SkyBlue_06=rgb <161,184,213>/255;
#declare clrSun=rgb <1,1,1>; //<237,194,117>/255;

#declare Sky_pigment=pigment{
  gradient z
  pigment_map{
    [0 pigment_pattern{function{max(0,min(1,y))}} color_map{[0
SkyBlue_06*2][0.5 SkyBlue_05*2]}]
    [1 pigment_pattern{function{max(0,min(1,y))}} color_map{[0 SkyBlue_06][0.5
SkyBlue_05]}]
  }
  scale <1,1,2>
  translate -z
}

#declare cam_x =  0;
#declare cam_y =  3;
#declare cam_z =  -15;
#declare cam_v =  10;

camera
{
 location <cam_x,cam_y,cam_z> * cam_v
 right image_width/image_height*x
 up y
 look_at <0,30,200>
}

light_source{ //sun
 <150000,180000,-100000>
 color rgb clrSun*2 //<2,2,2>
}

sky_sphere {
  pigment{
   Sky_pigment
  }
}

sphere{
 0,20
 translate <80,0,-20>
 pigment{ Blue }
}

sphere{
 0,20
 translate <-80,0,-20>
 pigment{ Red }
}

sphere{
 0,20
 translate <0,0,-20>
 pigment{ Green }
}

-- 
-- 
M.E.J.R.Hendrix
a s o e
u t r n
r e i s
i r e
c   n
e


Post a reply to this message

From: Ross
Subject: Re: distorted image
Date: 30 Jun 2004 13:35:05
Message: <40e2f9c9$1@news.povray.org>
"SomeOne" <ask### [at] yahoocouknospam> wrote in message
news:40e2f78e$1@news.povray.org...
> I have this simple scene (see below). I want to render this scene
> at -w640 -h360. As per the manual, I adjusted the camera 'right' and 'up'
> vector to allow for the different aspect ratio. However, as you will
notice
> when you render this scene, the spheres in the corners look distorted.
I've
> tried different settings for 'right' and 'up' but can't find a proper
setting.
> IMHO all three spheres should look round. It seems only natural someone
has
> already found the right camera settings for a 16:9 A/R.  Please share them
with
> me, because I'm at a loss here.
>
> Thanks for your time,

why spheres at the edge of images distort is in the FAQ i think.
http://tag.povray.org/povQandT/misconceptions.html#perspectivespheres


Post a reply to this message

From: SomeOne
Subject: Re: distorted image
Date: 30 Jun 2004 15:28:45
Message: <40e3146d$1@news.povray.org>
"Ross" <rli### [at] everestkcnet> schreef in bericht
news:40e2f9c9$1@news.povray.org...
| "SomeOne" <ask### [at] yahoocouknospam> wrote in message
| news:40e2f78e$1@news.povray.org...
| > I have this simple scene (see below). I want to render this scene
| > at -w640 -h360. As per the manual, I adjusted the camera 'right' and 'up'
| > vector to allow for the different aspect ratio. However, as you will
| notice
| > when you render this scene, the spheres in the corners look distorted.
| I've
| > tried different settings for 'right' and 'up' but can't find a proper
| setting.
| > IMHO all three spheres should look round. It seems only natural someone
| has
| > already found the right camera settings for a 16:9 A/R.  Please share them
| with
| > me, because I'm at a loss here.
| >
| > Thanks for your time,
|
| why spheres at the edge of images distort is in the FAQ i think.
| http://tag.povray.org/povQandT/misconceptions.html#perspectivespheres


I'm aware of the perspective issue. I just want the spheres to look round on
the image. And I just can't seem to get it right. The FAQ did have an
interesting suggestion that I will try: the use of a panoramic camera or
ultra_wide_angle

Thanks for pointing that out.


Post a reply to this message

From: gonzo
Subject: Re: distorted image
Date: 30 Jun 2004 19:05:00
Message: <web.40e3461c5a03d15fa0c272b50@news.povray.org>
"SomeOne" <ask### [at] yahoocouknospam> wrote:
> I have this simple scene (see below). I want to render this scene
> at -w640 -h360. As per the manual, I adjusted the camera 'right' and 'up'
> vector to allow for the different aspect ratio. However, as you will notice
> when you render this scene, the spheres in the corners look distorted. I've
> tried different settings for 'right' and 'up' but can't find a proper setting.


You might try Dr John's field camera macro at:
http://news.povray.org/povray.text.scene-files/thread/%3Cweb.3e0c736a1f1273cdb29393de0%40news.povray.org%3E/?ttop=19360
6&toff=50

I haven't tried it with spheres but it works great to eliminate the vertical
distortion on buildings.

RG


Post a reply to this message

From: Brian Elliott
Subject: Re: distorted image
Date: 1 Jul 2004 07:21:12
Message: <40e3f3a8@news.povray.org>
"SomeOne" <ask### [at] yahoocouknospam> wrote in message
news:40e3146d$1@news.povray.org...
> I'm aware of the perspective issue. I just want the spheres to look round
on
> the image. And I just can't seem to get it right. The FAQ did have an
> interesting suggestion that I will try: the use of a panoramic camera or
> ultra_wide_angle

As you discovered, there is zero perspective distortion when the camera rays
shoot perpendicularly out from the location vector (a point source) through
the image plane (what the pixels map onto and is at a distance in front of
location by the length of the direction vector).  But RayIsPerpToPlane only
occurs at the centre of the image.

But at the scene edges, camera rays shoot from the location point, whence
they cut at an angle through the flat plane "sheet" and into the scene.  If
your camera has a 90 degree view angle, a camera ray shot to the centre of a
left/right edge of the image may go through the picture plane at around 45
degrees, and more in corners because they are further distance from centre,
leading to these ellipses that stretch away from the centre of the image.
I'm not going to say it is *exactly* 45 degrees as I don't know how aspect
ratio and the right vector affect the calculation of the ray's fianl path,
but let's just say it is related to camera angle.

The upshot of this waffle is that if the panoramic or UWA doesn't work for
you, a way to correct for it is to reduce the perspective camera's angle, so
that outer rays shot through the image plane are more perpendicular.
90-degree camera views clearly show edge distortion and I personally never
use that value because of it.  Try ballpark of 40 to 65 degrees and see if
the results become acceptable to you.

Naturally this changes your scene composition -- sorry, not nice once you've
already started.  With a narrower angle, you may have to move objects
inward, and/or move the camera backward further to fit objects in the scene
again.  And that new camera viewpoint also represents a change of
perspective position, so the relationship between objects in the scene will
not be exactly the same as before.  You could consider a narrow camera angle
as being rather like a telephoto lens.

Cheers,
    Brian


Post a reply to this message

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