Advertisement

Smooth camera movement ?

Started by August 11, 2001 12:53 PM
2 comments, last by nookiepl 23 years, 6 months ago
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 ???
Nookienookie@net.is.pl
For a start, interpolate each component. This won''t give you a ''smooth'' path but the motion will be smooth.
Advertisement
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/
With best regards, Mirek Czerwiñski
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

This topic is closed to new replies.

Advertisement