POV-Ray : Newsgroups : povray.animations : Camera Movement and Look via 1 Spline Server Time
24 Nov 2024 00:27:27 EST (-0500)
  Camera Movement and Look via 1 Spline (Message 1 to 2 of 2)  
From: Wheredragon
Subject: Camera Movement and Look via 1 Spline
Date: 20 Mar 2003 15:03:59
Message: <3e7a1eaf@news.povray.org>
I have found expirementing with pov-rays utilities fun and useful,
especially spline.

I.E.  I am making a camera "fly" around a scene with spline, as well as
pointing it in the way it's going.

Here's the trick I use:
1. I define the vertex spline in intervals of 10, starting with -10 and
ending with n+10
2. In camera I use this (Movement is my declared spline):
  camera {
    location Movement(clock)
    look_at Movement(clock+1)
  // All other camera settings follow
  }
3. And all the other stuff goes after.
4. when compiling, "+ki0 +kfn +kfi0 +kffn" and watch as the camera moves
around the path, looking in the direction you want it to go.

Of course it can be hard to figure what the path is, so I add two debug
branches:

camera {
#ifdef (dbg)
  //Set camera away from the scene, and point at thw path
#else
  //Normal Camera Movement
#end
....
#ifdef (dbg)
  #define Lp1=0;
  #while (Lp1<n+1)
    object {sphere{Movement(Lp1), 0.25} //Replace 0.25 with size if desired
    #if (mod(Lp1,10)=0)
      pigment{color Red} //Mark the defined spline point in red
    #else
      pigment{color Yellow} //Mark the spline path in Yellow
    #end
    }
    #declare Lp1=Lp1+1;
  #end
#end

When you set dbg, and render a selected frame, the camera will point to your
scene for a distance and reviel the spline path.


Post a reply to this message

From: Gwen & Emory Stagmer
Subject: Re: Camera Movement and Look via 1 Spline
Date: 23 Mar 2003 23:32:30
Message: <3E7E895D.17358184@comcast.net>
I have a Hermite curve program for POV which I use for 
animations, both camera and object:
  http://www.geocities.com/emory_stagmer/povherm

It's free and useful! ;)

Emory


Wheredragon wrote:
> 
> I have found expirementing with pov-rays utilities fun and useful,
> especially spline.
> 
> I.E.  I am making a camera "fly" around a scene with spline, as well as
> pointing it in the way it's going.
> 
> Here's the trick I use:
> 1. I define the vertex spline in intervals of 10, starting with -10 and
> ending with n+10
> 2. In camera I use this (Movement is my declared spline):
>   camera {
>     location Movement(clock)
>     look_at Movement(clock+1)
>   // All other camera settings follow
>   }
> 3. And all the other stuff goes after.
> 4. when compiling, "+ki0 +kfn +kfi0 +kffn" and watch as the camera moves
> around the path, looking in the direction you want it to go.
> 
> Of course it can be hard to figure what the path is, so I add two debug
> branches:
> 
> camera {
> #ifdef (dbg)
>   //Set camera away from the scene, and point at thw path
> #else
>   //Normal Camera Movement
> #end
> ....
> #ifdef (dbg)
>   #define Lp1=0;
>   #while (Lp1<n+1)
>     object {sphere{Movement(Lp1), 0.25} //Replace 0.25 with size if desired
>     #if (mod(Lp1,10)=0)
>       pigment{color Red} //Mark the defined spline point in red
>     #else
>       pigment{color Yellow} //Mark the spline path in Yellow
>     #end
>     }
>     #declare Lp1=Lp1+1;
>   #end
> #end
> 
> When you set dbg, and render a selected frame, the camera will point to your
> scene for a distance and reviel the spline path.


Post a reply to this message

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