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:35:39 EDT (-0400)
  Re: Can I apply the camera transform matrix to objects?  
From: zachrahan
Date: 14 Sep 2005 22:00:01
Message: <web.4328d4c09d3b692fa205a1b30@news.povray.org>
"Rune" <new### [at] runevisioncom> wrote:

> If you want to make an object stay in the same place in your scene, but
> point at the location where the camera is, then you don't want to use the
> camera transform at all. Instead you should look at the macros
> Reorient_Trans() or Point_At_Trans() from transforms.inc (see 3.6.18
> transforms.inc in the POV-Ray documentation). You still need to know the
> location of the camera though.

Good point. I've been trying to use these two macros, but they seem a bit
under-determined for my needs. These only align a single axis of an object
to point at a certain point, but the object remains free to "spin" about
that axis. I'm trying to figure out a way to also specify an "up" vector
for an object such that when the object is pointed at a given point, that
"up" vector is parallel (in the viewing plane) to the Y-axis.

That is, I'm looking for some sort of "look_at" / "up" transform for objects
that is directly analogous to that available for the camera. I tried
writing an equivalent of gluLookAt as a SDL macro, but that doesn't seem to
quite work. Does anyone have any suggestions?

Zach


Post a reply to this message

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