POV-Ray : Newsgroups : povray.general : Camera problem Server Time
4 Aug 2024 14:24:27 EDT (-0400)
  Camera problem (Message 1 to 10 of 10)  
From: Texel
Subject: Camera problem
Date: 16 May 2003 13:06:35
Message: <3ec51a9b$1@news.povray.org>
I am writting an .an8 to povray converter and i have a problem of camera
with povray (i don't know how to use it very well).
My camera don't seem to be well converted because my walls are deformed.
Look at this:
http:\\texel3d.free.fr\bugs\ani2pov.jpg

The .an8 file store this information:

_ Location in the scene (x,y,z)

_Orientation (quaternion)

_ fov



I use the Anim8or location of the camera.
And i convert the an8 orientation quaternion in order to have a target
position (like in OpenGL with  gluLookAt), and an Up vector.

And i write something like this in a pov file:

camera {
   location <150.000000,100.000000,200.000000>
   up <-0.182860,0.952424,-0.243825>
   right <-4/3,0,0>     // for the right hand
   look_at <144.285538,96.952240,192.380676>
}

My problem can't come from the object (i have no probleme with My .an8
OpenGL viewer).

Why dose it not work? i have tried to add "angle 90" because it seems to be
the fov in the documentation and it's worse!

What do i have to write in a pov file to put a camera when i have this
informations (location, orientation and fov)?

you can find the .an8 and the povray file here:
http:\\texel3d.free.fr\bugs\ani2pov_bug.zip

Thanks.


Post a reply to this message

From: ABX
Subject: Re: Camera problem
Date: 16 May 2003 13:19:31
Message: <ev6acvcs877rrib81ig2k69bt15fospie5@4ax.com>
On Fri, 16 May 2003 19:12:13 +0200, "Texel" <gsm### [at] netcourriercom> wrote:
> My problem can't come from the object (i have no probleme with My .an8
> OpenGL viewer).

Are you sure ? Is that airplane on the image also from the same export ? If the
deformation could be from camera, then airplane would be also distorted. I do
not see any deformation in airplane so I feel there is something wrong with
background object. Looking at shadow of airplane, isn't your distortion just a
shadow from one wall ? Just a guess, I didn't measured coordinates in your
script.

ABX


Post a reply to this message

From: ABX
Subject: Re: Camera problem
Date: 16 May 2003 13:27:04
Message: <uh7acvsa854pbmf7uncbc9flbudnhqst5j@4ax.com>
On Fri, 16 May 2003 19:12:13 +0200, "Texel" <gsm### [at] netcourriercom> wrote:
> I am writting an .an8 to povray converter

BTW: Since uv_mapping is not important in exported texture so there is no need
to output uv coordinates for mesh2{}. Your export would create smaller files
this way. At least it could be optional (because users could want apply other
texture by hand).

ABX


Post a reply to this message

From: Texel
Subject: Re: Camera problem
Date: 16 May 2003 13:58:35
Message: <3ec526cb@news.povray.org>
Oh!! Sorry, i have make a big error with the light position!

My exporter don't export light very well and i have put the light from an
another file and i have forgotten to change the position of the light when i
tested an another .an8 scene :)

It's working!!!

You are right for the uv coords, but it's an alpha version :)


Post a reply to this message

From: Christopher James Huff
Subject: Re: Camera problem
Date: 16 May 2003 22:11:46
Message: <cjameshuff-C479F8.21121716052003@netplex.aussie.org>
In article <3ec51a9b$1@news.povray.org>,
 "Texel" <gsm### [at] netcourriercom> wrote:

> camera {
>    location <150.000000,100.000000,200.000000>
>    up <-0.182860,0.952424,-0.243825>
>    right <-4/3,0,0>     // for the right hand
>    look_at <144.285538,96.952240,192.380676>
> }

Probably unrelated to your problem, but either the right or the up 
vector looks wrong. Its length is very close to 1, as it should be, but 
it is not perpendicular to the right vector, it is tilted a little to 
the left. Non-perpendicular vectors are occasionally useful, but very 
rarely. And you might want to use "direction" instead of "look_at". The 
look_at feature does some internal calculations that may change your 
other settings, and I'm guessing you had to compute the look_at point 
from the direction anyway (location + direction*something to do with 
FOV? Or just location + direction*10?). As I recall from some recent 
discussion, one of those side effects is that non-perpendicular vectors 
get straightened out.

You mention you use quaternions to store the orientation...it may be 
easier to convert it to a matrix transform and use POV-Ray's internal 
transformations instead of computing the camera vectors. BTW, know of 
any good websites explaining the math of quaternions and how they apply 
to rotations?

-- 
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: Texel
Subject: Re: Camera problem
Date: 17 May 2003 05:20:04
Message: <web.3ec5fdff8f5ec5aa16ab3e0@news.povray.org>
I convert quaternion to matrix, and then i use it to rotate some points near
the camera.
ex:
LookAt=(location + DefaultDirection*10)*Matrix

But i don't know how to set the fov (i am a very beginner in povray)?

I write the matrix for the orientation of the object (converted from
quaternion) in the pov file.
But i don't know how to write matrix for the camera (not the math, but how
to declare it in the camera chunk)


Post a reply to this message

From: Texel
Subject: Re: Camera problem
Date: 19 May 2003 13:25:06
Message: <web.3ec913448f5ec5aa8407b08e0@news.povray.org>
How can i set the FOV angle like in OpenGL?


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Camera problem
Date: 19 May 2003 17:01:20
Message: <3ec94620$1@news.povray.org>
In article <web.3ec913448f5ec5aa8407b08e0@news.povray.org> , "Texel" 
<nomail@nomail> wrote:

> How can i set the FOV angle like in OpenGL?

How about "angle"?

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Texel
Subject: Re: Camera problem
Date: 20 May 2003 12:40:02
Message: <web.3eca59948f5ec5aa33a9d6410@news.povray.org>
>How about "angle"?

With angle i have not the same result with Anim8or renderer and Pov.
130 with Anim8or is approximately equal to 90 with Pov (this is a big
difference!).

How can i convert fov angle into pov ?


Post a reply to this message

From: ABX
Subject: Re: Camera problem
Date: 20 May 2003 12:50:22
Message: <31nkcv88r2g2u5j7j3fm89lu2uc0r0tidb@4ax.com>
On Tue, 20 May 2003 12:36:36 EDT, "Texel" <nomail@nomail> wrote:
> >How about "angle"?
>
> With angle i have not the same result with Anim8or renderer and Pov.
> 130 with Anim8or is approximately equal to 90 with Pov (this is a big
> difference!).
>
> How can i convert fov angle into pov ?

Without definition of fov angle used in Anim8or nobody will answer you :-)
Perhaps it is problem that one is in vertical and second is horizontal. Just
guess.

ABX


Post a reply to this message

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