Speed control? 2004-08-15 - By Stephen Schick
Back I'm stumped, and and any [advice/help/ideas/amusing anecdotes] would be greatly appreciated!
I am attempting to animate a null along a path via a speed control.
There appear to be 2 options:
1. Work with deltas - for any time change, calculate the distance change and add this to the current distance. 2. Calculate the whole distance travelled on any time change.
The problem with the delta solution is that any skipped frames, due to scrubbing or jumping from frame-to-frame, will invalidate the calculation. In our case, the speed control can be animated, and thus I need to be able to determine the distance the null has travelled at any arbitrary frame.
So far I am using a scripted operator which sums the change in distance for each frame up to the current frame, but needless to say this gets cripplingly slow as the current frame gets further from the start frame:
-- ---- ----- currentFrame = In_UpdateContext.CurrentFrame startFrame = GetValue( "PlayControl.In") set speedo = activesceneroot.FindChild( "Speedo" ) for i = startFrame to currentFrame set speed = speedo.EvaluateAt(i) ''' rotx of Speedo = units/sec speedsum = speedsum + speed.rotx.Value next Out.Value = speedsum -- ---- -----
This doesn't seem revolutionary, so I'm hoping someone might have tried something similar before...
Thanks in advance!
Stephen.
-- I was never able to finish anything, but now -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- Stephen Schick sschick@(protected) TD / 10th Level Grin Master T: 604.714.2600 x2133 Mainframe Entertainment F: 604.714.2641 200 - 2025 W. Broadway, Vancouver, BC V6J 1Z6
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|