Spriter For UE4

Spriter Plugin, Version 0.6

Description: This Plugin allows you to import Spriter SCON File’s and use them to animate a Rigid Body Skeleton with sprites. Spriter is a program created by BrashMonkey, which can be found at this link http://www.brashmonkey.com/spriter.htm

Currently Supported Spriter Features:

  • Bones
  • Sprites
  • Character Maps
  • Multiple Entities
  • Events
  • Boxs
  • Points

Currently Supported Runtime Features:

  • Animation Blending
  • Start/End Animation Callback’s
  • Full Access To Spriter File Data In C++/Blueprints

Planned:

  • Tags | Estimated Version: 0.7
  • Animated Variables | Estimated Version: 0.7
  • Sounds | Estimated Version: 0.8
  • Plugin Demo | Estimated Version: 1.0

GitHub Master Branch: GitHub - diddykonga/Spriter: A Plugin for Spriter built for Unreal Engine 4.

Changes:
Version 0.5->0.6

  • Feature: Support for Events
  • Feature: Support for Boxs
  • Feature: Support for Points
  • Small-Feature: Support for Sprite’s changing their Pivot and Color in an Animation

Version 0.4->0.5

  • Feature: Support for Multiple Entities in one SCON file
  • Fix: Critical Bug that would cause Entities that had non-transient Sprite/Bones, to not show up properly in-game

Please leave feedback, as well as any suggestions you might have, for i’m open to ideas.
Thanks for reading, and enjoy the plugin! :cool:

Thanks you! I was waiting for that since months ago!
Thanks for support the community.

This is so great! I thought I was going to have to give up on using spriter after moving to UE4 for my 2d projects. I can’t wait to try this!

Tried installing on Mac it gave me an error. I’m going to try on my Windows machine later. I’m still very new to the engine so I might be doing something wrong.

To use the plugin all you have to do is download the .Uplugin file, and the source folder, then put those file/folder in a Folder called Spriter, then put that folder inside your game’s Plugins folder, then in your games Build.cs, add Spriter and SpriterEditor as module dependancys, then it should compile just fine i believe.

Thanks for putting this together!! I was about to make a plugin myself, but was relieved when I found this.

Thanks for making this, I was about to give on using spriter, this might get me back on it again.

Woah, first Creature, now Spriter! Paper2D might actually become competitive, wow!

Thanks for the plugin

Im new to plugins and unreal.

Trying to make this plugin work.

Created .scon from spriter with grey guy character which already includes animations and bones.

I imported that .scon and it created my sprites, textures, import data and character map asset.

In a paper 2d character, I added the spriterskeleton component. In the right for that component, I was able to select the skeleton and character map in both combo boxes.

Now what are the next steps?

My bone and sprite count properties are at 0. Shouldn’t that been populated for me already? Do I need to add them manually one by one?

In the viewport, I don’t see the bones on my sprite.

Not sure what I am missing.

Help would be appreciated

thanks

Hey thanks for trying out the plugin, im still currently working on it so there may be a good amount of bugs, and not very intuitive.
You actually did exactly what your supposed to do, to setup the Skeleton, then all you have to is call PlayAnimation in blueprints, and it will set up the Skeleton in your game as soon you call the function. If you dont want to choose an animation to play, and just want to setup the skeleton in-game then you call SetToSetupPose, and that will choose the first key of the first animation in your file to set your Skeleton with.

Im actually about to update the Plugin on GitHub right now, to fix some critical bugs, and add support for Multiple Entities inside one SCON file.

If you have any other questions, feel free to post them here! :slight_smile:

Thanks for your help.

I will update to 0.5 soon.

I was able to set the animation on my character with the play animation call.

What I want to do is add sockets to the bones in order to attach weapons, gear etc…

Because I dont see the actual skeleton in editor, I was looking for a way to create the sockets on the bones inside the blueprint but I don’t seem to find the right way.

Is there a way to add a socket to a bone with the spriter skeleton?

Thanks

Currently the best way to do that, is to call Get Bone and use the World Transform to position/rotate whatever object it is you want to be affected by it.

Since Bones/Sprites/etc. aren’t Actors, they cant be parented to, using the normal UE4 Actor Parenting system, so instead you can get the Bone’s World Transform then your Objects Local Transform and multiply them together.


ObjectsWorldTransform = ObjectsLocalTransform * ParentsWorldTransform;

This will give you the Result World Transform for your object as if it were parented to the Bone/Sprite/etc…

If you have anymore questions feel free to ask! :slight_smile:

P.S: Im planning to release 0.6 soon, which should have support for Events(Triggers), Boxs(Psuedo-collision), and Points(Direction+Position).
As well as adding support for Sprites to change their Pivot points in animation, and change their Color(Spriter only supports Alpha :frowning: ) in animation.

I think it would be great to have the spriter variation of sprite sockets for this plugin, but I don’t know how feasible that would be.

OOO, will this event be able to be set on an animation, so in attack animation, on specified frame it’d call something in blueprint!
What do you mean by “Points”, like the bone points to rotate individual bones? Would you give an example of what “Points” be used for?
Changing color is awesome, didn’t even think of that…

To your first question, you can actually still use Sprite Sockets, as the Spriter Skeleton still uses the Default Paper2D Sprite Component to show sprites on the screen, all you have to do is call Get Sprite, then get the Sprite Component, then attaching an object to its Socket. :slight_smile:

To your second question, yes, you can create an event inside of Spriter, and then it call it by setting a keyframe for it, anywhere in the animation. All you have to do to gain access to the event call inside of C++/Blueprints is add a callback to the OnEvent delegate, which is called anytime a Event in Spriter is called.

Points are just a object that has a Position and Direction/Angle, that is it. They can be keyframed in Spriter to represent a position and direction for lets say a Projectile to fire from in your code.

Yes changing color is awesome, sadly Spriter only supports changing the Alpha currently and not R,G,or B, but hopefully in the future they will ad full color changing support. The plugin already supports it, so its just up to the guys at Spriter now :stuck_out_tongue:

Feel free to keep it coming with the questions if you need any more help!

Just gotta say it’s amazing this could even be done.

Any chance of having DragonBones C++ plugin for UE4? Its free, open source and competitively better than other 2D animation toolset.

How’s it coming along? :smiley: You’re doing some good work here!

I’m having problems importing the .scon file in my project.

The plugin seems to have been installed correctly. I can enable it or disable it. I made sure that I added Spriter and SpriterEditor in my Build.cs.
Anything I might have missed?

I think your version covers more than this other guys:

I’m trying to import but I keep getting a LogSpriterImporter:Warning: Expected a ‘name’ field in the folder object of ‘AssetName’. Failed to creates…

Any ideas?