Camera Path
Hi,
How would you create a predefined path for the camera to move on? That may have sounded dumb the way I put it, but I have no idea of any methods used for this. Thanks alot.
Levi
You could use splines. They're basically curves that are fit to a series of waypoints. The curviness can be manipulated in different ways. Here's a fun little page that gives a nice overview:
http://www.cse.unsw.edu.au/~lambert/splines/
-me
http://www.cse.unsw.edu.au/~lambert/splines/
-me
So you would calculate the points on the spline, then have the camera move through them? Is that correct?
Thanks
Levi
Thanks
Levi
Quote:Original post by levjsThere are lots of different ways to do it. For example, you often want to use arc length reparameterization so you can control the speed of the camera more carefully. There are also various issues to consider related to orienting your camera as it moves along the curve.
So you would calculate the points on the spline, then have the camera move through them? Is that correct?
As far as your curve goes, the most basic requirement is to be able to evaluate the position at a given parametric value t. With that, you could do a very simple 'camera follows curve' implementation using gluLookAt() or its equivalent, using the position corresponding to t and the position corresponding to t+h, where h is the step.
Hi,
Thanks for the responses. I know now what I must do, I now need a push(or maybe a big shove) in the right direction. [smile] Are there any tutorials out there on this(I've looked without much success). How I understand it, I mush create a spline, and move the camera along it. What are some equations for creating splines like that? Also, of the spines mentioned in the above link, which would better suit my purpose. Thanks so much.
Levi
[Edited by - levjs on April 18, 2006 11:44:13 AM]
Thanks for the responses. I know now what I must do, I now need a push(or maybe a big shove) in the right direction. [smile] Are there any tutorials out there on this(I've looked without much success). How I understand it, I mush create a spline, and move the camera along it. What are some equations for creating splines like that? Also, of the spines mentioned in the above link, which would better suit my purpose. Thanks so much.
Levi
[Edited by - levjs on April 18, 2006 11:44:13 AM]
http://ibiblio.org/e-notes/Splines/Intro.htm This site has quite alot of useful info ;)
Good luck :)
Good luck :)
Which of those splines should I use to control the camera? I really have no idea what I'm doing here. [smile]
Levi
Levi
Depends on the what kinda movement you want.. You're just moving your camera along the path.. The splines just gives it nice coords for its travels ;)
Rating++ for the helpers. [smile]
Wow, I've done it. With you and the help of some other code in which it was demonstrated, I took it apart, understood it, and wrote my own program. I must say, it wasn't as complicated as I thought it would be.
Can someone explain what tangents and normals to the curve would be useful for....
Now, I know this has no relation to any of it, but can any of you point me to a place that could explain matrix math. Is matrix math supposed to be taught in algebra 1 or 2, or what?, because I didn't get it in Alg1,Alg2, or Geometry. Or is it a more specialized math that you have to pick up yourself?
Thanks so much.
Levi
Wow, I've done it. With you and the help of some other code in which it was demonstrated, I took it apart, understood it, and wrote my own program. I must say, it wasn't as complicated as I thought it would be.
Can someone explain what tangents and normals to the curve would be useful for....
Now, I know this has no relation to any of it, but can any of you point me to a place that could explain matrix math. Is matrix math supposed to be taught in algebra 1 or 2, or what?, because I didn't get it in Alg1,Alg2, or Geometry. Or is it a more specialized math that you have to pick up yourself?
Thanks so much.
Levi
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement