It looks like one option is to setup and animate my scene, add it to the Dope sheet, and bake the object. This works, putting a keyframe on every frame and removing the xpresso. However, I'd much prefer an option that remains editable.
Posts made by ticket-spite
-
RE: Align to Spline using real-world speed
-
Align to Spline using real-world speed
I’m attempting to make an improved align to spline xpresso setup that allows me to set a real-world speed of an object that follows a spline.
In the simplest use-case (with arbitrary numbers for a clearer explanation), I created a spline along a road object. I also have a car object in a null. Instead of using the standard align to spline, I’d like to keyframe the speed of my car object (as it moves along the spline) from 0 cm/second to 1600 cm/second over the first 2 seconds. I then want it to stay at that speed until 6 seconds, when it slows to 250 cm/second during a turn, then accelerates back to 1600 cm/second. Then at 12 seconds, it begins to decelerate to 0 cm/s over the next 2 seconds.
I managed to make this happen in Xpresso with a node structure that takes a starting point along the spline (set via user data), an initial speed (set via user data), calculates the per-frame movement necessary with that speed, identifies the current position of null, and then calculates and sets the new position of the null. This works as I had hoped, however, it only works when playing forward. If the timeline is scrubbed or you move back a frame, it breaks.
I also built a rig in which the initial speed, acceleration, max speed, start time of deceleration, and rate of deceleration were manually entered. This was vastly more complicated both to build and use. What’s more, it only allowed for a single acceleration and deceleration. However, because acceleration, max speed, and deceleration were defined, the position at any given point could be calculated as a function. This allowed me to set that position independent of playback direction, which allowed easy, reliable scrubbing.
Is there a way to make my rig which uses only speed work independent of playback? I’m attaching that rig below.