-
-
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
Frame by frame animations on AnimationPlayer are a pain to deal with. #12469
Comments
Just a detail:
The UI seems to imply this, but it isn't true. You can use I think the workflow for which it was designed for was that you would make all frames in individual textures, and if you want an atlas for performance, Godot would convert all of them into AtlasTextures automatically on export. But as you say it would miss other AnimationPlayer features like triggering other actions or properties for each frame. But other than that, I never really understood how
But you are still dealing with a timeline, because it's an animation, with frames that you say can be of variable duration, and you even want keyframing. Sounds like you mostly want a new UI, which basically remaps to AnimationPlayer features. |
Personally, I think that, at a given point, we should be able to merge the AnimatedSprite editor within the animation editor. Maybe with a special kind of line in the animation editor. |
But, this kind of defeats the purposes of the AnimatedSprite as I always thought it was for a list of single sprites that could be animated. As Zylann said, the animationplayer with setting h,v rows, then animating the frame number creates this effect. |
You can adjust the animation speed for that player in gdscript using anim_player.play("name", blend, speed) before u call each one ^^ If you check out the gbot tutorial github page he uses that methodology pretty extensively |
Oh... didn't knew about that, I guess thats new? I didn't bother to check again, my bad, sorry about that. Well, that solves that part, it was really needed. Would be cool if that value can be changed in the UI for each animation and also have a preview in the editor. AnimatedSprite has a get_frame() function where you can do much more dynamic animations like continue an attack animation after a certain frame has passed, I'm not very experienced with AnimationPlayer but I think you can do this triggering a function, right? AnimatedSprite already has a UI for that, thats why I was bringing this node, it just need KeyFraming and Sprite node can do the Multiple texture support, so it can be focused only on this type of animations, most of the games on godot are 2d pixel art games or even just frame by frame animated sprites, so having a faster/easier UI would help the workflow, but I guess this UI isn't a priority for the devs right now. I just wish haha. for me I can still use AnimationPlayer because I already know how to use it. but it was confusing at first. |
Should be able to. AnimationPlayer is really powerful with add function tracks, You have a lot of good ideas and I love your enthusiasm! I used to be like that, slowly overtime, using Godot it just becomes part of life. Thing is, you will run into quirks (not saying to put Godot in a bad light, but saying this to show how flexible the engine is), that you can solve by brainstorming and not even delving into the source code. If you give your suggestions/issues some good thought (why your enthusiasm is so important), you will create solutions with built in nodes. This will allow you to finally transcend |
May I ask why this Issue has been closed? Of course it may be possible to rework the AnimatedSprite until it becomes usable for anything more than the utmost rudimentary form of Sprite Animation, but adding a small feature to the AnimationPlayer instead seems far less effort to me: This would essentially be the same as assigning a new duration value to a frame, which is a functionality every frame-by-frame animator needs. As a nice to have, it would be fantastic to have the possibility to set a frame duration for all keyframes within a track, which the Animator then can manually adjust or reset for fine tuning. To set the duration of a keyframe right now, you have to make sure a all keyframes after are properly selected, there is always the danger of miss-clicking or missing one and having to do it all again, and with more complex animations or longer durations a lot of zooming and or scrolling in and out the timeline. It's really tedious and 95% of frame-by-frame animation work. |
haha! I'm apparently still the noob around here. |
@metaphoricalsasquash, AnimatedSprite does support AtlasTextures. You can pack your spritesheet using an external tool like TexturePacker and load each AtlasTexture as an individual frame with an importer plugin That is unless we can use the AnimationPlayer to control an AnimatedSprite... I haven't tried that yet. |
I would like to give this a try, do you know of any import plugins for open source spritesheet packers like the Sprite-Sheet-Packer? All info and tutorials I could find regarding Godot and spritesheet packing were on TexturePacker. |
A few days ago I forked the TexturePacker importer and made a ShoeBox importer plugin. EDIT: the software you mentioned can also export in the pixi.js format so it will work fine. https://github.com/piratesephiroth/shoebox-pixijs-spritesheet-plugin |
I'm not sure a TexturePacker really helps with underlying issues between AnimatedSprite and AnimationPlayer at hand. I'm trying to use AnimatedSprites controlled by AnimationPlayer not even using spritesheets.. but individual, animated .png's. "Only" trying to get it somehow to work since about 40 hours. There is zero documentation for frame-animation. There's a few examples... but none of them go into different animations: Always a single kind of animation. When asking in help not enough people seem to be using this kind of animation as programmers probably just use some cutout sprites and stick to AnimationPlayer. I've set myself some workflow with other applications where I can decently animate something new and simple within 5 minutes or less. And I'm sure I'm not the only one who prefers NOT to directly animate in Godot if a different, more efficient pipeline is already setup. Please... do not enforce people to rigid workflows.. but enable them to use whatever they need. By: Enabling simple use of individual .pngs or Spritesheets in AnimatedSprites.. and letting those be controlled through AnimationPlayer. This is not about "enhacement". In the current state.. it seems impossible to actually use and get anything done. When I try to change the played Animation in AnimationPlayer... the only keyframed Animations played are actually the ones selected in "Animation" property of the AnimatedSprite. Having different animations in AnimatedSprites. Therefore completely has no effect. I am now forced to use a separate "AnimatedSprite" for each kind of animation. However that leads to all animations being shown on screen at once. This cumbersome workflow can't be intended by design: Especially since both AnimatedSprites and AnimationPlayer already have separate tracks for different animation-types... built... in. |
Here are some Ideas I came up with, working with my students in these areas, let me know what you think.
Other than that, I am not sure if a lot more can be made. In Godot 3.1 editing these kind of animations is a lot more visually pleasant already (as frame previews are properly shown). |
Godot is a game engine, not 2d animation software. AntimatedSprite is just a sprite that can accept multiple textures. That's its purpose and It's NOT meant to be used for complex animations by itself alone. Maybe you're complaining about TexturePacker being paid but you have Shoebox and Spritesheet Packer that can do the same sprite packing and are free. |
yeah, ideally we should be able to set the timing directly using frames instead of seconds but it would be already good enough just to have the option to display the time values converted to estimated frames |
@dualmatrix has an open PR for that #22492 |
This looks like a pretty clean solution to me |
I think this might be solved in the master branch now, can anyone confirm? |
Is this a dup of #9340 ? If not, what's the difference? |
The issue you mentioned only requests spritesheet support so it's been closed. |
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine. The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker. If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance! |
(changed the title from "AnimatedSprite, this should be its real purpose." so this issue is focussed on animations)
As a pixel artist, for frame by frame animations I prefer changing the Frames per second (fps) value like in AnimatedSprite or the animation speed with a Duration per frame (milliseconds) value like in Aseprite (even better)
AnimationPlayer is not meant to be used for sprite animations, but it has the amazing keyframing feature, so you have to use it regardless of how painful it is to use for sprite animations.
in other way AnimatedSprite IS meant for frame by frame animation, but its only purpose is for separated texture animations.
AnimatedSprites should be focused only for frame by frame animations and AnimationPlayer for what was made for, cutouts animations and tweening.
This is what I suggest for AnimatedSprites:
Sprite sheet support (all frames in one texture) like how Sprite node does
changing the frame speed individually, this one would only work if the speed is changed by speed rate by frames. ex. 100 miliseconds each frame but you can edit that value for each frame.
AnimatedSprites with the keyframing feature so you're able to keyframe everything like on AnimationPlayer. All the keyframes will act exactly like an animation frame, this is great for moving hitboxes, like in a fighting game changing the hitbox position and size for each frame without any tweening
this way you don't have to deal with the AnimationPlayer timeline, moving keyframes and changing steps and lenght values.
This is an issue I'm sure a lot of people has and I hope this get added in a future stable version. like on 2.1.5
I already opened a issue about this a long time ago but didn't got much attention.
The text was updated successfully, but these errors were encountered: