SimplyMaya

Welcome back to SimplyMaya. Check out our latest training here.

MAYA TUTORIALS
Animation & Rigging Related Topics
 
Thread Tools
# 1 23-12-2003, 02:02 PM
JulianBT
Registered User
Join Date: Nov 2002
Posts: 36

Set Driven Key: problem with two attributes driving a single object

Here's one that I can't find in the docs (so far...). I have a joint which rotates in X and Z (not in Y). I have an object whose movement is driven by the joint. I have used Set Diven Key to set up the movements for the X rotation of the joint and the Z rotation.

When I rotate the joint in X, the driven object moves correctly, and when I rotate the joint in Z it's correct. However, if I rotate the joint in both X and Z, the movement of the object is way off. I think the outputs from the X and Z rotation of the joint are being added together to cause this.

Is there a way to force the effect to be avereged rather than added? Better still, is it possible to make a weighted average so that I can control the proportion of the effect the X and Z rotations of my joint?

This would really help me out of a hole if anyone has any ideas.

Thank you!

Happy Christmas to all.

Julian

# 2 24-12-2003, 01:41 AM
Pony's Avatar
Pony
Subscriber
Join Date: Mar 2003
Location: with PonysGirl
Posts: 2,573
well have not done it yet but the X and Z being added together is a good defalt. I have one on a little difrent set up.. I need a rope to move buy so much for the Z rotait on one joint.. and thin I need it to be moved some more when the next joint rotaits Z.. so its helpfull like that..

For your set up, first thing I think of is to creat a new atribute, and just make a exprestion that takes the X and Z and avriges.. the result going in to new atribute.. thin put your SDK on that.

hope this is a good salution for you.. you can do a lot of new, neet things with a extra atribute and some exprestions.

# 3 31-12-2003, 11:27 AM
JulianBT
Registered User
Join Date: Nov 2002
Posts: 36
Hi,

Thank you. I'm not sure this will work for my setup. It's the inputs to the driven objects that need to be averaged, rather than the outputs from the driver. And I've got 28 driven objects!

What I have discovered is that for my purposes, the default action is to average the movement, so I think something has gone awry wioth my file. Trouble is, I don't know enough about the programming side to fix it.

Ho hum! I guess I'll have to make do.

# 4 31-12-2003, 01:11 PM
Pony's Avatar
Pony
Subscriber
Join Date: Mar 2003
Location: with PonysGirl
Posts: 2,573
well it sounds like a intresting problem. I think if you try something like what I stated it will work for you.

but you didn't say anything about 28 driven objects.. is that like the total number of SDK's you have set up ?? becouse from what you stated in the first post was 2 drivers, 1 driven. The teck I posted about can be modifyed to do like 1 driver 2 driven.. or more.

# 5 31-12-2003, 02:12 PM
JulianBT
Registered User
Join Date: Nov 2002
Posts: 36
Well, it's one driver with two attributes and 28 driven objects working off that driver. There are a load more SDKs in the set-up as well, but they all seem to be working.

I did a test to check that the thing should work: I made a simple arm of three joints. I used SDK to make a sphere move from 0 to 1 in the Y direction when the elbow joint was rotated 90 degrees in Y. I then set up another SDK so that the sphere moved from 0 to 1 in Y when the elbow was bent to 90 degrees in Z. Independently, these worked fine. I then rotated the elbow through 90 degrees in Y and Z and the sphere moved to 1 in the Y direction. It's averaged. That's what I wanted, and expected from my set-up.

Now, I tried the same logic with my set-up that's not working, and I find that my driven object moves the correct distance when the bone is rotated in the X axis only, and in the Z axis only, but when I rotate the bone in both X and Z at the same time, the driven object moves twice the distance - it's added. AAAGH!

It seems to me that this is spurious behaviour. If I'm to overcome it with an expression, I imagine I'll have to make the movement of the joint drive some new attribute, and then have that attribute applied to the positional information for the driven objects. Thinking as I go here - yup! That might work. I don't think I'll have time to check it for a couple of weeks, but I'll let you know.

Thank you!

You haven't any experience of rigging dangling sleeves without using dynamics have you?

Julian

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off