Giter VIP home page Giter VIP logo

funscripting's Introduction

Funscripting Blender Addon

Funscripting is an addon for Blender to 'script' Launch movements for a video. With this addon you can create your own scripts (in Funscript format) that can be played back by Launchcontrol.

Blender is a very powerful free and open-source 3D editor suite, that comes with a video editor. Scrubbing through a video is very fast and easy.

The addon consists of a panel for the Sequencer with percentage buttons representing Launch positions. Each button inserts the corresponding value into a custom property on the selected strip and marks it as a keyframe. The export button will save this as a Funscript file that can be played back using Launchcontrol.

Installation

  1. Download and install Blender
  2. Download funscripting.zip from the releases page
  3. Start Blender
  4. Open User Preferences (Ctrl+Alt+U)
  5. Click the Add-ons tab
  6. Click Install from File.
  7. Select the downloaded funscripting.zip
  8. Mark the checkbox of Funscripting Addon
  9. Click Save User Settings to auto enable the addon on next startup

If the above steps are not clear, this stackexchange answer explains the process with screenshots.

Usage

Don't Panic. Blender can be very overwhelming but you don't need to know what everything does in order to create a Funscript :)

Switch to video editing layout

Switch to the Video Editing layout by pressing the button on the top of the screen: Select Layout

Import a movie file

Click on the add menu button in the Sequencer: Add

Select Movie. Browse to your movie file and open it: Movie

Select only the video strip by right-clicking on it. (So when you see two strips, the top one represents the audio and bottom video.): Select Strip

Script movie

Search the start position by left-clicking in the Sequence window and/or using the arrow keys on your keyboard. Then press one of the position number in the Funscript panel: Seek Position

Search for the end of the move in the video and press the corresponding position number in the Funscript panel: Insert Position

To halt movement simply choose the same position as before to keep at that position for the time selected (eg frame 10=50% and 80=50% then for 70 frames the Launch will stay at position 50%.)

Repeat the above steps until you are done scripting. Remember that you can save your Blender project so you don't need to script everything at once ;-)

Export Funscript

When you are done scripting, save the result as a Funscript by pressing the Export as Funscript button. Choose a name and location and confirm. Export Funscript

Playback

Move the file next to a movie and make sure it has the .funscript file extension. Use Kodi or VLC with a Launchcontrol plugin to play. Here is a short demo video.

Shortcuts

The following keyboard shortcuts are registered (focus must be on the Video Sequencer Editor):

  • 0-9, Numpad 0-9 : Insert position at 0% - 90% at current frame.
  • -, Numpad period : Insert position at 100% at current frame.
  • ` : Insert a copy of the previous stroke at current frame.
  • = : Fill up until the current frame with copies of the previous stroke.
  • , : Insert a position with the same length as the last one on the current frame.
  • . : Insert a position with the shortest valid length (slowest) on the current frame.
  • / : Insert a position with the longest valid length (fastest) on the current frame.

Hint label descriptions

In the funscripting panel there are a couple of hints displayed. These are just helpful hints, so feel free to ignore when you feel that's appropriate.

  • Previous: The position of the previous action.
  • Interval: Time in ms since the previous action, icons:
    • Warning triangle: too soon, there is not enough time to technically send the action.
    • Green check-mark: sweet spot, the previous action will transition into this one.
    • Clock: there will be a 'pause' in the script, since the previous action has already finished.
  • Slowest: The amount of distance to get the slowest move possible for the current frame.
  • Fastest: The amount of distance to get the fastest move possible for the current frame.

The distance calculation for fastest and slowest is currently using Launchcontrol's 20-80 speed limits rules.

Example

If previous position was 20, and the slowest hint gives 10. Inserting either 10 or 30 will result in the slowest move in the specified direction.

Tips

Generic Blender things:

  • The key g is the shortcut for grab, to move stuff around, while moving stuff around press x or y to lock horizontal or vertical axis (handy if you want to increase some values)
  • With the mouse in the graph editor the keys [ and ] will select all keyframes (inserted points) before or after the current frame
  • With the mouse in the graph editor the b key will allow you to drag a box to select stuff
  • Up arrow and Down arrow will move between keyframes (inserted points)

When scripting, keep in mind that the Launch can only move up and down. That means the next position is relative to the previous one. This works great for penetration moves, but get tricky when you try to script moments like touching and licking. Then end and begin position do not necessarily match. This can also happen if there are hard cuts in the movie. So you need to be creative when scripting that :-)

Keep the speed limitations in mind. Currently the slowest speed we can safely use is ~900ms for a full stroke (all the way up or down). Trying to strip something slower will be sped up to match this speed. The same goes for very fast movements which is quoting the back of the box "180 strokes/min", which is 3 per second (but that is for strokes of about 20% movement.)

funscripting's People

Contributors

funjack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

funscripting's Issues

Flip input positions

Flip input positions, so 100 it at the top and 0 at the bottom. The current input positions layout is confusing some users about what 0 and 100 mean.

Also add "up" and "down" to the 0 and 100 buttons.

Normalize funscript values for selected keyframes

As a scripter I want to normalize the values of a set of keyframes, so I can even out the stroke length in a given time period.

We could normalize a given set of keyframes. This can be helpful when some strokes were generated from motion tracking but you want the lengths to be equal.

Blender 2.80

Are there any plans on updating the plugin for Blender 2.80?

It says "upgrade to 2.8x required"
image

Invert funscript values for selected keyframes

A scripter want to invert a selection of values so he can insert an up/down value and adjust already inserted strokes.

From: https://milovana.com/forum/viewtopic.php?f=25&t=20324

So for example, I'll be editing a CH video with up/down on the beats and realize somewhere that I screwed it up and missed a beat. I can't just add a single beat, since it''l be at the same value as the one after it and will create a pause. What I actually need to do is insert a beat, and invert the values of all subsequent beats so 0s become 100s or 10s become 90s, for example.

For all selected keyframe invert the funscript value: 0->100, 100->0.

Live funscript test, feature request

Hello Funjack
I just wanted to ask, if there is a possibility to directly connect the fleshlight launch device to the blender addon? So that you can see the movements live / in real time.
Greetings Clasher

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.