Archived

This topic is now archived and is closed to further replies.

nookiepl

Smooth camera movement ?

Recommended Posts

how to make smooth camera movment ??? I store my camera data like this: float x, y, z , pitch, yaw struct waypoint { float x,y,z,yaw,pitch,speed }; waypoint waypoints[max_waypoints] i save the waypoints in a file but i don''t know how to interpolate them, or how to make bezier patches from this coordinates ??? any source or help ???

Share this post


Link to post
Share on other sites
There are many methods of interpolating between two values.
Latelly I started to use Bezier curves. They are very easy to code and let you control the path of camera/objects/whatever you need. For more info look for bezier curves.
You can also visit my tutorial - in polish language (might be still helpfull, also working code included)
http://warsztat.pac.pl/mirekcz/mczart/mczbcur.shtml
at the bottom you will find a link to am example program (src+exe).
Example program uses ddraw 640x480x32bit mode. Check the DrawBezier function in engine.cpp - that''s what interests you.
program keys:
"1"-1 bezier curve
"2"-2 bezier curves
"3"-properly connected two bezier curves for smooth movement
(fifth point is placed according to third point position)

"+" and "-" allows you to change the number of points generated on a curve.

Hope it helps.

With best regards,
Mirek Czerwiñski
http://kris.top.pl/~kherin/

Share this post


Link to post
Share on other sites
you can use the accumulation buffer to make a motion blur animation. For more information, read the topic "accumulation
buffer" in Redbook (Chapter 10 "FrameBuffer").

If you need sample source codes, you can mail me.

bondi

Share this post


Link to post
Share on other sites