Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / camera interpolation (linear is bad). Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
takito

March 13, 2005, 02:10 AM

hello forum.

i`ve got problem with camera interpolation. now i`m using linear, but it looks horrible, and i`d like change it, but without changing my camera-format, which looks like:

word _time
dword _camera_x
dword _camera_y
dword _camera_z

and so on..

as you know, linear camera is bad, but beizers etc. need more points (control points) and simply i haven`t so much space in my executable (4k intro). any ideas, how i could make it less angular?

 
Yarin

March 13, 2005, 04:10 AM

The only idea that I can come up with atm is to describe the camera movement keyframes with points on spheres. But this method isn't that space saving compared to Bezier curves as well. You would need a point which describes the center of the sphere, a radius and an angle (quaternion / euler angle) per keyframe.

(edit: typo)

 
[MENTAL]

March 13, 2005, 04:11 AM

How are you storing the camera path at the moment? If you're using points, then just use a bezier or catmull spline to interpolate between them.

I don't see how using splines would increase memory unless you're storing instructions in a list instead (i.e. move left, move right, etc).

 
takito

March 13, 2005, 05:59 AM

mental :: yeah, i`m storing points in "lists", but i read, that beziers and splines require "control points" which are increasing my executable..

 
Nils Pipenbrinck

March 13, 2005, 09:17 AM

Sounds like a perfect use for cardinal-rom splines...

They are as smooth as beziers can get, but you don't need the tangents (they are directly calculated from the keyframes).

http://www.cubic.org/~submissive/sourcerer/hermite.htm



 
olivierr

March 13, 2005, 05:16 PM

I sometimes use 'exponential' interpolation. which would look like this

CameraPos += (NewCameraPos - CameraPos) * fExponent * FrameTime;

 
This thread contains 6 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.