• Advertisement
Sign in to follow this  

Camera Path

This topic is 4323 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
So you would calculate the points on the spline, then have the camera move through them? Is that correct?
Thanks
Levi

Share this post


Link to post
Share on other sites
Quote:
Original post by levjs
So you would calculate the points on the spline, then have the camera move through them? Is that correct?
There 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.

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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
http://ibiblio.org/e-notes/Splines/Intro.htm This site has quite alot of useful info ;)

Good luck :)

Share this post


Link to post
Share on other sites
Which of those splines should I use to control the camera? I really have no idea what I'm doing here. [smile]
Levi

Share this post


Link to post
Share on other sites
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 ;)

Share this post


Link to post
Share on other sites
That's what I figured.

I'll see if I can do it now. *skepticly rolls eyes* [smile]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
One more thing. When I have the camera follow the bezier curve, it works fine. However, when I rotate the scene, everything rotates, but I am no longer on the bezier curve, I am on the same path. What can I do to fix this.
Thanks
Levi

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement