Community
Maya Animation and Rigging
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya animation topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to copy rotation from two objects to a single object at the same time?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
robert_biala
1131 Views, 4 Replies

Is it possible to copy rotation from two objects to a single object at the same time?

Hello,


Goal: I am trying to copy rotation of some joint to another, in this case Joint1 to Joint2, and then add rotation from another object, in this case Box2, to Joint2, on top of the initial copy rotation, as shown in the screenshot below. That's all.

14.png

Current result: So far I'm able to do only one of those, but not both of them at the same time, as Maya does not allow for a single object to have multiple Orient constraints, and multiple Parent constraints get blended at all times.


Question: Is it possible in Maya in any way to copy rotation from Object A to Object B, then also copy another rotation from Object C to Object B, on top of the existing, copied rotation?


Genesis of the problem: This scene is a demonstration of a principle that allows to take any video game character model with an armature (which is usually FK-only, thus useless for animation), create an automatic IK/FK rig that has a similar bone setup, constrain both rigs to each other, and then use the IK/FK rig to animate the game armature, and thus the character. I'm trying to see if this principle can be done in any 3D software other than Blender.

Think of Suzanne1 and Joint1 in the picture as a body part of a character model, e.g. an arm, and a bone controlling it, and Joint2 as the bone of the said IK/FK rig that's supposed to control it. If I make some automatic IK/FK character rig through some autorigging system like Blender's Rigify, the bones in the rig will have differing axis orientations from the game rig - so if I copy the rotations from the game rig to the IK/FK rig, the meshes will face the wrong direction, as shown in the screenshot above.

This can be fixed by adding rotation from another object, which will compensate for the wrong direction, as demonstrated in Blender screenshots below:

12.png

13.png

The above screenshot is also the result I'm trying to achieve in Maya.


Additional notes:

  • "Can't you fix the axis orientation of the joints/bones in either one of the rigs?" - No, adjusting the axis orientations of the game armature bones will break any animations upon importing them, while adjusting the IK/FK rig is actually more time consuming than setting up all of those constraints on each bone (I've tried).
  • "What's Box1 for?" - It does the same thing as Box2, except it's for adjusting the rotation on Joint1 after copying rotation from Joint2. As mentioned before, both rigs have to be constrained to each other.
  • "Why not use locators instead of joints?" - one, I've tried, and ran into the same problems - one Orient constraint at a time per object and Parent constraints get blended. Two, from what I've checked, when you import a game character with an armature, you'll get joints instead of locators, so that's what I'm trying to fix.
    I should have used locators instead of boxes though, but I don't think that's relevant.
  • For the record, I've also posted a roughly identical thread in the 3DS Max forum, as I'm trying to do the same thing in Max and encountered a similar problem there as well.
  • If you want to try doing this yourself or see how it's done in Blender, I've attached both the Maya and Blender scenes to the post.
Labels (4)
4 REPLIES 4
Message 2 of 5
Kahylan
in reply to: robert_biala

Hi!

 

I'm sorry if this is a stupid question and I'm not quite understanding the problem here.

But why aren't you just using the "Maintain Offset" option in your parent or orient constraint? That way even if your game rig is in a different orientation, Maya will automatically calculate the offset needed so you game rig follows your IK/FK rig in space.

 

Message 3 of 5
dinofiguera
in reply to: robert_biala

if you use some shading node like "plus-minus-average"  and do some connections in the node editor, you can add as many attributes as you want and pipe the result into one object´s attribute...

Message 4 of 5
robert_biala
in reply to: robert_biala

@dinofigueraI've tried plusMinAvg but I've failed to make a combination that would give me the result I need.

@Kahylan   For some reason, I've actually dismissed and incorrectly tested that option and it indeed is what I needed - my bad 😅

While for the most part this does solve the problem for me, I think the question I've asked initially might still stand as someone later might ask themselves the same question but for different reasons. So if anybody knows the answer, it will be appreciated.

 

There's one more thing I wanted to do - I have some rotation animation stored in joint1, and I want to transfer it to joint2 in a way so it's visually identical on the monkeys (i.e. they face the same direction). Maintain offset already solves the direction problem, so all I would need is to key the constrained rotation attributes.

 

However, that causes to create a pairBlend node which blends the animation on the object with the animation from the parent and the one I've just created. That way I can copy just a single keyframe, and any other keyframes I have to manually copypaste as shown in the screenshots below (which is fine for what I need, but completely impractical if I wanted to do apply it in practice)

 

15.png

16.png

 

Is there any way to key constrained (blue) attributes?

Message 5 of 5
stephenkmann
in reply to: robert_biala

You don't want to key the attributes.. Pair blend . "blends" between keys and constraint. 

 you want to "add" an offset,  just as your maintain offset did when you created the constraint. 

You'll notice that the constraint has values in the offset channels 

or. just put a group node between the constrained object. and  whatever is below it 

so in your case I would

 

parent the joint to itself. 

make the constraint control that parent

then animate the joint for the offset

 

of make a basic rig control group so you have something to easily select that's not a joint. and then the joint can be an additional offset, or free 

 

-=s

 

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report