Joysticks in Synfig (Controller Plugin)

@Khemardi thanks for reporting with proper instruction to reproduce the issue.

It occurred because I didn’t consider that the keyframe can be on “1s”, I assumed that it would be on either something like “1f” or “2s 10f”

This is fixed (updated fix for fps issue)
sliderPlugin.zip (5.6 KB)

Has anyone tried switchTemplates, they are useful if your character is drawn as raster graphics. Also, it is not limited to 5 poses, it will create a controller with a switch layer, so you can literally use it to animate anything that you want to switch and have a nice visual guide for it. These features in the plugin can be used for anything, be creativity

1 Like

It creates four slider controller folders and also I don’t see anything to control the object. Maybe I’m doing something wrong?

Nothing is wrong, I have already mentioned

It seems that you have four keyframes
Edit: Sorry, my mistake, if you have 5 keyframes, 4 sliders are created the first keyframe is ignored and considered as the initial pose

It is there but we can’t see it😅, the controller is in white color and your background is also white, change the background color of your canvas or change the color of the “Pointer” Region Layer which is in the “Pointer” group within the “sliderController” groups.

I think I should add a black outline so that it can visible in white backgrounds.

lol, yea maybe add a black outline. Ok so now another issue; the object doesn’t move when I move the slider

Share the files, please.
2 files before running the plugin and after running the plugin.

Also, make sure the waypoints are on all the keyframes (this is compulsory), if you have 5 keyframes there must be 5 waypoints on the keyframes otherwise it will ignore that parameter.

Check this demo

controllerDemo
multiController.sifz (41.0 KB)
A little demo for multiple controller. Not so good face rig (I am so bad at characters design and animation)

Details

Face controller by joystick, a switchTemplate controlled by a joystick, and the circle is controlled by the slider.

You can follow some tutorials like this, and create awesome rigs with the tool

For now, my idea is to take the groups with names and create controllers based on them.

Example,

joysitck_faceRig
switchTemplate_rectangleGroup
slider_circle

If you want to connect multiple layer to one then, you can do something like

joystick_id2_faceRig
joystick_id2_eyes

Or

slider_id3_circle
slider_id3_rectangleColor

Note: This will be the name of group/layer, and the id must be unique irrespective of type of controller you are going to connect.

And nesting wouldn’t be supported, this means that

joystick_faceRig
----> joystick_eyeRig

wouldn’t work. Explained later

I am merging them together, one thing I would want to know from you people is that, do you think that nesting should be supported or is it that important.

Do you need nested support to create controller ?
  • Yes
  • No
  • Doesn’t matter
0 voters

Explained later:
Why?

For example, a user wants a joystick and slider for items within a group,

So joystick needs 5 waypoints on any animated parameter, otherwise it will ignore them, and the slider needs all waypoints on the keyframes, but sometimes it may be a thing that the user wants to control an item with slider and joystick at the same time, this is completely possible to do by animating and re-running the plugin more than once. But if the user wants to do everything at the same time (create joystick and slider, there isn’t enough information to decide what the user wants).

So let’s say that the user has the following group:

joystick_faceRig
--->joystick_eyeRig

So they need two joysticks one to control the faceRig and eyeRig, one thing I can think of a solution is to ignore the groups which are children (at any inner level of the parent) of the group which has a prefix of “joystick_” and then later construct the joysticks. So basically create the joystick for parents first and go in and create for children.

This solution will work for joysticks, but now let’s think for a case in which,

joystick_faceRig
---->joystick_eyeRig
-------->slider_eye

Let’s assume that the slider_eye is a slider that will control the color of the eye, of course, the slider_eye layer will have waypoints on keyframe (keyframes can be anywhere), so when constructing joysick_eyeRig, ignoring the content of slider_eye would be a good choice, we will leave them undisturbed and later connect them to a slider. But just think that users also have animated the slider_eye position (origin parameter) and they want to control it by joystick, that’s why it is in joystick_eyeRig, so now we have uncertainty to decide what waypoint user wants to be controlled by the slider and what waypoints the user wants to be controlled by the joystick. Even if we apply any solution users may require to run the plugin more than once, and running the plugin more than once also feels easier for the user.

Another solution can be to give an order of priority for controller example,

1. joystick
2. slider

So now joystick is always given more priority, it may suppress slider, or vice versa if the order is different. This seems easy to understand and implement too. But not always a good choice.

Another way is to force users to put everything on keyframes (or continuous frames), and we can get what waypoints to consider based on what keyframe a waypoint is this would also be easy.

So if they have nested

joystick_faceRig
---->joystick_eyeRig
-------->slider_eye

Then anything that would be connected to joystick_faceRig will be on the first 5 keyframes (or frames) and then anything that they want to connect to joystick_eyeRig will be on the next 5 keyframes (or frames) and anything that they want to connect to the slider would be on next keyframes,
so

joystick_faceRig = 1-5
joystick_eyeRig = 6-10
slider_eye = 11-n (n because this is how slider's work, generated based on number of keyframes)

we can work around for slider, to limit it to certain keyframes by taking group names like slider_2_eye, so this means that in the previous example it would be 11-13 keyframes used to connect to the slider. I think this solution is good for me, also for users, it’s predictable and understandable to expect the proper result, the only thing is that the user needs to create or make sure that waypoints are in the proper position based on keyframes (or frames).

What do you think must be done? Suggest me any other ways or better ideas to implement them.

3 Likes

Okay, so only 2 people voted (+ 1 me). And they have chosen doesn’t matter. But I think it would be good to implement the last approach

So now hopefully any plugins don’t cause any issue anymore. You can try them and get them individually for now. I am currently back to animating and there would be no improvements for this plugin for a while (you can improve it if you would like to). Try plugins and report issues.

5 Likes

@veermetri05 It would be nice to put link to the final plugin to the top post, so it can be easier to find.

Again, it would be awesome if you submit a PR to include the plugin into main Synfig repo. The fixes can be added later, if any. :slight_smile:

3 Likes

It’s been more than a year :astonished:,

Unfortunately I have lost the latest version of Joystick plugin where one can interpolate color values. Maybe I need to implement it again :slightly_smiling_face:, also I will implement a way for generating more controllers based on name of Group Layer, and submit a PR so that this code will be merged to Synfig. And it would be good to discuss this on Github than Forums.

Sorry for reviving this topic now, I will try to contribute more consistently :sweat_smile: .

4 Likes

animation
character.sifz (35.6 KB)

Plugin: joystickPlugin.zip (4.3 KB)

  • Added Color interpolation
  • The Controller’s origin is just a vector than a Composite vector (this allows user to link to spline the controller, etc)
8 Likes

You might need an updated documentation and place it somewhere new and old users can easily find it without having to scroll or do much searching. Especially since you’ll continue to update it. Nice work as usual :slight_smile:

5 Likes

Plugin Update

  • Create multiple controllers
  • Bind to existing controller

Plugin: joystickPlugin.zip (4.6 KB)

To create multiple controllers, just rename the groups with following format

joystick_name

Examples:

joystick_eyes
joystick_head

It will create a controller with name eyes and head.

To bind to already existing controller, just rename group in the same format above with existing controller names (ex- joystick_eyes this will bind to eyes controller) .

@Khemardi , thanks for your kind words. I will start to write a detailed documentation on Synfig docs, once submitted to official Synfig repo.

Todo
3 Likes

Plugin Update

  • Unbind Joysticks

Plugin: joystickPlugin.zip (6.1 KB)

To unbind rename the group with following format:

joystick_unbind_name

Examples:

joystick_unbind_head
joystick_unbind_eyes

Note: Unbinding does not delete the controller or exported values, you can do it manually

I haven’t thoroughly tested this feature yet. Try this out and report any issues you find.

ToDo

For now support for exported values is not a requirement and shouldn’t be feature creep, if it is required will add it later.

3 Likes

I’ve started testing. Working from the very basics right up to anything weird I can think of. Of course there are things that I know will never work and that are beyond the capabilities of this plugin but it’s fun just testing, just the same:

3 Likes

I haven’t finished testing, but based on what i’ve seen so far and what the plugin promises, I think it’s good enough to be used in production. One concern I have though and I think I vaguely remember you bringing it up? Is the name. I don’t remember the entire convo but is it legal to use the same name for the plugin as the one it’s based on in After Effects? I’m asking cause I really don’t know

1 Like

@Khemardi , great work on testing the plugin. I would like to thank you :heart: for giving your time to test the plugin. Great you attached the your test cases, it would be beneficial if you also share the spreadsheet too.

BTW, The plugin doesn’t consider bones for animating, if it is a requirement am happy :slightly_smiling_face: to implement it. For now it only supports vector, real, angle, color.

I am not a legal advisor but we shouldn’t use the exact name, we can’t use Joysticks and Sliders, but just using the Joystick as a concept wouldn’t cause any problem. People can copyright a product and name, not an idea. Moreover Joystick is just a device…:nerd_face:

The name of my plugin is Controller Plugin, it is used to create Joystick, Sliders, Switch Templates. It is all okay to use these names because they are just basic concepts.

I feel like @BobSynfig , is the right person too seek some advice in this discussion.

I don’t think that there is any problem for such a generic name :wink:

I forgot that the plugin is actually called ‘controller plugin’ I’ve been using the term ‘joystick’ for so long that it slipped my mind, lol.

I don’t think it’s necessary to consider bones, vector, real, angle and colour are just fine. I already knew it didn’t support bones, but decided to test anyway as I’m testing broadly. Although speaking of bones we do need IK support @BobSynfig :upside_down_face:

I’ll attached the spreadsheet. It doesn’t have all my test cases as yet, will update soon.

1 Like

Got it working… Yep… Did not rename the group layer with the ‘joystick_’ prefix, but the object within. :blush: