![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hey, gang.
I'm trying to do a fly-by animation, with the camera moving to point at
the object, and I'm getting an odd result. My code looks like this:
camera {
location <-6, 3, -100>
translate 200*clock*z
look_at 0
}
But, instead of the camera twisting to look at the origin as it goes, it
keeps pointing along the same vector. Why is it doing that?
(I'm using POV 3.5 for MacIntosh, no extras or fancy stuff)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Thu, 24 Jul 2003 09:18:23 -0700, Dawn McKnight <d-m### [at] cox net> wrote:
>Hey, gang.
>
>I'm trying to do a fly-by animation, with the camera moving to point at
>the object, and I'm getting an odd result. My code looks like this:
>
>camera {
> location <-6, 3, -100>
> translate 200*clock*z
> look_at 0
> }
>
>But, instead of the camera twisting to look at the origin as it goes, it
>keeps pointing along the same vector. Why is it doing that?
>
>(I'm using POV 3.5 for MacIntosh, no extras or fancy stuff)
Try look_at <0,0,0>
It needs a 3D point to look at.
Regards
Stephen
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Dawn McKnight" <d-m### [at] cox net> wrote in message
news:d-m### [at] netplex aussie org...
>
> But, instead of the camera twisting to look at the origin as it goes, it
> keeps pointing along the same vector. Why is it doing that?
look_at is relative to the location and is not affected by translate (I never
knew that).
So your code should be:
camera {
location <-6, 3, -100+(200*clock)>
look_at 0
}
(untested)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
<mca### [at] aol com (S McAvoy)> wrote in message
news:3f200738.176744745@news.povray.org...
> Try look_at <0,0,0>
>
> It needs a 3D point to look at.
> Regards
> Stephen
Well, one of us is wrong.....
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3f200738.176744745@news.povray.org>,
mca### [at] aol com (S McAvoy) wrote:
> Try look_at <0,0,0>
>
> It needs a 3D point to look at.
This is not a problem. The 0 is expanded to < 0, 0, 0> automatically by
the parser, this is a common shortcut.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3f2008a1$1@news.povray.org>,
"Tom Melly" <tom### [at] tomandlu co uk> wrote:
> look_at is relative to the location and is not affected by translate (I never
> knew that).
The look_at point is an absolute point, it is independent of the
location.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <d-m### [at] netplex aussie org>,
Dawn McKnight <d-m### [at] cox net> wrote:
> camera {
> location <-6, 3, -100>
> translate 200*clock*z
> look_at 0
> }
>
> But, instead of the camera twisting to look at the origin as it goes, it
> keeps pointing along the same vector. Why is it doing that?
Camera transformations are taken into account after the rest of the
camera statements, to avoid ambiguities in the camera specification, so
what you are doing is translating the entire camera, the same as:
camera {
location <-6, 3, -100>
look_at 0
translate 200*clock*z
}
You want to translate the location point instead.
camera {
location <-6, 3, -100> + 200*clock*z
look_at 0
}
If you want to use a more complex transformation, look at the
vtransform() macro in transforms.inc.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Thu, 24 Jul 2003 17:27:17 +0100, "Tom Melly" <tom### [at] tomandlu co uk> wrote:
><mca### [at] aol com (S McAvoy)> wrote in message
>news:3f200738.176744745@news.povray.org...
>
>> Try look_at <0,0,0>
>>
>> It needs a 3D point to look at.
>> Regards
>> Stephen
>
>Well, one of us is wrong.....
>
Oh dear I didn't check :-{
Regards
Stephen
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <cja### [at] netplex aussie org>,
Christopher James Huff <cja### [at] earthlink net> wrote:
> Camera transformations are taken into account after the rest of the
> camera statements, to avoid ambiguities in the camera specification, so
> what you are doing is translating the entire camera, the same as:
Ah, okay. Thank you very much for your help!
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |