godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.13k stars 78 forks source link

Improve the animation Bezier editor #3141

Closed reduz closed 1 year ago

reduz commented 3 years ago

Describe the project you are working on

Godot

Describe the problem or limitation you are having in your project

Common user complains about editing animation beziers. More specifically:

Describe the feature / enhancement and how it helps to overcome the problem or limitation

The idea is to overcome both those issues.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

The plan is as follows:

Mock up (editor is kind of broken on Master, but you get the idea):

image

If this enhancement will not be used often, can it be worked around with a few lines of script?

no script can do this.

Is there a reason why this should be core and not an add-on in the asset library?

animation editor is core.

georgesboris commented 3 years ago

Locking tracks is possible on the list to the left thanks to new lock buttons. Only those locked will be selectable (if any is locked)

I wonder if this should be the opposite? As in locked tracks cannot be selected by accident. This is usually how things work on design tools but I'm unsure if it's different on animation tools.

mieldepoche commented 3 years ago

I too would advocate for "locking curves" to mean locking them out of edits (just like nodes in scenes). The "locking" functionality described here is more of a "selectable/editable" state than a locked one so I believe this would have to be either renamed or see its behavior flipped. Blender also uses a locked state for editing curves but it's the opposite: locked curves cannot be edited.

SilencedPerson commented 3 years ago

Locking tracks is possible on the list to the left thanks to new lock buttons. Only those locked will be selectable (if any is locked)

I wonder if this should be the opposite? As in locked tracks cannot be selected by accident. This is usually how things work on design tools but I'm unsure if it's different on animation tools.

I too would advocate for "locking curves" to mean locking them out of edits (just like nodes in scenes). The "locking" functionality described here is more of a "selectable/editable" state than a locked one so I believe this would have to be either renamed or see its behavior flipped. Blender also uses a locked state for editing curves but it's the opposite: locked curves cannot be edited.

as an animator, my initial reaction was pretty much the same, however, i would like to give this approach a try, it seems to me like it could save quite a lot of clicks.

reduz commented 3 years ago

Indeed, I don't see the use case of leaving out a single track. On the contrary when you have lots of tracks, focusing in just a few but keeping the rest as reference is a lot more useful.

Error7Studios commented 3 years ago

Or maybe have 2 buttons, like a DAW.

Mute Solo

When you have 8 tracks, it's faster to Solo a track than to Mute the other 7.

SilencedPerson commented 3 years ago

Indeed, I don't see the use case of leaving out a single track. On the contrary when you have lots of tracks, focusing in just a few but keeping the rest as reference is a lot more useful.

the only thing i would change, is the name from lock to focus to avoid confusion.

reduz commented 3 years ago

@SilencedPerson well its an icon so it does not show a text.. maybe a different icon?

reduz commented 3 years ago

@Error7Studios In a DAW it makes complete sense to solo and mute tracks, here excluding a track does not make sense.

SilencedPerson commented 3 years ago

@SilencedPerson well its an icon so it does not show a text.. maybe a different icon? then i suggest the visibility eye from the scene tree. but only show the full eye and greyed out eye instead of the closed one. I feel like that says "focus" image

TokisanGames commented 3 years ago

I'd like some sort of auto scale, auto fit / find key frames, and separate scales per track features. Usually value ranges have wildly different scales. I click on rotation, then pan and zoom to find values 0-360. Then click on a translation which could be values at 0-1 or 0-2000. When Animating one object, I'm constantly going back and forth between translation and rotation, so there is constant adjustment of the display so I can find the key frames.

Ideally I'd be able to get multiple curves on screen at once and be able to go back and forth to adjust them, meanwhile the scale is silently adjusting on the side. No manual adjustment of the display is needed, once I have it set up. No popping of the display as it automatically changes to view different scales. Instead just a stable display where only the numbers change and the curves stay there unless I change them, or change the window scaling or panning.

So I'd recommend:

Also we desperately need channel mute in the bezier editor. It's very annoying to have to go back to the regular editor to mute, then come back into bezier to adjust.

Solo mode is helpful, especially if you have an animation with 20-30 channels and need to figure out which one is causing the problem. Alternatively an enable /disable all tracks button would work fine. (main editor and bezier)

Other requests

Arrow-x commented 3 years ago

Adding a lattice deform tool will be very useful GUID-9065EB8A-B6AB-426D-B1C4-79E591816BEB

NathanLovato commented 3 years ago

excluding a track does not make sense

It totally does, animators use that. I think it'd be good to get professional game animators in there, or people who worked on the animation editor UX in Blender in the discussion if possible. They'd certainly have lots of insights on the features animators need.

Hiding several tracks and isolating them (hiding unselected tracks) are both useful. It's quite common to work in isolation on a bunch of curves when doing animation cleanup: you might want to work on the transforms of just the legs' or a single arm on a character, etc.

That's similar to solo tracks in DAWs in a sense although it doesn't need to work with a solo button.

Then locking is useful too: you keep the tracks for reference of how the values change, of timing, but you don't want to select and modify them inadvertently. For example when animating a character's tail, to properly animate follow-through. on other segments of the tail.

To me, Blender is an excellent example when it comes to the animation editors: you can select multiple tracks from the left column and either toggle their visibility (leftmost icon), isolate them (shortcuts: H hides selected tracks, Shift H hides unselected as in the rest of Blender, alt H unhides everything), or lock them.

Below, the checkboxes are mute buttons, while you use visiblity to do the equivalent of solo in DAWs.

Screenshot from 2021-08-15 10-29-01

Back when I did animation (I studied 3d character animation for games specifically), I'd get to use all that on pretty much every animation.


So I second the idea of having some way to:

The rest of the proposed improvements and features is great, that's all much needed. Especially the ability to see and manipulate many anim tracks at once.

If you'd like, I'd be happy to get pro game animators in the loop for feedback in general on the animation tools in Godot. I'd be happy to help find them, collect their needs, and report on that (similar to the docs proposal from last year).

I'd also be happy to contribute some code and work on this editor's UX if you'd accept a new contributor there.

LillyByte commented 3 years ago

Bezier curves feel too far disconnected from everything else.

Might wanna look at this old proposal that's been sitting around forever too, where this issue was also discussed:

https://github.com/godotengine/godot-proposals/issues/392

NathanLovato commented 3 years ago

I asked @reduz if we could take care of this proposal at GDQuest and he said ok. So we'll get to work on this in the coming weeks!

TokageItLab commented 3 years ago

This is an explanation of Auto-tangent and Extend handle in some animation applications, which I discussed with @NathanLovato on Contributors Chat before.

I hope to do is to make the Bezier manipulation tool select buttons instead of a pulldown, and put it in the container at the bottom that contains the zoom factor, etc

Also, I wish to add linear mode (which sets the length of tangent lines to zero).

Basically, the animation tool's Bezier editor defaults to linear mode, and from there you can do several operations to create Bezier curves, such as

  • Extend the handle to the right (and make free mode)
  • Extend the handle to the left (and make free mode)
  • Extend the handle to both the left and right (and make mirror or balanced mode)
  • Auto tangent (and make mirror or balanced mode); create tangent lines going to the previous and next keyframes

    "mirror or balanced" means that different applications have different algorithms. After Effects uses balanced mode, which takes into account the distance between the previous and next keyframes, while Cinema4D uses mirror mode, which is based on one of the shorter keyframe distance of the previous and next keyframes. If you are interested, I will explain in detail.

    The current Bezier editor has a problem that doesn't have the ability to easily reset to a preset tangent like above

handle_point

Both behave similarly. However, I personally feel that the one based on Balanced is smoother, because the handle length is equal between keyframes.


In addition, I think that the Linear, Mirror, Balance, and Free attributes should be assigned on keyframes instead of on the control mode. These attributes of keyframes can be used to control the input of values in the inspector. For example, a keyframe with Linear attribute can prohibit the manipulation of handle values. On the other hand, keyframe with Mirror or Balance attributes make it possible to manipulate the value of one handle to update the opposite handle at the same time.


Furthermore, it may need to implement the following shortcuts to constrain manipulation when we are grabbing the handle.

NathanLovato commented 3 years ago

Very clear, thanks. I'll likely make a separate proposal before adding all the above. Making handle mode a property of keyframes is already in progress: https://github.com/godotengine/godot-proposals/issues/3236

Razoric480 commented 2 years ago

Still need #53298 to be merged since I made my branch off of that before I go and make a PR so I don't double any commits/conflicts, then can go through a review process with code cleanup suggestions, but I'm close to done otherwise.

Screenshot_1

Implementation list

Issue not sure how to proceed to fix

The default 150 pixels for the name limit is too small for the bezier editor and you end up with the icons overlapping the track names, but there's no way to change the name limit from outside, so the user has to extend it beforehand. Not sure if changing the default magic number of 150 would be appreciated, but it'd have the least knock-on effects or change of math.

Considerations

Animation software (like blender, maya, etc), when you have multiple keys selected and you move a bezier handle, all of the keys' handles move simultaneously by the relative amount. It wasn't implemented in 3.x, so I didn't put it here, but it could be a feature we'd think about.

TokageItLab commented 2 years ago

Can we close this since https://github.com/godotengine/godot/pull/64647 has been merged? Are there any features still missing?

fire commented 1 year ago

Closing due the request for clarification being from last year.

I encourage future readers to make a new issue or proposal.