Jan_red Posted February 16, 2011 Share Posted February 16, 2011 (edited) Hello all, I'm sorry if this is an easy question but so far I can't seem to figure it out. I am trying to move the camera(or any other object for that matter) along a curve based on a custom speed value. So far I have no idea on how to approach this. Currently I have the camera attached to a curve and I can keyframe the position value. But I would rather use a float value which moves the camera along the curve at a variable speed. So basically how do i get a 0 to 1 value to increment over time at a variable speed. I'm guessing that this must be very simple but so far I'm not able to get it done. Thanks for any help. Edited February 16, 2011 by Jan_red Quote Link to comment Share on other sites More sharing options...
Macha Posted February 16, 2011 Share Posted February 16, 2011 (edited) You just need to scale your position*something_time_dependant. I attached an example with 3 extra parameters: speed, from and to. In this particular instance it moves from frame 1 to 100 at 0.29 speed scale. speed.hip Edited February 16, 2011 by Macha Quote Link to comment Share on other sites More sharing options...
Macha Posted February 16, 2011 Share Posted February 16, 2011 (edited) Also, if you animate manually, have a look at the handles in the channel editor. The slope of handles is the speed. You can even change those by entering a number but I think you can't use expressions on them (?). For a more sophisticated approach, chops might be able to help. I think you can calculate 1st, 2nd and 3rd derivatives there. Edited February 16, 2011 by Macha Quote Link to comment Share on other sites More sharing options...
Jan_red Posted February 16, 2011 Author Share Posted February 16, 2011 Hey Macha, thanks for the reply ! It still isn't working like I would expect. Maybe I'm missing something. The problem now is that I cant change the speed to a lower value than the current speed. Because the object will then travel back along the curve. (Scale value gets smaller and multiplies the result of the fit. which of course leads to a smaller value.) But I think you have given me an idea on how to approach this in CHOPS. If I have: channel1 going from 0 to 1 (curve normalized distance) and warp channel1 based on channel2 (my speed) Then I can sample the position from channel1. If it works I'll upload the file in a couple of minutes. Quote Link to comment Share on other sites More sharing options...
Jan_red Posted February 16, 2011 Author Share Posted February 16, 2011 Jup it worked. i r happy. The wrap node in chops did all the magic. Thanks Macha for the help and pointing me into the right direction ^^ What i did was: create a channel from 0 to 1 wrap that channel with my keyed speed value and sample the position based on the current frame. speed_chops.hipnc Quote Link to comment Share on other sites More sharing options...
anim Posted February 16, 2011 Share Posted February 16, 2011 you can effectively use Area CHOP instead of your Wrap CHOP and channel1 it will calculate distance form your speed (real driven distance not normalized to 0-1 as wrap) Quote Link to comment Share on other sites More sharing options...
Jan_red Posted February 16, 2011 Author Share Posted February 16, 2011 Thanks anim now it also works in reverse ! So I can now also backup the camera at my specified speed! awesome Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.