POV-Ray : Newsgroups : povray.general : changing to right-handed system and aspect ratio Server Time
2 Nov 2024 15:27:25 EDT (-0400)
  changing to right-handed system and aspect ratio (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Chris Cera
Subject: changing to right-handed system and aspect ratio
Date: 13 Jan 2004 02:58:57
Message: <slrnc079it.ntq.cera@queen.mcs.drexel.edu>
I'm trying to do two things, change from:
    - left-handed system to right-handed system
    - change aspect ratio from 4/3 to 2

My resulting image has some shearing so the spheres looks more
like eggs.  I'm not sure what I'm doing wrong.  My output
dimensions are 640x320, and my camera declaration is below,
where the aspect ratio is used in the 'right' declaration:

camera {
    location <3, 0, 0.5>
    right <0, 2, 0> // make sure this is same aspect ratio as output
    up <0, 0, 1>
    direction  <-1, 0, 0>
}

The reason why I'm switching to a right-handed system is so then
I can synchronize the view with a separate modeling system.  Does
anybody have an idea of what I'm doing wrong?  Any help is
greatly appreciated, thanks!

Here are some links if somebody would like to recreate the
problem, or just see a screenshot:

    http://cera.us/tmp/spherescene.png
    http://cera.us/tmp/spherescene.pov
    http://cera.us/tmp/sphere.pov


-- 
cer### [at] csdrexeledu                 http://www.cs.drexel.edu/~cera


Post a reply to this message

From: Hughes, B 
Subject: Re: changing to right-handed system and aspect ratio
Date: 13 Jan 2004 05:14:03
Message: <4003c4eb$1@news.povray.org>
"Chris Cera" <cer### [at] drexeledu> wrote in message
news:slr### [at] queenmcsdrexeledu...
> I'm trying to do two things, change from:
>     - left-handed system to right-handed system
>     - change aspect ratio from 4/3 to 2
>
> My resulting image has some shearing so the spheres looks more
> like eggs.  I'm not sure what I'm doing wrong.  My output
> dimensions are 640x320

Try:

 camera {
     location <3, 0, 0.5>
     right image_width/image_height*y
     up <0, 0, 1>
     direction  <-1, 0, 0>
 }


-- 
Bob H.
http://www.3digitaleyes.com


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: changing to right-handed system and aspect ratio
Date: 13 Jan 2004 06:14:15
Message: <4003d307$1@news.povray.org>
In article <4003c4eb$1@news.povray.org> , "Hughes, B." 
<omn### [at] charternet> wrote:
>> camera {
>>     location <3, 0, 0.5>
>>     right <0, 2, 0> // make sure this is same aspect ratio as output
>>     up <0, 0, 1>
>>     direction  <-1, 0, 0>
>> }
>
>  camera {
>      location <3, 0, 0.5>
>      right image_width/image_height*y
>      up <0, 0, 1>
>      direction  <-1, 0, 0>
>  }

For a 640x320 image, the resulting camera you suggest will be absolutely
identical!  And it cannot solve the "problem" with the sphere either.

So what is the point of your suggestion? ;-)  Neither image_width nor
image_height are appropriate for this scene; nor do they belong in 99% of
the scenes where they are (ab)used.

The reason the sphere appears distorted is the default perspective camera.
So there is nothing wrong with the scene.  The perspective camera will make
objects that are close and not in the center of the image appear distorted,
which is especially visible if the image aspect ratio is on the extreme side
of things.  Depending on the scene, I would suggest to either use a smaller
camera angle (and increase the camera to object distance) or select another
camera (some trial and error may be necessary in that case).

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Slime
Subject: Re: changing to right-handed system and aspect ratio
Date: 13 Jan 2004 07:20:16
Message: <4003e280@news.povray.org>
> My resulting image has some shearing so the spheres looks more
> like eggs.  I'm not sure what I'm doing wrong.

The output is correct. It looks weird because you don't usually see this
effect in real life; that's because you don't really focus on objects in
your peripheral vision like those spheres are.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Hughes, B 
Subject: Re: changing to right-handed system and aspect ratio
Date: 13 Jan 2004 08:04:27
Message: <4003ecdb@news.povray.org>
"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:4003d307$1@news.povray.org...
> >
> >  camera {
> >      location <3, 0, 0.5>
> >      right image_width/image_height*y
> >      up <0, 0, 1>
> >      direction  <-1, 0, 0>
> >  }
>
> For a 640x320 image, the resulting camera you suggest will be absolutely
> identical!  And it cannot solve the "problem" with the sphere either.

I replied too fast, perhaps. Some people say resolutions in the order of
height then width so I didn't pay much attention to that. I figured the
trouble was about something they had done to set resolution incorrectly for
the aspect ratio they were trying to get, so to me that meant I should
suggest dividing the width by height taken directly from whatever output
size was being used.

> So what is the point of your suggestion? ;-)  Neither image_width nor
> image_height are appropriate for this scene; nor do they belong in 99% of
> the scenes where they are (ab)used.

I abuse it often just so I don't have to worry about what resolutions I set.
:-)

> The reason the sphere appears distorted is the default perspective camera.

That thought occured to me and then I skipped mentioning it because of how
basic that phenomenon seems to me anymore. Bad decision. You're absolutely
correct about using narrower angles of view or a more suitable camera
projection type.

Bob H.


Post a reply to this message

From: Warp
Subject: Re: changing to right-handed system and aspect ratio
Date: 13 Jan 2004 09:54:45
Message: <400406b5@news.povray.org>
It once again feels like maintaining the povQ&T pages is futile since
no-one uses it to answer questions already answered there.

http://tag.povray.org/povQandT/misconceptions.html#perspectivespheres

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


Post a reply to this message

From: Renderdog
Subject: Re: changing to right-handed system and aspect ratio
Date: 13 Jan 2004 11:10:02
Message: <web.400417d0b9c352846bae1fb90@news.povray.org>
Of course you get all the negative evidence, so here's a positive. I've
used the Q&T pages many times, and really appreciate them. I have
a terrible memory so I like to page through them on occasion to
remind myself of the possibilities.

I really like the way they're written, clear and easy to understand,
with an eye toward practicality.

I know this will go over like a lead balloon here, but I actually
appreciate the occasional RTFM question as it refreshes my memory
and sometimes spurs useful discussion. There are a lot of nice
resources out there but sometimes I can't remember where a
topic or question was discussed.


Warp wrote:
>  It once again feels like maintaining the povQ&T pages is futile since
>no-one uses it to answer questions already answered there.
>
>http://tag.povray.org/povQandT/misconceptions.html#perspectivespheres


Post a reply to this message

From: Tom Melly
Subject: Re: changing to right-handed system and aspect ratio
Date: 13 Jan 2004 12:05:08
Message: <40042544$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:400406b5@news.povray.org...
>   It once again feels like maintaining the povQ&T pages is futile since
> no-one uses it to answer questions already answered there.
>

As renderdog points out, your only evidence is, de facto, negative. That said,
to a certain extent you're probably right - humans being wot they are, we never
believe our problems aren't unique... (and hence cannot be in a faq).


Post a reply to this message

From: Harold
Subject: Re: changing to right-handed system and aspect ratio
Date: 13 Jan 2004 13:06:48
Message: <400433b8$1@news.povray.org>
Thorsten,
I also like to use a camera with image_width / image_height for the right.
Then I can change aspect ratio at render time without changing the script
file. So anyway, why is it abuse? Are there drawbacks to this method
that some of us are not aware? Also, I always use a perspective camera
because typically I'm rendering stereo pairs, and it is difference in
perspective
that creates the stereo effect. Would orthographic cameras work too?
Guess I should experiment.

TIA
Harold

"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:4003d307$1@news.povray.org...
> In article <4003c4eb$1@news.povray.org> , "Hughes, B."
> <omn### [at] charternet> wrote:
> >
> >  camera {
> >      location <3, 0, 0.5>
> >      right image_width/image_height*y
> >      up <0, 0, 1>
> >      direction  <-1, 0, 0>
> >  }
>
> For a 640x320 image, the resulting camera you suggest will be absolutely
> identical!  And it cannot solve the "problem" with the sphere either.
>
> So what is the point of your suggestion? ;-)  Neither image_width nor
> image_height are appropriate for this scene; nor do they belong in 99% of
> the scenes where they are (ab)used.
>
> The reason the sphere appears distorted is the default perspective camera.
> So there is nothing wrong with the scene.  The perspective camera will
make
> objects that are close and not in the center of the image appear
distorted,
> which is especially visible if the image aspect ratio is on the extreme
side
> of things.  Depending on the scene, I would suggest to either use a
smaller
> camera angle (and increase the camera to object distance) or select
another
> camera (some trial and error may be necessary in that case).
>
>     Thorsten
>
> ____________________________________________________
> Thorsten Froehlich
> e-mail: mac### [at] povrayorg
>
> I am a member of the POV-Ray Team.
> Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Warp
Subject: Re: changing to right-handed system and aspect ratio
Date: 13 Jan 2004 15:28:53
Message: <40045505@news.povray.org>
Harold <bai### [at] 3dculturecom> wrote:
> I also like to use a camera with image_width / image_height for the right.
> Then I can change aspect ratio at render time without changing the script
> file.

  That's actually not really true.

  If you change the aspect ratio of the rendering resolution and the
camera adjusts automatically to that using "right image_width/image_height",
the image will be adjusted vertically so that part of the image from the
up and bottom sides will go out of the image (if changing to a wider
aspect ratio) or some extra scenery will appear at the top and the
bottom (if changing to a narrower aspect ratio).
  This might not always be the desired effect. You might want the extra
stuff to disappear/appear from the sides, not the top and the bottom,
or you might even want a combination of both (eg. when widening the
aspect ratio you want some stuff out from the top and bottom and
extra scenery appearing from the sides).
  Depending on what you want you will probably need to adjust the camera
parameters anyways.

> Are there drawbacks to this method that some of us are not aware?

  Some drawbacks are listed above.
  An additional drawback is that if you really want to keep the 4:3 aspect
ratio even though you are rendering with a resolution having a different
aspect ratio (eg. a 320x400 image for the Windows startup image), your
automatic camera setting will produce the undesired effect (ie. the aspect
ratio of the image is not kept to 4:3), thus you need to edit the camera
parameters again.

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


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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