Godot: Onion skinning for AnimationPlayer

Created on 18 Aug 2017  Â·  14Comments  Â·  Source: godotengine/godot

I want to propose a feature for animation player that allows onion skinning.
The reason for this is to properly position my 2d sprites to get that flawless animation.

feature proposal editor

Most helpful comment

I'm working on this. The first implementation will be simple yet useful.

All 14 comments

I'm not familiar with that concept. Could you elaborate, please?

@RandomShaper

thanks @YeldhamDev , that's it.
I want this cause my sprites are not all in the right position, so trying to fix them by switching between keyframes gets tedious. At times I put put my finger on the screen to find where the next sprite should be,
Having a "ghost" of the last keyframe will help greatly.

I thought about doing something like this by doing a viewport capture and
blending previous frames with decreasing transparency.. but not quite sure
what the best way would be

On Sat, Aug 19, 2017 at 2:55 AM, genaside notifications@github.com wrote:

thanks @YeldhamDev https://github.com/yeldhamdev , that's it.
I want this cause my sprites are not all in the right position, so trying
to fix them by switching between keyframes gets tedious. At times I put put
my finger on the screen to find where the next sprite should be,
Having a "ghost" of the last keyframe will help greatly.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/10425#issuecomment-323503064,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z2-QwyeeFr14NX_Mua6qoO7M5R7pwks5sZnjKgaJpZM4O7-b_
.

if you guys can discuss a good implementation idea, i have noted for 3.1 to
do a lot of improvements for animation code so it might go well there

On Sat, Aug 19, 2017 at 8:47 AM, Juan Linietsky reduzio@gmail.com wrote:

I thought about doing something like this by doing a viewport capture and
blending previous frames with decreasing transparency.. but not quite sure
what the best way would be

On Sat, Aug 19, 2017 at 2:55 AM, genaside notifications@github.com
wrote:

thanks @YeldhamDev https://github.com/yeldhamdev , that's it.
I want this cause my sprites are not all in the right position, so trying
to fix them by switching between keyframes gets tedious. At times I put put
my finger on the screen to find where the next sprite should be,
Having a "ghost" of the last keyframe will help greatly.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/10425#issuecomment-323503064,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z2-QwyeeFr14NX_Mua6qoO7M5R7pwks5sZnjKgaJpZM4O7-b_
.

It would be cool when this gets implemented, to have an option to allow for the faded frames to remain in the same position where the main sprite was. Words may betray me to describe this, but the closest thing I can remember right now would be Ryu from Street Fighter series, when he is doing his combos, a silhouette of him is shown in different frames while moving, his silhouette remains in the old position.

sfa3metsushoryuken

If you use Krita for animations, you'll know what I am taking about. You can set how far the "skinning" goes and what color+opacity of the layers.

To be honest just one layer(previous) with a 50% opacity under the current keyframe will do. :)
but, if you want to take it far, by all means

Ah yeah, krita's onion skinning system is fantastic, getting that in godot would be great!

I'm working on this. The first implementation will be simple yet useful.

Just an update. I've been doing a log of R&D and now I believe I'm on the right track. I expect to be releasing some results very soon!

I'll submit a WIP PR as soon as possible so @reduz and others can assess.

https://docs.krita.org/Animation#Expanding_upon_your_rough_walkcycle
krita has nice onion skinning shows previous and next frames.

image

My suggestion was to use the new viewport API to capture frames, then
overlay them

On Mon, Oct 30, 2017 at 9:39 PM, volzhs notifications@github.com wrote:

https://docs.krita.org/Animation#Expanding_upon_your_rough_walkcycle
krita has nice onion skinning shows previous and next frames.

[image: image]
https://user-images.githubusercontent.com/8281454/32202345-60087ba0-be1f-11e7-9b68-e2c32b500a22.png

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/10425#issuecomment-340625834,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z273CK1dl2Nh0Vap-CLStkR7GKm1lks5sxmxfgaJpZM4O7-b_
.

That's what I'm trying, but I can't find a good way to capture frames. I can create a copy of the ViewportTexture, but I'm doing so by getting the image data and creating a new texture from it. Needless to say that's painfully slow.

How can I copy a texture from VRAM to VRAM?

Regarding overlaying, I've extended the EditorPlugin API to allow overlaying on top of 3D viewports as well.

I think I'm pretty close to success! :)

I've submit a WIP PR for this: #12572.

Was this page helpful?
0 / 5 - 0 ratings