Mario

weapon

Ever wondered how to create a setup in Spine that would allow your character to hold a weapon, but also throw it away if needed? Wonder no more! We'll explain step-by-step how to do exactly that in this blog post.

Blog: Holding a two-handed weapon
Аватара пользователя
Mario

Mario
  • Сообщения: 2229

raiquiis

Hello,
I've been trying this and I'm not getting the same result. For me to have the same result I need to have the Mix setting for the IK constraints at 100 and not at 0. The moment I turn to 0, they become normal bones, both in Setup and Animation mode.
Аватара пользователя
raiquiis
  • Сообщения: 9

Erika

Hello, that is precisely the point, as described at the beginning of this paragraph: Blog: Holding a two-handed weapon: Creating animations following the weapon
If you turn them off in setup mode and turn them on during the animations that need it, you'll get the best of both worlds :D
Аватара пользователя
Erika

Erikari
  • Сообщения: 2300

raiquiis

Erikari писал(а):Hello, that is precisely the point, as described at the beginning of this paragraph: Blog: Holding a two-handed weapon: Creating animations following the weapon
If you turn them off in setup mode and turn them on during the animations that need it, you'll get the best of both worlds :D
That makes way more sense, thank you. :lol:
Аватара пользователя
raiquiis
  • Сообщения: 9

eprime

This forum needs an upgrade with new features as "thank you" button and so on
thank you
Cristian
Аватара пользователя
eprime
  • Сообщения: 48

Mario

We just assume all of Erika's posts get a gazillion "thank you"s.
Аватара пользователя
Mario

Mario
  • Сообщения: 2229

Mudoxy

Hi! Thank you for the guide! I'm new to constraints, so any info is very useful :)

I'm using a similar setup for a character holding a shotgun, but with two single-bone IKs on the arms for separate elbow movement. Right now I'm trying to create an animation, where he taps the shaft of the gun on the palm of the far hand. The problem is that when I detach the hand from the gun by keying the mix slider to 0, the hand moves back to its original position, when I need it to stay in place. If I also key the hand to move back into place at the same time, I get weird wobbly movement where it goes up and then comes back down.
I was wondering if there is a way to detach the arm from the weapon, keeping the hand in the same position, that I am missing?

Thank you for your time and attention! ;)

Upd: I got an idea while writing down the question here, however it feels more like a hack than a proper solution.
While a bone is constrained it can't be moved directly by the move tool, so I can't chose where it is supposed to be positioned when the transform mix will be turned off. However, I can key the transform to 0 later on in the timeline, then move the bone in question to the place, where it's supposed to end up, key that position and then copy or move that key back to the place on the timeline, where the transform constrain is still on.
It feels almost as if I'm abusing a bug, but this method seems to work for me. Hope this helps someone else!
Аватара пользователя
Mudoxy
  • Сообщения: 6

Erika

Hi Mudoxy,

Now I'm curious, why did you separate into two IKs your arms? Wouldn't just placing a one bone IK on the last bone be pretty much similar?

Sometimes activating a constraints after another one may result in the previous constraint not working as expected anymore (because the new constraint modifies the position of the previos constraint target after calculating that constraint), in these cases reordering the constraints may help get the result you want.
Constraints: Order

Of course if you can post a gif/video of the wobbly movement it may be easier to understand the issue you were facing.

By the way, what you described is not a hack nor a bug! You can set the influence of a constraint to 0, adjust the position of the bones then turn it back on to retain that position and so on! I think switching from inverse kinematics to forward kinematics on need is definitely good when the occasion requires it. Sometimes a foot needs to stick to the ground (or arm to a weapon), sometimes it is influenced by the body instead and that's ok!
Аватара пользователя
Erika

Erikari
  • Сообщения: 2300

Mudoxy

Hi Erikari!

That makes a lot of sense, thank you for the explanation :)
The character I was animating was facing front, and his elbow had to move back and forth, simulating perspective, so both the shoulder bone and the forearm had to be scaled quite a bit. I figured the easiest way to deal with this would be by creating 2 IK's, so that the hand would follow the weapon, and then moving the elbow IK constraint bone movement scale both the forearm and the shoulder to match its position. I'm sure there is an easier way to do this, but since I'm new to IK-ing, I didn't have any better ideas at the time.
Аватара пользователя
Mudoxy
  • Сообщения: 6

Erika

Hi Mudoxy, I now understand! from what you described your rig may resemble what Arman does also in these rigs:
https://twitter.com/WArmanW/status/1216710331956895745
https://twitter.com/WArmanW/status/1173257660042493952

His rigs are awesome btw, I'm sure you can take inspiration from them if you didn't incorporate elements from it already!
Аватара пользователя
Erika

Erikari
  • Сообщения: 2300

Mudoxy

That is so cool. And exactly the right ref for what I'm doing! I love the way he uses extra joints for more complex mechanics, even though I don't yet understand half of then, this is great inspiration to try making more complex rigs. Awesome! Thank you, Erikari!
Аватара пользователя
Mudoxy
  • Сообщения: 6


Вернуться в Spine