You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto Slice regions on an AtlasTexture should be selectable as animation frames, or Auto Slice in SpriteFrames should match AtlasTexture region slicing
#12799
Like many people I've been trying to set up 2D sprite animations using the Sprite2D/AnimationPlayer combo. Using sprite sheets with variable sized sprites (different thicknesses to pack in more frames) is a pain however because Godot doesn't seem to have a solid way to automatically add these frames unless they are all separate images, which is a cluttered mess.
I found recently that the AtlasTexture attached to a Sprite2D has an option for editing the region that's displayed, and this region editor has a drop-down selection for Auto Slice. This perfectly identifies and separates the sprites on the sheet I'm using (albeit with slight frame height differences, I can fix that manually). I'm able to, with considerable effort, select each individual region and keyframe it to animate from the sprite sheet using AnimationPlayer as well. This requires about 6-8 clicks and a lot of mouse movement to add a single keyframe. I can alternatively space out each frame of the sheet to match the largest frame of animation, but that would make an enormous texture. Separate textures are also possible, but I'd prefer the cleanliness of a single sprite sheet.
However, if each sprite can be automatically and accurately sliced, they should be selectable in a manner that makes keyframing animation through the AnimationPlayer easy.
There's a SpriteFrames property which can be added to an AnimatedSprite2D which allows importing frames from a sprite sheet, but the Auto Slice button there assumes same sized frame animations across the entire sprite sheet. This interface allows you to select individual frames in whatever order you please, but obviously if the grid doesn't match the animation frames universally, the output will be garbage.
What needs to happen is the AtlasTexture region slicing needs to be usable in a cutout library of some kind, and those slices should be usable on a timeline in an AnimationPlayer track. I've heard that an atlas can also be imported with an accompanying JSON file that specifies tile data. If the AtlasTexture region auto slicer can properly identify all those frames, perhaps it can also allow saving a JSON file to import elsewhere? >P
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Like many people I've been trying to set up 2D sprite animations using the Sprite2D/AnimationPlayer combo. Using sprite sheets with variable sized sprites (different thicknesses to pack in more frames) is a pain however because Godot doesn't seem to have a solid way to automatically add these frames unless they are all separate images, which is a cluttered mess.
I found recently that the AtlasTexture attached to a Sprite2D has an option for editing the region that's displayed, and this region editor has a drop-down selection for Auto Slice. This perfectly identifies and separates the sprites on the sheet I'm using (albeit with slight frame height differences, I can fix that manually). I'm able to, with considerable effort, select each individual region and keyframe it to animate from the sprite sheet using AnimationPlayer as well. This requires about 6-8 clicks and a lot of mouse movement to add a single keyframe. I can alternatively space out each frame of the sheet to match the largest frame of animation, but that would make an enormous texture. Separate textures are also possible, but I'd prefer the cleanliness of a single sprite sheet.
However, if each sprite can be automatically and accurately sliced, they should be selectable in a manner that makes keyframing animation through the AnimationPlayer easy.
There's a SpriteFrames property which can be added to an AnimatedSprite2D which allows importing frames from a sprite sheet, but the Auto Slice button there assumes same sized frame animations across the entire sprite sheet. This interface allows you to select individual frames in whatever order you please, but obviously if the grid doesn't match the animation frames universally, the output will be garbage.
What needs to happen is the AtlasTexture region slicing needs to be usable in a cutout library of some kind, and those slices should be usable on a timeline in an AnimationPlayer track. I've heard that an atlas can also be imported with an accompanying JSON file that specifies tile data. If the AtlasTexture region auto slicer can properly identify all those frames, perhaps it can also allow saving a JSON file to import elsewhere? >P
Beta Was this translation helpful? Give feedback.
All reactions