How to Get More Accurate AI-Generated Funscripts
Practical tips for more accurate funscripts in HaptiQ: tracking region, presets, frame timing, editor refinement and plugin cleanup.
An automatically generated funscript is a starting point, and how closely it follows the video depends on two things: what the motion analysis could see, and what you do with the script afterwards. HaptiQ builds scripts with a five-stage computer-vision pipeline: video analysis, frame extraction, OpenCV optical-flow motion tracking, funscript generation and post-processing. This guide walks through the settings and tools that have the most influence on the result: the tracking region, frame timing and presets, the timeline editor, and the transform plugins.
Know what the generator measures
Good refinement starts with understanding the input. HaptiQ measures motion between frames. It uses dense optical flow (OpenCV Farneback) between sampled frames, computed on small grayscale frames of 160x120.
How motion becomes a script
- Camera compensation: for each frame pair, a similarity transform covering pan, shake, zoom and roll is fitted to the flow and subtracted, so what remains is the subject's motion.
- Vertical motion: the vertical motion of the clearly moving pixels is integrated into a position.
- Pause gate: when there is no clear motion, the script holds still.
- Drift removal and normalisation: amplitude is normalised over a rolling window of a few seconds.
- Scene cuts: a cut resets the tracker, so motion is never generated across a cut.
- Post-processing: the final stage smooths the motion, limits speed, simplifies points with Ramer-Douglas-Peucker and normalises the range to use the 0-100 scale.
Two practical consequences follow. First, no audio is used, so only visible motion shapes the script. Second, the generator produces the primary stroke script, one axis, so that is the line you will be refining.
VR sources
For VR video, HaptiQ detects the stereo layout (side-by-side or over-under) from the frames with a geometry check, crops to one eye and trims letterbox bars before tracking. You do not need to prepare a single-eye copy yourself.
Frame rate, analysis step and presets
A common assumption is that a higher frame rate in the source file automatically gives a denser script. In HaptiQ, frames are analysed at a fixed time step, not at every source frame. That step is a fraction of the preset's frame interval (the presets use 150, 100 or 66 ms) and it is widened for long videos, whatever the video's own frame rate is.
Timing still comes from your file: action times are taken from the video's own timestamps, and turning points are re-timed between frames. So the things that change how finely motion is sampled are the preset and the length of the video, not the frame rate of the file.
Pick the preset that matches the video
- Gentle
- Normal, the balanced default
- Intense, with higher sensitivity and less smoothing
If a script from the default preset misses small movements, the intense preset is the one that raises sensitivity. If a script looks too busy, remember that intense also applies less smoothing.
Set idle sensitivity
The idle sensitivity control has three settings: Off, Normal and Strict. It decides how readily auto-generation holds still when nothing rhythmic is happening, such as titles, talking, pans and black screens. If your script contains movement during stretches like these, a stricter setting is the place to look.
Very large files
Uploads are accepted as .mp4, .mkv, .avi, .mov and .webm, up to 2 GB per file. For a file over 2 GB, the web app can make a small downscaled copy (480 px, no audio) on your own device and upload that instead. The copy keeps the same frame timestamps, so the script is played against your original file.
ROI selection with the Guided Flow Tracker
Automatic generation looks at the frame as a whole. When you want the analysis to follow one specific area, the Guided Flow Tracker (a Pro feature) lets you choose the region of interest yourself. Tracking then measures optical flow inside that region only.
- Select Video. Choose the video you want to track.
- Set Tracking Point. On a key frame, click the point to follow, then adjust the rectangle around it. This tracking region can be sized between 5 and 50 hundredths of the frame's width and height.
- Track Motion. Tracking runs with live progress.
- Review Results. Review the generated funscript and save it.
Two sliders, tracking sensitivity and smoothing, let you tune the run. Because flow is measured only inside the rectangle, the placement and size of the region decide which motion ends up in the script, so it is worth taking care on the key frame before you start tracking.
Refine the script in the editor
The editor shows the video, a timeline of the script's points, a mini-map of the whole script and a heatmap strip that colours each part of the script by its speed. You can open a generated script there, or import one from a .funscript or .json file.
Find the sections that need work
- Heatmap strip: scan it for parts of the script whose speed stands out from the rest.
- Mini-map: click to jump to a section, or drag to pan.
- Analyze Quality (Tools menu, Pro): produces a report with a 0-100 quality score and a list of findings, each with a suggestion.
The quality report flags five things:
- Dead zones, where the position is unchanged for more than 2 seconds
- Unrealistic speed, faster than 400 position units per second
- Sync gaps of more than 500 ms between points
- Low range, where less than half of the 0-100 range is used
- Low stroke frequency, under 10 strokes a minute
One caveat matters here: the score measures the script's shape, not how well it matches the video. Use it to find structural problems, then judge the match by watching the video in the editor.
Fix points by hand
The editor has four tools: Pointer (select and move points), Draw (click to add a point), Erase (click to delete a point) and Region select. The timeline supports zoom, pan, dragging points and rubber-band selection.
- For one selected point, the property panel lets you edit its time and position and shows its speed to and from its neighbours.
- For several points, the panel shows the count and ranges and lets you apply a batch offset or scale.
- For a selected time region, the region toolbar offers delete, copy, scale, repeat, mirror and applying a plugin to that region only.
Shortcuts that speed up timing work
Space: play or pauseLeft/Right: step one frame back or forwardShift+Left/Right: move the selected points 100 ms earlier or laterCtrl/Cmd+Z: undo+,-and0: zoom in, zoom out and zoom to fitF1: open the full shortcut list
Stepping frame by frame and nudging a selection in 100 ms steps is the most direct way to line up a section that runs early or late. The editor opens in a phone browser too, but the shortcuts need a keyboard, so detailed editing is easier on a computer with a mouse and keyboard.
Plugin cleanup
HaptiQ has 14 transform plugins. Each one takes the script's actions and returns a new list, and outputs stay inside the 0-100 position range. Combined with undo and redo in the editor, this makes it practical to try a setting and step back.
Plugins that help most with cleanup
- Smooth: replaces each position with the average of the positions in a window centred on it. The window size runs from 3 to 20 points, with a default of 5. A wider window gives a calmer line, but stroke tops and bottoms get softer.
- Savitzky-Golay smooth: fits a polynomial over each window, which keeps peaks better than a plain average. Use it when plain smoothing flattens the turning points too much.
- Anti-jerk: removes sudden jerky movements by limiting maximum speed. The default is 200 position units per second.
- Speed limiter: limits the maximum speed between consecutive actions. The default is 300 position units per second, which sits below the 400 that the quality report flags.
- RDP simplify: reduces points with the Ramer-Douglas-Peucker algorithm. A higher epsilon leaves fewer points; the default is 2.0.
- Time shift: shifts every timestamp by a fixed offset. Positive values move the script later, negative values earlier.
- Amplify: scales positions outward from a center point. A factor above 1 expands the range and below 1 contracts it, which addresses a low-range finding.
- Clamp: keeps positions inside a range you set.
Preview before you commit
In the editor's plugin panel, nine plugins run in the browser for an instant preview: smooth, Savitzky-Golay, anti-jerk, amplify, invert, clamp, speed limiter, time shift and RDP simplify. The panel has parameter controls, a preview toggle, a plugin chain that you can add to, reorder and clear, and saved chain presets. If you only need a quick pass, the Post-Processing Filters dialog in the Tools menu offers one-click versions such as Smooth, Anti-Jerk, Speed Limit and Simplify.
To clean up one section without touching the rest, select a time region and apply the plugin to that region.
The Free plan includes three basic plugins: smooth, amplify and time shift. Pro unlocks all 14. You can compare the plans on the pricing page, or create an account to try the editor with a free script.
Check the result against the video
The final test is playback. The Player page loads a video file and a .funscript and plays the script on connected toys, so you can check a script against its video in the browser. The video is opened locally for playback and is not uploaded for this. Playback speed can be lowered to 0.5x or 0.75x, and a loop toggle lets you repeat while you watch.
Keep two kinds of timing correction separate:
- The script is early or late against the video: fix the script itself with time shift or by moving points in the editor.
- The device acts late: this is a sync offset, which HaptiQ keeps per toy. Device Doctor sets it by measuring the lag, so you do not need to alter the script.
Setup details for connecting a toy are on the devices page, and you can browse makers on the brands page. When you are done, export the edited script as a standard .funscript file, which also works with third-party players such as DeoVR, HereSphere, XBVR and ScriptPlayer.
Try HaptiQ
You can try HaptiQ free at haptiq.app. The Free plan gives you 2 free scripts, then 1 free script every month, all on the same pipeline as Pro.
If it earns a place in your setup, Pro is $9.99 a month, or $129.99 once for the 2-Year Pass, which does not renew. Details are on the pricing page.
Frequently asked questions
Does a higher frame rate video produce a more accurate funscript?
Not by itself. HaptiQ analyses frames at a fixed time step set by the preset and widened for long videos, whatever the video's own frame rate, while action times come from the video's own timestamps.
How do I choose the tracking region for a funscript?
Use the Guided Flow Tracker, a Pro feature. On a key frame you click the point to follow and adjust a rectangle around it, and optical flow is then measured inside that region only.
Which plugins should I use to clean up a generated funscript?
Smooth or Savitzky-Golay calm the line, anti-jerk and the speed limiter cap maximum speed, and RDP simplify reduces the number of points. Free accounts get smooth, amplify and time shift, and Pro unlocks all 14 plugins.
What does the HaptiQ quality score measure?
Analyze Quality gives a 0-100 score and flags dead zones, unrealistic speed, sync gaps, low range and low stroke frequency. It measures the script's shape, not how well the script matches the video.
Can I fix timing in only one part of a script?
Yes. Select the points and press Shift with the Left or Right arrow to move them 100 ms earlier or later, or select a time region and apply a plugin to that region only.
Create a free HaptiQ account to generate a funscript from your own video.