POV-Ray : Newsgroups : povray.animations : How to animate "look_at"? Server Time
24 Nov 2024 14:05:33 EST (-0500)
  How to animate "look_at"? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Kynk
Subject: How to animate "look_at"?
Date: 27 Dec 1999 15:30:22
Message: <3867cc5e@news.povray.org>
Hi everybody!
I'm new to POV-Ray animation. The first problem I met concearns the camera
modifier "look_at". Is it possible to animate it?
I tried to use the following instructions:

look_at
    From (0, <-56, -34, 1>)
    Using ("", 1, 1,"")
    To (0.5, <-56, -34, 1>)
    Using ("A", 0.8, 1,"")
    To (1, <-1068, -34, 1>)

but POV-Ray doesn't recognize it.

Where was I wrong?

Thanks

Domenico


Post a reply to this message

From: Steve Martin
Subject: Re: How to animate "look_at"?
Date: 27 Dec 1999 19:57:44
Message: <38680ACD.86044B66@usit.net>
> I'm new to POV-Ray animation. The first problem I met concearns the camera
> modifier "look_at". Is it possible to animate it?
> I tried to use the following instructions:
> 
> look_at
>     From (0, <-56, -34, 1>)
>     Using ("", 1, 1,"")
>     To (0.5, <-56, -34, 1>)
>     Using ("A", 0.8, 1,"")
>     To (1, <-1068, -34, 1>)
> 
> but POV-Ray doesn't recognize it.

I'm not up on all the patched versions of POV-Ray, but I have a
printed copy of the doc for 3.1g here, and I can't find any
mention of the construct you've used here. I don't think this
is a valid POV-Ray statement.

The form of the "look_at" modifier is

  camera { location <x, y, z> look_at <x, y, z> }

where x, y, and z are the coordinate values. Of course,
the values can be varied based on the clock variable,
which will animate both the camera location and the
look_at point.

It appears from your example that you are trying to vary the camera
values based on some parameter. One way to animate this would be to
use a "switch" statement, such as:

#switch (clock)
#range (0, 5)
#declare cam_position = <0, 0, 0> ;
#declare cam_look = <0, 0, 20> ;
#break
#range (5, 10)
#declare cam_position = <0, (clock-5)*2, 0> ;
#declare cam_look = <0, 0, (clock-5)*2> ;
#end

camera { location cam_position look_at cam_look }

This snippet of code will leave the camera stationary for the
first five clock counts, then move it ten units vertically and
move the look_at point ten units back along the Z axis during
the next five counts. This is a simple example; this can get
extremely complex, especially if you spline the camera movements
to get smooth starts, stops, and curved paths.

The "Using" construct you use here doesn't seem to be part of the
POV-Ray scene language as nearly as I can tell. Where did you get
this, just out of curiosity?


Post a reply to this message

From: Phil Clute
Subject: Re: How to animate "look_at"?
Date: 27 Dec 1999 21:43:31
Message: <386823D2.185365C@tiac.net>
>The "Using" construct you use here doesn't seem to be part of the
>POV-Ray scene language as nearly as I can tell. Where did you get
>this, just out of curiosity?

I think he's using Chris Colefax's Clock Modifier include file.
http://www.geocities.com/SiliconValley/Lakes/1434/

-- 
Phil
...coffee?...yes please! extra sugar,extra cream...Thank you.


Post a reply to this message

From: Phil Clute
Subject: Re: How to animate "look_at"?
Date: 27 Dec 1999 22:15:57
Message: <38682B6B.D0EE765F@tiac.net>
I assume your using Mr. Colefax's Autoclock.mcr.

Try something like this:

#include "AutoClck.mcr"

#declare MyCamera = <0,0,0>;
Declare_From(MyCamera,0)Declare_To_Using(MyCamera,.5,<-3.0,1.5,-6>,"S")
Declare_To(MyCamera,1,<3,4,10>)


camera
{
  location  <0,2,-10>
  look_at  <MyCamera.x, MyCamera.y, MyCamera.z>
}


My example isn't real impressive but it should work.

In case you haven't checked it out here's a cool tutorial that will
help you learn about the Autoclock.mcr .
http://www.puzzlecraft.com/cm/ClockMod.html

-- 
Phil
...coffee?...yes please! extra sugar,extra cream...Thank you.


Post a reply to this message

From: Nieminen Juha
Subject: Re: How to animate "look_at"?
Date: 28 Dec 1999 14:01:15
Message: <386908fb@news.povray.org>
Phil Clute <pcl### [at] tiacnet> wrote:

:   look_at  <MyCamera.x, MyCamera.y, MyCamera.z>

  Why this and not just:

    look_at MyCamera

?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Phil Clute
Subject: Re: How to animate "look_at"?
Date: 28 Dec 1999 17:32:07
Message: <38693A67.E3CAEF2B@tiac.net>
>  Why this and not just:
> 
>     look_at MyCamera
> 

Oops.
Because I copied this from one of my files and didn't
think to change it when I posted it here.
I think when I originally did it I was probably just trying
out that feature.
-- 
Phil
...coffee?...yes please! extra sugar,extra cream...Thank you.


Post a reply to this message

From: Chris Colefax
Subject: Re: How to animate "look_at"?
Date: 28 Dec 1999 19:05:31
Message: <3869504b@news.povray.org>
Kynk wrote:
> I'm new to POV-Ray animation. The first problem I met concearns the camera
> modifier "look_at". Is it possible to animate it?
> I tried to use the following instructions:
>
> look_at
>     From (0, <-56, -34, 1>)
>     Using ("", 1, 1,"")
>     To (0.5, <-56, -34, 1>)
>     Using ("A", 0.8, 1,"")
>     To (1, <-1068, -34, 1>)
>
> but POV-Ray doesn't recognize it.
>
> Where was I wrong?

The syntax you've shown is that which I created for my Automatic Clock
Modifier macro file.  This means the From (), To (), and Using () statements
are not internal to POV-Ray, but functions added by including my macro file.
Therefore, to use this syntax you must first include the macro file
(presuming you have downloaded it from http://www.geocities.com/ccolefax and
installed it properly):

   #include "autoclck.mcr" // Before any animation statements!

Having done that you can animate the scene using INI file or command line
settings, and your camera should indeed look at <-56, -34, 1> for the first
half of the animation before accelerating to <-1068, -34, 1>.


Post a reply to this message

From: Kynk
Subject: Re: How to animate "look_at"?
Date: 29 Dec 1999 13:10:49
Message: <386a4ea9@news.povray.org>
Phil Clute <pcl### [at] tiacnet> wrote in message 38682B6B.D0EE765F@tiac.net...
> I assume your using Mr. Colefax's Autoclock.mcr.
>
> Try something like this:
>
> #include "AutoClck.mcr"
>
> #declare MyCamera = <0,0,0>;
> Declare_From(MyCamera,0)Declare_To_Using(MyCamera,.5,<-3.0,1.5,-6>,"S")
> Declare_To(MyCamera,1,<3,4,10>)
>
>
> camera
> {
>   location  <0,2,-10>
>   look_at  <MyCamera.x, MyCamera.y, MyCamera.z>
> }
>
>
> My example isn't real impressive but it should work.

Thanks!!
It does work!

> In case you haven't checked it out here's a cool tutorial that will
> help you learn about the Autoclock.mcr .
> http://www.puzzlecraft.com/cm/ClockMod.html
>

I read it, but I still haven't find anything concernig "look_at".

Cheers

Domenico


Post a reply to this message

From: Kynk
Subject: Re: How to animate "look_at"?
Date: 29 Dec 1999 13:10:51
Message: <386a4eab@news.povray.org>
Phil Clute <pcl### [at] tiacnet> wrote in message 38682B6B.D0EE765F@tiac.net...
> I assume your using Mr. Colefax's Autoclock.mcr.
>
> Try something like this:
>
> #include "AutoClck.mcr"
>
> #declare MyCamera = <0,0,0>;
> Declare_From(MyCamera,0)Declare_To_Using(MyCamera,.5,<-3.0,1.5,-6>,"S")
> Declare_To(MyCamera,1,<3,4,10>)
>
>
> camera
> {
>   location  <0,2,-10>
>   look_at  <MyCamera.x, MyCamera.y, MyCamera.z>
> }
>
>
> My example isn't real impressive but it should work.

Thanks!!
It does work!

> In case you haven't checked it out here's a cool tutorial that will
> help you learn about the Autoclock.mcr .
> http://www.puzzlecraft.com/cm/ClockMod.html
>

I read it, but I still haven't find anything concernig "look_at".

Cheers

Domenico


Post a reply to this message

From: Phil Clute
Subject: Re: How to animate "look_at"?
Date: 29 Dec 1999 14:42:41
Message: <386A6433.9AFF7808@tiac.net>
> I read it, but I still haven't find anything concernig "look_at".
> 

I'm not sure if that page will have anything concerning
look_at specifically but changing the camera location and
look_at are the same as moving anything else in your scene.

Oh and as Nieminen Juha pointed out, you can change the look_at to
this:

camera
{
  location  <0,2,-10>
  look_at  MyCamera
}

It works the same...
I was just kinda sleepy when I posted the first time. :)
-- 
Phil
...coffee?...yes please! extra sugar,extra cream...Thank you.


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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