POV-Ray : Newsgroups : povray.animations : How to animate "look_at"? : Re: How to animate "look_at"? Server Time
28 Jul 2024 14:22:15 EDT (-0400)
  Re: How to animate "look_at"?  
From: Steve Martin
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

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