Why ikEffector -> ikHandle is so mysterious?

Why ikEffector -> ikHandle is so mysterious?

geanisixhi
Explorer Explorer
1,541 Views
6 Replies
Message 1 of 7

Why ikEffector -> ikHandle is so mysterious?

geanisixhi
Explorer
Explorer

Hi guys:

 

I found a weird situation about ik:

If I disconnect the connection of ikEffector and ikHandle ( e.g : ikEffector.handlePath[0] -> ikHandle.endEffector),  then, either reconnect them or undo, the ik would be disable, not works again. I absolutely have no idea how to recover it.

I have supposed that all the functions in maya are achieved by nodes and their connections, when the connections has been built, the data run through nodes one by one and then the functions work. But now, it seems not to be so easy and clear.

So, I hope someone who understands this can give me a tip, I really hope to know what happened here.

 

geanisixhi_0-1592658821429.png

 

Accepted solutions (1)
1,542 Views
6 Replies
Replies (6)
Message 2 of 7

jmreinhart
Advisor
Advisor
Accepted solution

In general maya works by passing information between different nodes. Most of this passing is done through direct connections. But some behavior are more complex and can't be done with a direct connection. Have you ever noticed that the rotated attributes of the joints in your ik chain change, but they aren't connected to anything?

 

These more complex behaviors are done through callbacks. Callbacks will look for a specific thing to happen in your scene, such as a node being created, an attribute changing, or a connection being made, and when that even happens the callback runs some code. The IK system uses callbacks, it gathers the data from the joints between your start joint and your end effector (using a callback not connections), uses that data to calculate the rotations to apply, then it applies those rotations with the callback.

 

The ikHandle knows which ikEffector belongs to it because of that message node connection.

When you break the connection the callback stops working. This makes sense because without the connections the ikHandle wouldn't know which effector in the scene to use for the calculation

When you redo the connection the ikHandle should start working again, but something internally doesn't get updated. 

If you reparent a node in the scene or create a new transform node then the ikHandle will start working again. 

This seems like it's probably a bug (I'm testing on 2018 and it happens in that version). But hopefully that explanation helped you out.

Message 3 of 7

geanisixhi
Explorer
Explorer

Thank you so much, Jonah!

Your explanation is so clear, it gives me a better understanding of how maya works.

Especially when you said the rotation of ik-controlled joints changes without any connections, it really woke me up instantly.

Then, as you said, I did a little testing in maya2019 and after creating the transform node, the ik came back to 'life'.

It's amazing!

 

I wonder if I could ask you for more advice:

How can I get a more systematic and comprehensive understanding of how things work behind maya? For example, how do I know that there was a callback running behind here, and how do I know what callbacks here, etc. ?

Is it documented?

 

Thanks again, Jonah.

 

0 Likes
Message 4 of 7

jmreinhart
Advisor
Advisor

Glad to hear that my explanation helped. It's a bit hard to recommend any specific resources because I don't know how much experience you have with rigging already, but I put together a resource list for my university a while ago, hopefully something on there will interest you.

 

https://docs.google.com/document/d/1fxsG4kCZMcBXh2PYZOkdwx1wHohGCIO2qGEaXyb1sLI/edit 

 

Another resource (which is a bit dry) is the the "Cult Of Rig" video series.

 

If you're interested in learning about how Maya works "under the hood" I'd recommend searching for Maya API. The API is very technical and I wouldn't recommend diving into it until you're pretty comfortable with how scripting with MEL or Python works. 

 

Happy to help if you're looking to learn more about something specific. 

Message 5 of 7

mspeer
Consultant
Consultant

Hi!

@geanisixhi  and @jmreinhart 

This is fixed in Maya 2020.

In previous versions as a workaround, after reconnecting you can save the scene and reload it, then it should work again.

0 Likes
Message 6 of 7

geanisixhi
Explorer
Explorer

Wow, these are treasures for me,  I think I've got something to do this time.

I think I need to learn the api from scratch, as you say, this is the best way to understand how maya works.

Anyway, you've really helped me out, Jonah, I appreciate it!

 

0 Likes
Message 7 of 7

geanisixhi
Explorer
Explorer

Very glad to see this news, thanks.

0 Likes