Relation constraint rotation by keeping the offset

Relation constraint rotation by keeping the offset

Anonymous
Not applicable
3,241 Views
7 Replies
Message 1 of 8

Relation constraint rotation by keeping the offset

Anonymous
Not applicable

Hello everyone

 

While playing around with some relation constraints, I've got to a point where I want to have an objet A driving and object B while B keeps his initial rotation.

For example let's say whe have here these two meshes A and B:

 

1.PNG

 

If I directly connect them, the object B will change his rotation matching the object A:

 

2.PNG

 

 

How can I have A driving the rotation of B but keeping its initial position?

 

I've tried use some operators here and there in order to have the output of A to become 0 before going into B, and adding back B to iself in order to have the same initial rotation value, but B after that won't rotate anymore.

 

3.PNG 

 

 

thanks!

0 Likes
3,242 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable

Hi Xatmo,

 

Try maybe something simpler like that:

Capture.JPG

 

Just take the rotation of the first cube, add your rotation offset (-58 on Z axis in this exemple) and plug it in the second cube rotation.

 

Cheers

0 Likes
Message 3 of 8

Anonymous
Not applicable

Hi bujinkan02 and thanks for replying.

 

I think I'm either doing something very silly or mobo 2015 is a bit bugged.

I already tried what you suggested me, but sometimes it works and some others it doesn't.

 

what you're trying to say is the following:

the aim is to have the cube1 output to become 0 so that cube2 doesn't get any influence right?

Now that I'm trying is not working for some reason and the cube2 rotation becomes 0  instead of staying where it is.

 

By the way there is also an another issue:

I don't want to input the value by hand because values can change and I want to make a more flexible system.

 

instead of inserting a negative value that would make me achieve the 0 output, to the addition I've added a node that multiplies by -1

 

1.JPG

 

 

I also thought that it was going to affect the global rotation instead of the local one, so I've tried to add at the end the initial rotation of cube2 to itself, but  then cube2 won't move if I rotate cube1

 

2.JPG

 

 

0 Likes
Message 4 of 8

Anonymous
Not applicable

 

In your graph, you take the Z rotation value of 'Cube' and subtract this same value, so the result will always be 0. So 'Cube' can never affect the rotation of you constrain object.

You always have to set somewhere the initial offsets between your two objects. It could be on values in the relation constraints , custom parameters, using another object...

Can you tell me in which context you want to setup a constrain like that ?

 

 

If you want to get or set the local transform on an object, right clic on the node and choose 'Local Transformations':

 

Capture.JPG

 

0 Likes
Message 5 of 8

Anonymous
Not applicable

I have a streaming skeleton that drives a second one to wich I characterize a rig.

The spines are quite different, and I would like te set up a macro constraint about this rotation offset (so the streaming one drives the rotation of the other meanwhile it keeps the original structure).

 

Basically I would like to do like the rotation constraint with the snap but within the relation constraint.

0 Likes
Message 6 of 8

Anonymous
Not applicable

If your spine are different, I really not sure that you can transfert the animation using the local rotation. If your spine bones aren't in the same space, the passing the local values with an offset won't work.

Why don't you characterized your stream skeleton and use a retargeting process instead ?

0 Likes
Message 7 of 8

Anonymous
Not applicable

I'm back after a couple of tests based on what you told me.

 

Unfortunately the bones of the streaming skeleton are locked so, even if I characterize it, I won't be able to reset the hierarchy to get a proper T-pose.

 

I have an another workflow which is doing just what I needed so I'm not worried about that 🙂

 

the thing is still bugging me, is that I can't understand why I can't reproduce via relation constraint nodes the rotation constraint with the snap (offset).

 

Following what you said "You always have to set somewhere the initial offsets between your two objects. It could be on values in the relation constraints , custom parameters, using another object..." I tried a couple of things, for example:

 

I had a locator parented to the object B, A is driving B and I was feeding via the locator the global B rotation.

 

So my expectation was that A was going to reset B to zero and the locator was going to bring it back to the right position. The issue, as you said, is that as soon I hit the zero value, the B object won't move anymore.

 

Maybe I've misinterpreted what you said?

0 Likes
Message 8 of 8

Anonymous
Not applicable

When you click on the snap button in the constraint panel, Mobu set the offset values. If you take a look in the rotation constraint property, in Rotation Settings/Source there is 3 parameters named Rotation.x, Rotation.y and Rotation.z. Those parameters store the constraint offset.


Once your object is constrained and you rotate it, the offset values change to match the current object rotation. I'm not 100% sure but I really don't think you can emulate this behavior in a relation constraint.


In the relation constraint, you can't have an object use as sender and receiver at the same time. Also you can not have a child object feeding transforms to his parent. Otherwise you will have a cycle dependency. In your last exemple, object B modify the locator transformation and the Locator had to modify the transformation of the B object...


But you can do thing the other way around, you can parent your object B under a locator, constrain a locator to the object A and have the freedom to move your object B as you want.

 

 

 

0 Likes