Cubic Interpolation for an Automated Camera
I always wanted one of those neat cameras that seems to move along some imaginary, complex, curvy path in one of my programs. But, I never knew how to implement it. I was doing some MD2 code at the time, so I looked on gamedev and found and article about irregularly spaced keyframes and using interpolations other than linear, which I believe is what most use for frame interpolation. When I thought about that article, I figured that maybe I can use a set of points for a camera and use cubic interpolation, one of the types I learned from the article, to move the camera along the points. I would also have a set of control points that would act as the camera''s direction.
After all this typing I almost forgot my question :-). What sort of methods do you use or suggest to control an automatic camera? I read some stuff about beizer and spline curves, but it all seemed too uncertain since the curve only goes through the first and last points. Piecewise bezier curves also seemed interesting because it gives you more control over each ''curve'' in the curve, but I''m not completely sure about how I would go about implementing it.
Any suggestions?
Check out my raytracer at http://simp-raytracer.sourceforge.net. Download it at http://www.sourceforge.net/projects/simp-raytracer.
Maybe I wasn''t clear with my question. What methods do you use for independently moving cameras? Cubic interpolation, Bézier curves, spline curves?
Check out my raytracer at http://simp-raytracer.sourceforge.net. Download it at http://www.sourceforge.net/projects/simp-raytracer.
It depends on what you require for your particular camera. Obviously if you want a perfectly smooth motion then go for B-Spline as it has C2 continuity.
You could also implement another curve for the focus point that runs alongside the camera curve. You could then create some cool camera movements that focus on certain parts of your environment as you move along the curves.
I''m sure bezier would be fine if you made sure there weren''t any knots that could create ''jerks'' in the movement or rotation of the camera.
You could also implement another curve for the focus point that runs alongside the camera curve. You could then create some cool camera movements that focus on certain parts of your environment as you move along the curves.
I''m sure bezier would be fine if you made sure there weren''t any knots that could create ''jerks'' in the movement or rotation of the camera.
--- Hybrid ---
yeah I was going to use just a set of 4-point Bezier curves so I''d have control of each part. you can make each curve continuous to the next too as long as the 3rd and 4th points are parallel to the 1st and 2nd points of the next curve.
Check out my raytracer at http://simp-raytracer.sourceforge.net. Download it at http://www.sourceforge.net/projects/simp-raytracer.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement