RE: [Algorithms] Smooth movement of camera along a path
Brought to you by:
vexxed72
From: Peter W. <Pet...@vi...> - 2000-08-02 05:31:58
|
I've done a couple of similar systems, and I've found the problem to be deceptively tricky, a few things I ran across that weren't obvious to me when I started; -Whatever spline you pick to move the camera's position, you'll need to be aware that changing the parameter to the spline isn't proportional to distance along the spline, eg a u parameter of 0.5 may correspond to a point that's only 0.25 of the total distance along the spline. This means that some compensation will be needed if you want the camera to move at a constant speed, or to accelerate and decelerate under your control. One solution I used was to sample the spline at many points, and construct a series of (very small) straight lines to represent the spline. This let me do distance calculations and get smooth movement, at the cost of being a bit inelegant. Advanced Animation and Rendering Techniques, Watt&Watt, 15.3.2 has a good discussion of this, and some other ways of solving the problem. -Splines will solve the movement problem, but not necessarily the orientation one. Interpolation between orientations is a big subject, and took a lot more time than I expected! -It's not just a maths problem, there's a lot of quirky human stuff that needs to taken into account to get a camera moving in a way that people will like. A good example of this is interpolating orientations, it's very easy to end up with interpolated orientations that are tilted in uncomfortable ways. Having been a wet blanket with all this, I would say on the positive side that adding extra keyframes so you aren't putting too much strain on the interpolation code solves a lot of the problems, and most others can be solved by working around them. AA&RT, Watt and Watt, is an excellent source for info on the subject. Peter Warden > -----Original Message----- > From: Mark Wilczynski [mailto:mwi...@cy...] > Sent: Monday, July 31, 2000 11:04 PM > To: gda...@li... > Subject: [Algorithms] Smooth movement of camera along a path > > > I'm trying to write a fly-by sequence (similar to the Unreal > intro) for my 3d engine. Can anyone tell me how to smoothly > move the camera along a set of predefined 3d points? > Ideally, I would like a system where I manually move the > camera around the environment and record keyframes at > certain positions/orientations. Then I would like the > system to automatically move the camera along a path > interpolated from these keyframes. I'm guessing I need some > sort of spline or other curve to do the job? > > -Mark > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |