2D Spritesheet Animation (CopperCube extension) v1.4
A downloadable Coppercube Extension
A CopperCube extension that allows you to use 2D Spritesheets in your app or game. This is best suited for 2D games and works with all sprite sheets that can be cut on the basis of rows and columns.
This extension action will allow you to use a single image for your character or object and will allow you to animate the character using the sprites from that single image, just like any other sprite sheet animation system.
You looked at the sprite sheet above of the green Dino up there, here is the result of using that sprite sheet with this action. This is how the Dino will animate.
You can specify the total number of columns and rows in your sprite sheet and the extension will automatically prepare the animation for you from that info. It also allows you to specify the Start Frame and End Frame for the animation. meaning you can choose from which row or column (tile) the animation should start playing and then end on which column.
This extension might also increase the game performance, as it will be using only a single texture so that the game won't use multiple load texture commands and not use multiple render calls, so the fewer the render calls for the textures the faster your game performance will be.
Check out the demonstration video on the right on how to use the extension and how it will work.
Usage:-
Attach this action to any behavior and fill in the parameters, Select the Affecting_node (the node on which the sprite sheet texture is applied), and Set the number of rows and columns according to the sprite sheet. For example, if your sprite sheet has 12 columns and 8 rows, fill them in the rows and columns field, specify the AnimationTime( it is the time one frame takes to switch to another frame ) then specify the StartFrame and EndFrame for your animation, it is the number of tiles (sprite) through which you want the animation to get started and the number(index) of the sprite at which you want the animation to end. Check the toggle if you want to loop the animation or not. Provide and action on finish to execute an action on one complete cycle of the animation.
You can also use some Coppercube variables to control the extension settings during the gameplay. You can use Coppercube variables to set startframe and endframe and animationtime (speed). To use the CC variables, simply use the inbuilt set or change a variable action and then use the variable name that will be in this format.
nodename.spritestartframe - integer
nodename.spriteendframe - integer
nodename.spriteanimationtime - integer
nodename.spritelooping - "true" or "false"
Note:- previous versions use different variable names, and looping was not available in previous versions. All previous versions of the extension were shader based.
Here nodename is the name of the node to which the sprite sheet texture is applied (affecting the node supplied in the action parameter).
Troubleshooting:- If the sprite animation is stuck to the first frame of the sprite then you need to use a dedicated GPU, instead of your integrated graphics, or need to update the drivers for the integrated graphics. ( this happens on older shader versions only)
Watch the video on the top-right of this page for the usage instruction for this extension.
that's all hope you guys find this extension helpful.
For more CopperCube extensions, shaders and plugins visit my website https://neophyte.cf
What's New in v 1.4?
The whole codebase of the extension is changed now it uses the polygon editing API of CopperCube, it doesn't rely on the shader pipeline now, hence providing support for openGL as well.
Works with CC lighting and Realtime Shadows now.
Works more efficiently with any kind of sprite sheet.
Works with any non-animated 3D mesh.
Some of the parameters have been removed like "Base Material" and "Affect all Materials" they don't make much sense.
Toggle to select if the animation should be looping or not, can also be changed via variable during runtime.
NOTE:- The extension codebase has been changed heavily however the usage is same, so please refer to the video for the earlier versions. You will understand everything.
Status | Released |
Category | Tool |
Rating | Rated 5.0 out of 5 stars (3 total ratings) |
Author | Glitched Velocity |
Genre | Platformer |
Tags | 16-bit, 2D, Action-Adventure, coppercube, Pixel Art, Sprites, spritesheet, texture-atlas, Tileset |
Links | Neophyte.cf |
Download
Click download now to get access to the following files:
Development log
- HotFixMar 02, 2023
- Major Update v1.4Feb 28, 2023
- Update v1.3Jul 12, 2022
- update v1.2Apr 04, 2022
- Update v1.1Dec 16, 2021
- Demo file addedDec 15, 2021
- Coppercube Spritesheet AnimatorDec 14, 2021
Comments
Log in with itch.io to leave a comment.
Very cool tool. I'm attempting to use this tool for blood splatter when an enemy gets hit.
One question: Animation Time... what is that based on? Is that mile-seconds? If not, maybe it should be so that if you need to time something based on how long a cycle of animation takes, it might be easier to connect the two if they were both working with mile-seconds. For example, if I knew that every frame would be there for 20 ms, and I have 12 frames of animation, I will know that I have 240 ms of animation and then I can delete my plane in 240ms.
One thought: It might be nice to have the looping ability to be a checkbox toggle and not just set by a variable. Could help to keep things simpler when using this tool for things that are not for 2D characters.
Still... a very cool tool... thank you.
M
Great extension. Thanks for doing this.
I noticed a small glitch here. All sprites I create have some kind of a single pixel line on top of it. Do you know how to get rid if this? Tried different sprites they all have this issue. Sprites I am using have transparent background and the material is using transparent alpha channel.
I actually noticed the same thing on your Youtube video.
Hi there, it’s really easy to fix, all you need to do is just turn OFF “Billinear Filter”, in order to do so, go to the iredit-irrlicht properties, and select the plane mesh in the irrlicht/irredit properties, go to materials tab, and turn OFF the “Billinear Filter”.
And these artifacts will go away from the top of the sprites, I did have mentioned this a few times in some of my videos, but I don’t remember exactly in which one.
Anyways, I hope the extension will be helpful to you:)
Perfect! Works now. Thanks again.