-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Onion skinning #12572
Onion skinning #12572
Conversation
952bea3
to
2e006cd
Compare
This is very nice! |
I need suggestions on how to combine full-scene captures of past/future frames with the current. Rendering past with 50% opacity on top of the current is not good enough since both display as "dimmed". Yhe problem is the background of the captured frame is also overlaid on top of the present time scene. A solution may be to render non-current frames on a transparent background, but that would just remove the plain color. Maybe not too much a problem as long as animated characters are edited in their separate scene. Any better ideas? |
Will this work with 3D? |
Auto keyframe mode would be great
…On Nov 5, 2017 10:44 PM, "Benjamin Stanley" ***@***.***> wrote:
Will this work with 3D?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#12572 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z273PSg2M4B-qGXnY51RsX3Pa9Asaks5szmR7gaJpZM4QO7jW>
.
|
@RandomShaper i think you might have already considered this, but just to be sure, usually past and present are represented by a blue and red tint or (green blue). |
@HeadClot, I think so. @reduz, I'll try. @djrm, that'd be great and colors could be configurable. But I'm not sure yet about the way. The past/future viewport captures could be rendered on top of the viewport with a screen-reading shader that does some kind of comparison. A shader pseudocode proposal would help a lot. Guys, thank you for your feedback. :) |
2e006cd
to
eb148d6
Compare
Dear followers, I've pushed some more progress and updated the original comment. @akien-mga, I need a nice onion icon for the dropdown menu. Where/how can I ask for it? |
@RandomShaper dont worry i will do the icon. |
@djrm, thank you! |
Pictures please :3 |
@HummusSamurai, I'll try. @djrm, I'll need an icon for auto-keyframing as well. I'll try to move all this forward a lot today. Auto-keyframing makes onion skinning more useful so I think it's better to add it to this PR, in separate commit(s). Do you agree? |
a7e1b39
to
eaa15de
Compare
Code and main post updated! Please check. |
552fdc6
to
febffa7
Compare
New update! Getting better... I'd like to ask @reduz and @akien-mga what would they say it's needed before considering this finished. |
would be cool if onion skin had a mode that includes only keyframed poses and not interpolation Does this also work for 2d? |
@blurymind, yes it works for 2D, too. |
febffa7
to
6ec9732
Compare
Oh, and I'll add that feature soon. |
@RandomShaper Thank you! Also thank you for looking into autokeyframe mode. |
6ec9732
to
3db5495
Compare
New update! This is getting pretty interesting, I think. As always, please have a look at the updated description. @djrm, any news about the onion icon? :) |
@RandomShaper its ready will do a PR soon, it will be called |
@@ -202,6 +259,8 @@ class AnimationPlayerEditorPlugin : public EditorPlugin { | |||
virtual bool handles(Object *p_object) const; | |||
virtual void make_visible(bool p_visible); | |||
|
|||
virtual void forward_force_draw_over_viewport(Control *p_overlay) { anim_editor->forward_force_draw_over_viewport(p_overlay); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand this. Should there not be one for 2D and one for 3D?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this use case, I designed the API dimension-agnostic, but I can split it easily into 2D and 3D if you find it to make more sense to plugin writers.
} | ||
} | ||
} | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically, you should be able to call MessageQueue::flush() for this to happen, though make sure that you are not called from this function when doing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it that way because I wasn't sure no unrelated messages that can interfere somehow with the process are in the queue by that point.
Furthermore, this is called during a deferred call to _prepare_onion_layers_2()
so we are already there.
@@ -127,7 +127,7 @@ void SceneTree::remove_from_group(const StringName &p_group, Node *p_node) { | |||
group_map.erase(E); | |||
} | |||
|
|||
void SceneTree::_flush_transform_notifications() { | |||
void SceneTree::flush_transform_notifications() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea, I like it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to read that. :)
It should be fine to merge for 3.0 if it's ready in the coming days :) |
3db5495
to
807bd83
Compare
@RandomShaper the |
@djrm, looks good! |
I think I'm feature-freezing this so it can be merged to 3.0. Key-based steps are pretty hard to implement so they'll have to wait. :( Aside from code reviews and bug fixing, this is all I can do for 3.0. |
@RandomShaper autokeyframe for 3.1 ? :) Also does the differences mode show only onion skin on frames that contain keyframes, or does it also include the tweens? |
Yes, I'll try. In the meantime you could open a feature request so we don't forget. To your other question, it's just a different, les cluttered way of seeing the layers. No stop-at-keys-per-track by now. I studied how it could be done, but it looks pretty hard to do now for 3.0. |
I'll fix the CI errors ASAP. |
- Now it is usable from both `CanvasItem` and `Spatial` editors. - `EditorPlugin` API changes: - `forward_draw_over_canvas()` becomes `forward_draw_over_viewport()`. - `update_canvas()` becomes `update_overlays()`, which now triggers the update of every overlay on top of any 2D or 3D viewports present. Also now it returns the number of such viewports, which is useful whenever you need to know the number of draw-over calls you'll get. - New: `[set/is]_force_draw_over_forwarding_enabled()` to force overlaying regardless it handles the current object type, in a similar fashion as `[set/is]_input_event_forwarding_always_enabled`. This kind of overlay is also on top of those for regular handled node types. - New: `forward_force_draw_over_canvas()`, which is the callback that gets called for plugins that enable forced overlaying.
807bd83
to
98443a5
Compare
98443a5
to
4851240
Compare
4851240
to
d0e09d8
Compare
Builds fixed! @reduz, are you satisfied with my replies to your reviews? Would you like me to change something before merging? |
This allows you to see a ghosted view of the animated stuff a numbers of steps to the past or the future (based on the step value of the animation).
Some commits add some infrastructure to some areas of the engine, needed for this to be implemented on top of them.
It works better if the animated hierarchy is edited in a scene by itself because the background color is used as a hint to differentiate frames.
Closes #10425.
Images
Menu in the animation editor
(Nice onion icon by @djrm)
Sample with 1-step depth, past & future
Sample with 3-step depth, only past, differences only
Current limitations
It is always on (as long as the animation editor is visible). No UI to enable/disable or configure yet.It's very slow because I haven't found yet a way of working with viewport captures on VRAM.Anyway, please test and report or give suggestions.
Spatial transform and bone transform are handled separately so it'd be nice that testers tried on these kind of properties specifically.
Changelog
UPDATED 11/06
UPDATED 11/09
UPDATED 11/13
UPDATED 11/18
UPDATED 11/20
UPDATED 11/20 (2)