POV-Ray : Newsgroups : povray.advanced-users : Can I apply the camera transform matrix to objects? : Re: Can I apply the camera transform matrix to objects? Server Time
28 Jul 2024 12:30:00 EDT (-0400)
  Re: Can I apply the camera transform matrix to objects?  
From: zachrahan
Date: 6 Sep 2005 16:20:01
Message: <web.431df8319d3b692fa205a1b30@news.povray.org>
"Tor Olav Kristensen" <tor### [at] REMOVETHISgmailcom> wrote:

Thanks for your reply, Tor.

> > (2) If there were some way to specify the orientation of objects via
> > "lookat" and "sky" parameters, as you can with the camera, I could just set
> > the camera and the objects to look at each other, with a common sky vector.
> >
> > Option 2 is neat because it's more general -- you could have objects all
> > point at any arbitrary thing. However, I don't see anything like that in
> > the documentation, so I assume that it's probably option 1 or nothing?
>
> I'm not sure what you mean, but you might find some answers in my replies in
> this thread:
>
>
http://news.povray.org/povray.advanced-users/thread/%3Cweb.43022440433cdf6544365ed70%40news.povray.org%3E/

Thanks for the pointer. Let me try to clarify, if I can. One of the povray
camera positioning modes allows you to specify a "look at" point and a
"sky" vector: the camera then looks down the line between the camera
position and the look-at point, and rotates about that axis such that the
"sky" vector is parallel (in the camera plane) with the camera "up"
direction. I would like to apply a transform parameterized in this way to
an object.

The gluLookAt man page has a concise description of the math for this:
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/gluLookAt.3.html
Given that definition I see now that this can clearly be implemented
as a simple macro within povray.

I am still interested in learning how to get at the camera transform
matrix, because for my specific application that would be a lot more direct.
if anyone has any further details on how to get at this, I would really like
to know it.

Thanks,
Zach


Post a reply to this message

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