maranpis

Hello Guys :) :

Spine is very good for making fighting games, but in order to do it well, we will have to take some things into account that will make our path easier. In this video I show you the things that I have been learning during the process of making a fighting game with Spine.

Benutzeravatar
maranpis
  • Beiträge: 31

Misaki

Thank you for sharing the video! It is really nice that someone like you is willing to share the knowledge you have gained in your production with Spine :)

Regarding the problem of the shoulder image (RARM_HOOK), certainly, using stepping curves so that the odd pose in the middle of interpolation is not visible is a valid solution, but in this case, why don’t you set weights to the body bone? It allows you to fix the mesh around the underarm.
Also, I am concerned that you are using several deform keys in the animation. It is not good for performance at runtime and recommended to use weights as much as possible and move the meshes with bones. Please see the user guide for more information:
Keys - Spine User Guide: Deform keys

If you have any questions, feel free to ask us!
Benutzeravatar
Misaki

Misaki
  • Beiträge: 1018

maranpis

Hello Misaki!
Misaki hat geschrieben: why don’t you set weights to the body bone? It allows you to fix the mesh around the underarm.
In which sense will it help me to do it better? Because I need to move the arm's mesh points in Spine anyway, right?
I thought weights are mostly used for ponytails, tails, and things like that... But I didn't think it was useful to use it in that situation. If you can explain it to me a little bit will be great :)

Do you know if there is a way to tell spine how to do the mix in order not to have weird interpolation between animations? (you can watch it in 1:19)

Thanks a lot for the answer!
Benutzeravatar
maranpis
  • Beiträge: 31

Erika

I'd argue that meshes can (and most of the time should) be used anywhere, not just tails! :D
Here are some examples:
Blog: A taxonomy of meshes

Here's a small example of rig that includes a torso and a bending arm:
Spine Tips: 4 shoulder

You can definitely abandon direct deformations.

In fact, the tips you're showing could be not used if the rig was set with carefully calibrated meshes most of the time.


The mix you're seeing is likely caused by Spine attempting to take the shortest route to go to the next pose, so the arm rotates the "wrong" way. Indeed setting an in between animation, or just setting the animation, so it goes back the route you want is a good strategy.
Benutzeravatar
Erika

Erikari
  • Beiträge: 3113

maranpis

Erika hat geschrieben:You can definitely abandon direct deformations
Hello Erika and thanks for your answer :)

I have been doing some tutorials and the process in general goes like this: first transform the image to a mesh and then bind bones to do weights. I did that process for a while without questioning if it was needed for the animation or not. My question is at 3:30 if I just move the points of the arm mesh inside the torso in order to hide it, what will be the different if I bind the bones to the mesh and modify the mesh the same way?

Even having done a tutorial about a 3d effect face binding the bones and using weights, sometimes I feel more convenient to manually modify the mesh in the animation.
The mix you're seeing is likely caused by Spine attempting to take the shortest route to go to the next pose, so the arm rotates the "wrong" way. Indeed setting an in between animation, or just setting the animation, so it goes back the route you want is a good strategy.
thanks! good to know that I'm the good way in that one.
Benutzeravatar
maranpis
  • Beiträge: 31

Misaki

In which sense will it help me to do it better? Because I need to move the arm's mesh points in Spine anyway, right?
I thought weights are mostly used for ponytails, tails, and things like that... But I didn't think it was useful to use it in that situation. If you can explain it to me a little bit will be great :)
I demonstrated it briefly. Please take a look the video below:

Mesh and weights can be used to partially distort an image, but conversely they can also be used to partially fix an image. In the example above, the mesh of the right shoulder and the right arm is a child of the body2 bone. If you give the weight of the body2 bone to some of the vertices, the vertices will not move even if the right arm bone moves. Therefore, if you do this, there is no need to use a stepped curve to avoid showing the interpolation frame.

======
Do you know if there is a way to tell spine how to do the mix in order not to have weird interpolation between animations? (you can watch it in 1:19)
As Erika answered earlier, creating transition animations as you did in your video is a good solution if the rotation direction does not match the previous animation.

However, to put it more precisely, there are a lot of patterns of the cause for the problem of weird interpolation during mixing. You can set the mixing behavior a little more precisely at runtime. For example, if an attachment switches at a time when you do not want it to switch yet when the mix starts, you can fix this by setting the TrackEntry attachmentThreshold property. Similarly, thresholds can be set for the draw order and event timelines. Unfortunately these cannot be previewed on the Spine editor.
I thought that perhaps you might be faced with a problem in a future your project that requires you to set these up, so I introduced them just in case.

======
Even having done a tutorial about a 3d effect face binding the bones and using weights, sometimes I feel more convenient to manually modify the mesh in the animation.
I think the reason why you feel that way is you are adding too many mesh vertices. When creating 3D effects with meshes and weights, it is common to set many vertices, especially for complex parts such as the face, but the number of vertices can be small if the part is not complex. There are many examples in blog posts and tips that show how to animate with very few vertices, so please check them.
Benutzeravatar
Misaki

Misaki
  • Beiträge: 1018

maranpis

Misaki hat geschrieben:
In which sense will it help me to do it better? Because I need to move the arm's mesh points in Spine anyway, right?
I thought weights are mostly used for ponytails, tails, and things like that... But I didn't think it was useful to use it in that situation. If you can explain it to me a little bit will be great :)
I demonstrated it briefly. Please take a look the video below:

Mesh and weights can be used to partially distort an image, but conversely they can also be used to partially fix an image. In the example above, the mesh of the right shoulder and the right arm is a child of the body2 bone. If you give the weight of the body2 bone to some of the vertices, the vertices will not move even if the right arm bone moves. Therefore, if you do this, there is no need to use a stepped curve to avoid showing the interpolation frame.

======
Do you know if there is a way to tell spine how to do the mix in order not to have weird interpolation between animations? (you can watch it in 1:19)
As Erika answered earlier, creating transition animations as you did in your video is a good solution if the rotation direction does not match the previous animation.

However, to put it more precisely, there are a lot of patterns of the cause for the problem of weird interpolation during mixing. You can set the mixing behavior a little more precisely at runtime. For example, if an attachment switches at a time when you do not want it to switch yet when the mix starts, you can fix this by setting the TrackEntry attachmentThreshold property. Similarly, thresholds can be set for the draw order and event timelines. Unfortunately these cannot be previewed on the Spine editor.
I thought that perhaps you might be faced with a problem in a future your project that requires you to set these up, so I introduced them just in case.

======
Even having done a tutorial about a 3d effect face binding the bones and using weights, sometimes I feel more convenient to manually modify the mesh in the animation.
I think the reason why you feel that way is you are adding too many mesh vertices. When creating 3D effects with meshes and weights, it is common to set many vertices, especially for complex parts such as the face, but the number of vertices can be small if the part is not complex. There are many examples in blog posts and tips that show how to animate with very few vertices, so please check them.
Hello Misaki :D

Thanks a lot! The video is very useful and self-explanatory, the binding is so interesting and gave me a lot of ideas :yes:

---

Misaki hat geschrieben:
In which sense will it help me to do it better? Because I need to move the arm's mesh points in Spine anyway, right?
I thought weights are mostly used for ponytails, tails, and things like that... But I didn't think it was useful to use it in that situation. If you can explain it to me a little bit will be great :)
I demonstrated it briefly. Please take a look the video below:

Mesh and weights can be used to partially distort an image, but conversely they can also be used to partially fix an image. In the example above, the mesh of the right shoulder and the right arm is a child of the body2 bone. If you give the weight of the body2 bone to some of the vertices, the vertices will not move even if the right arm bone moves. Therefore, if you do this, there is no need to use a stepped curve to avoid showing the interpolation frame.

======
Do you know if there is a way to tell spine how to do the mix in order not to have weird interpolation between animations? (you can watch it in 1:19)
As Erika answered earlier, creating transition animations as you did in your video is a good solution if the rotation direction does not match the previous animation.

However, to put it more precisely, there are a lot of patterns of the cause for the problem of weird interpolation during mixing. You can set the mixing behavior a little more precisely at runtime. For example, if an attachment switches at a time when you do not want it to switch yet when the mix starts, you can fix this by setting the TrackEntry attachmentThreshold property. Similarly, thresholds can be set for the draw order and event timelines. Unfortunately these cannot be previewed on the Spine editor.
I thought that perhaps you might be faced with a problem in a future your project that requires you to set these up, so I introduced them just in case.

======
Even having done a tutorial about a 3d effect face binding the bones and using weights, sometimes I feel more convenient to manually modify the mesh in the animation.
I think the reason why you feel that way is you are adding too many mesh vertices. When creating 3D effects with meshes and weights, it is common to set many vertices, especially for complex parts such as the face, but the number of vertices can be small if the part is not complex. There are many examples in blog posts and tips that show how to animate with very few vertices, so please check them.
Hello Misaki :D

Thanks a lot! The video is very useful and self-explanatory, the binding is so interesting and gave me a lot of ideas :yes:
Benutzeravatar
maranpis
  • Beiträge: 31

Misaki

I'm glad to hear that my video is useful :D
Benutzeravatar
Misaki

Misaki
  • Beiträge: 1018


Zurück zu Tutorials