Im trying to decide if I should split my characters into parts and use Spine for animation, or if I should create sprite sheets and go the traditional route. I won't be using vectors, if that makes a difference. Also, I'm using Unity, so I'm not even sure if importing animations will work with Spine, though I would assume that it would.
I have a few dynamic animations for my character that need to be created that would not look good with bone based animation, and thus I will be using sprite sheets for these specific animations. I have a few questions here. Is Spine able to import full sprite sheets into the editor? Also will the editor then know to mix animations between the first frame of the sprite sheet or the last frame of the sprite sheet when heading back towards a bone based animation?
Hello tjbrunetto,
You can import a sequence of images in Spine just like any other image: this means you can for example drag all the images of the sequence under a slot so that they will be all aligned, then in Animate mode you can set a key for the visibility of each attachment of the sequence to animate it.
For now there's a couple scripts that can help you speed up the process of keying the sequence:
[suggestion] auto swap for imported frame animations
Quick method of creating animation from frame images
When you talk about animation mix, what do you have in mind?
You can manually set mixes for animations, a mix happens when two different values are keyed for the same property, so if a property is not keyed in one of the two, it won't get mixed. In the case of frame-by-frame animations, the keys have an active state, or a disabled state, so they can't really be mixed, therefore they simply will override a previous animation.
My primary concern is that when the character is transitioning from the sprite sheet animation to the bone based animation, the sprite sheet animation will need as many custom animation transitions as there are possible animation states that it can enter from said pose.
For Example: If I have a claw attack with a cat, and I have the attack dynamically drawn, at the end of the sprite sheet of cat swiping attacks, I would then have to create a sprite sheet for each animation transition, IE, Cat Idle, Cat Walking, Cat Running, Cat Pounce, Cat Death, etc. Without interpolating between these animation states manually you would need to create a ton of custom animation transitions.
I think you could bypass this problem by matching the pose of the spritesheet animation with your regular skeleton, so that when the images sequence ends, Spine can do its usual magic and interpolate the pose for you, which is a common use case. If it's combat moves usually having less or no interpolation makes an attack animation feel more reactive, so it might not even be that bad. If you can share the sketches of the poses you had in mind I'd be happy to help think it out ?
If I have 4 different skins, one is my character wearing normal gear holding a shotgun, another is my character holding a handgun, magnum, and sniper rifle. If I wanted to add different colored workboots to all of these skins would I need to double these skins so that it was like this?
Or is there a better way to go about doing this? I am going to have a lot of weapon skins in my game and doubling and tripling them based upon clothing options for the player seems like it will clutter the project really quickly.
Considering your special case of wanting to have unique frames for attacks, I'd separate the boots in those frames so that they can be recolored by code.
The best scenario would be one where pieces can be mixed and matched, so each piece has its own skin, and you draw the alternate poses specifically for them. I cannot stress enough how versatile Spine can be when it comes to mesh deformations, you likely can get away with deforming a new pose, therefore needing to draw less frames, if you plan your character accordingly.
From what I am gathering it is not possible to have two skins active at the same time. If I wanted to mix and match skins I would not be able to do so. Basically I have a few cosmetic adjustments that are going to occur in the game. The weapon skin the player is using may not change so I cannot simply have the player active with the Magnum skin and the silly hat skin at the same time. I would need both a regular magnum skin and a magnum + silly hat skin in order to make all of the animations work.
Thank you for the responses I have a million things going on right now and lost track of the responses until now. I am taking a look at the two links that you sent my way Harald. Thank you for this advice that seems perfect for what I am looking for and will give me a lot of flexibility moving forward!
I am guessing what you get out from Adobe Animate would be a sprite sheet of your animations. Spine has this too, but the far more powerful feature is exporting to the format that the Spine Runtime uses.
While with a sprite sheet the animation will be locked to the number of frames you choose, using the Spine runtime gives you as fluid animation as you want. This also allows you to lower the speed of the animation without having visible frame swaps.
Those are the basics you get with the Spine runtime. In addition there is stuff like inverse kinematics, being able to override parts of the character (useful for pointing guns) and adding physics bodies directly to the parts of the skeleton.
We have 4 directions for our player, UR, UL, DR, DL. Each direction as 2 animations GwenIdle and GwenWalk. In Spine, our animator only made two skeletons so I had him export each skeleton two times with the Idle and Walk for the respective directions.
In Unity, I chose a random Skeleton Data Asset from one of those skeletons and added it to the scene as a Skeleton Animation and then went through the AC Character Wizard, making sure the animation engine was set to Custom and named AnimEngine_Spine.
At this point, I believe I've done everything correctly? Under the Standard 2D animations, I simply used the Spine GameObject that is in the scene as the Sprite Child. Here's what happens when I try to play though:
You can see that it's quickly changing SkeletonData Assets. For some reason going UL works but the other directions don't.
Your images don't show the sprite child itself, and unless it's got the same name as your player's root (Spine GameObject (GwenDR)), it looks like your player's root is assigned as both your Sprite child and Skeleton animation fields.
Your Skeleton Animation / Mesh Renderer / Mesh Filter components need to be on the child object - not the root which has the Player component. Move these to your child, and assign this child in the two fields mentioned above.
It also looks like your scene is in 2D, in which case you don't want to have a Rigidbody or Capsule Collider component, since these are in 3D. The Character Wizard should only have added these if your game is set to be 3D, so check that your Settings Manager's Camera perspective field is correct. Remove these component from the root, and - if you need collision - replace them with Rigidbody2D and CircleCollider2D components. The 2D demo's player character, Brain2D, can be used as a reference.
I did notice that when I was going through the wizard it automatically set the game object as the root and the only child is the Sound child. Additionally, it also adds the Capsule Collider and Rigidbody. I did make sure to double check my camera perspective as well and it is set to 2D:
An update: Since I needed that root folder, I set up the animation engine to be Sprites Unity in the character wizard. Once it created the root and the child sprite, I changed the animation Engine to Custom and continued that way. It works now.
I see. When using the Character Wizard, AC will attempt to guess the intended animation engine based on the kind of renderer you've supplied it. In this case, it's a Mesh Renderer, which is typically used for 3D characters (while Sprite Renderer is typically for 2D). Enforcing "Sprites Unity" or "Sprites Unity Complex" in the wizard should indeed resolve that.
Hi all, I'm working on a new slot game for mobile, some of the win icons may likely be spine animations, but some may work better as keyframed. Having them all as spines would be simpler, but if the payoff is worth it, would look at customising each symbol type.
I was just wondering if anyone had done any benchmarking for keyframed animations in spine/pixijs v a traditional pixijs animated sprite? Any advice greatly appreciated!
Hi all, I'm working on a new slot game for mobile, some of the win icons may likely be spine animations, but some may work better as keyframed. Having them all as spines would be simpler, but if the payoff is worth it, would look at customising each symbol type.
I was just wondering if anyone had done any benchmarking for keyframed animations in spine/pixijs v a traditional pixijs animated sprite? Any advice greatly appreciated!
My personal conclusion is Animated sprites are very more lightweight than spine, so recommande you to use pixi animated sprite to make simple sequential textures key animations.
i get this result on a i7 920 and gtx 1070
3a8082e126