[OFS] [MTFG] Most efficient way to rebase a portion of script?

Hi guys,

Hope you’re all well!

I’m new to scripting and had a question regarding the most efficient way to rebase a portion of a script?

I’m using Motion Tracking Funscript Generator (MTFG) in OFS to help create some initial anchor points to work with. I then go through and adjust / clean up as necessary.

One thing I’m struggling with is the “drift” due to gradual loss of tracking. For example, during a cowgirl scene, the peaks/troughs often start to drift upwards. At the start of the tracking, the troughs are set at 0, but by the end of the video segment, the troughs have increased to say 50, even though it should be 0.

A very simplified example is shown below (left), though please note it’s not a linear drift as shown here.

In this example, I want to essentially anchor the bottom anchor points to 0, but keep the magnitude of each slope (right).

The way I’m currently approaching this is by:

  1. Select all bottom
  2. Move to 0 - This obviously messes with the magnitude of each movement
  3. Fixing the tops using a combination of “Scale - by MIN MAX” in My Tools and manual adjustments

The above doesn’t seem very efficient, so I was wondering if there’s a better way?

Any input would be greatly appreciated.

Thanks in advance! :slight_smile:

I would personally use Util’s “select_plus_next” with a keybinding (I’ve set mine to T).
For additional context, I’ve set Deselect All to the keybind CTRL+D.

I’d navigate to the first top point and repeat this sequence:
T+T to select the right slope, Shift+Arrow Down until the bottom point is at 0, CTRL+D to deselect, Up Arrow to go to the next top point. Repeat until all points are adjusted.

I think that is a flaw of OFS that you can’t set value with a numeric key of multiple points. Like you select all your bottom points if you press 0 that should set all the points you’ve selected to 0 but no it’s say focus on the point where your timeline is.

You can do that with extensions. Util has its “PosChange” feature to set all selected points to a specific value.
Even without extensions, using Shift+Arrow keys allows you to set all selected points to the same value by pushing them to 0 or 100 and then shifting them all to your desired value.

That’s not a solution to the generic problem presented in this topic.

Thanks a lot for your input. I’ll take a look into that extension and see if what you outlined makes sense to me / solves my issue.

Yeah, that was the behavior I was expecting when using my workaround (step 2 in my list), so I was surprised when it didn’t. I’m doing what Rose outlined instead, i.e. shift the selection down/up as necessary to get them to an equal baseline, and adjusting from there as necessary.

Let me know if you need further clarification about my workflow, I could screen record my method with on-screen key inputs.
If you do want that, feel free to include a funscript you’d want to see it done to.

I know all that already thanks.
Never pretend to bring a solution to the OP.
I think it is so stupid to have to require a third party tool to execute a command that seems so basic to me, all the software I use with a timeline you can set the value of multiple keyframe if you select them. The shift + up and down arrows can be usefull if you want to adjust a portion of your script but why can’t you bring all the points you’ve selected to the bottom if you press 0 instead of the one point where your timeline is. In all the softwares if you execute a selection you’re just saying to the software “Hey this is the part I want to work on”

Just worked out how to reply to multiple in a single comment :sweat_smile:

Very kind of you, thank you. Will see how I get on!

Whilst I do agree that that functionality should be built in, and shouldn’t require a third party plugin, I see it as a bug that was never addressed.

It’s open source software and the author worked on it for 1.5 - 2 years with minimal contributions from others (7 contributors in total, but it’s pretty much been solo developed from what I can see). I’m sure there were a ton of things to work on / fix, so I’m not surprised the issue never got resolved. I’m very much appreciative of what’s been provided, and for free.

On a sidenote, I just noticed that the code repository for this has been archived (a long time ago), so I guess no more updates!

Another solution if you need to adjust a lot of points that drift about the same amount. If you have a good idea of how much the drift is, you could adjust the series of points using a Function from the My Tools extension you’re using.
For your example,

  1. Highlight the three waves (Except! the last point. My Tools likes to manipulate selected points and one extra after.)
  2. Get Period
  3. Set to Triangular since its a linear drift
  4. x2 period since we just want the one side of the triangle
  5. Amplitude 30, Set to Subtractive
  6. Apply

Thanks a lot for your suggestion! I should have clarified in my original post, but unfortunately the drift is completely unpredictable, as it’s due to gradual loss of tracking.

Thanks again for your input though! :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.