The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

rotation linking in 3dsmax (solved)

RankenphileRankenphile Passersby were amazedby the unusually large amounts of blood.Registered User, Moderator Mod Emeritus
edited May 2009 in Help / Advice Forum
so I'm working on a robot arm/hand for a school project, and I want to know how to link objects to share a trait, such as rotation.

For example:

3dsmax-hand-1.jpg

I've got the three joints on the "finger" of the hand, marked A, B and C. If I rotate Joint A, I want Joint B and Joint C to rotate as well, effectively closing the hand, without me having to go in and control each and every joint - I want it to be automatic.

And I can't fucking figure it out to save my life.

Any help?

8406wWN.png
Rankenphile on

Posts

  • wallabeeXwallabeeX Registered User regular
    edited May 2009
    If you were in Maya, there'd be several ways to do this. One would be writing an expression, and the other would be setting a driven key.

    There's definitely a way to do both of these in 3d Studio Max. I don't know MAX script, but it's likely something like:

    jointB.rotateX = jointA.rotateX
    jointC.rotateX = jointB.rotateX

    Very simple script. Gotta be a way to do it.

    Take it to CGtalk.

    wallabeeX on
  • DefenderDefender Registered User regular
    edited May 2009
    Check out the Comet charRigger script. It has a feature on the hand that actually does one better! It has a bunch of custom values that you can key that control stuff like the spread of fingers, and open/close of course. There are other neat things in the rig like ankle pointing, which is great for transferring weight from heel to toe during walk cycles, and knee/elbow direction, which helps to take out some wonk from arm/leg anims.

    I've never scripted a feature like that myself, but this rig is pretty solid.

    http://www.comet-cartoons.com/maxscript.php

    I would also say to check CGTalk/ScriptSpot. I'll see if I can give a better answer.

    Defender on
  • NotYouNotYou Registered User regular
    edited May 2009
    You can either just link them if you want it to share rotation and position. It's one of the tools that's in the tray at the top. Or you can use constraints, which are in the animation menu at the top.

    NotYou on
  • FrostyFrosty Registered User regular
    edited May 2009
    I think what youre looking for are Wire Parameters, where you can "wire" changes from one object to affect another. Youll want to wire each finger bone to follow the rotation of its "parent", though probably not on a 1-to-1 ratio. That way you can just rotate the bone closest to the palm of the hand on each finger and the rest of the finger will curl with it (which is what you want if I'm reading correctly)

    If you just link them, the finger will remain straight when you move the first bone, and youd have to rotate each bone seperately if you wanted the finger to curl

    Frosty on
  • RankenphileRankenphile Passersby were amazed by the unusually large amounts of blood.Registered User, Moderator Mod Emeritus
    edited May 2009
    Frosty wrote: »
    I think what youre looking for are Wire Parameters, where you can "wire" changes from one object to affect another. Youll want to wire each finger bone to follow the rotation of its "parent", though probably not on a 1-to-1 ratio. That way you can just rotate the bone closest to the palm of the hand on each finger and the rest of the finger will curl with it (which is what you want if I'm reading correctly)

    If you just link them, the finger will remain straight when you move the first bone, and youd have to rotate each bone seperately if you wanted the finger to curl

    that's precisely the problem, I've been linking them but having to animate them seperately

    I'll look into the wire parameters.

    thanks.

    Rankenphile on
    8406wWN.png
  • FrostyFrosty Registered User regular
    edited May 2009
    Frosty wrote: »
    I think what youre looking for are Wire Parameters, where you can "wire" changes from one object to affect another. Youll want to wire each finger bone to follow the rotation of its "parent", though probably not on a 1-to-1 ratio. That way you can just rotate the bone closest to the palm of the hand on each finger and the rest of the finger will curl with it (which is what you want if I'm reading correctly)

    If you just link them, the finger will remain straight when you move the first bone, and youd have to rotate each bone seperately if you wanted the finger to curl

    that's precisely the problem, I've been linking them but having to animate them seperately

    I'll look into the wire parameters.

    thanks.

    FYI you'll still need to link them (I'm assuming each bone is a seperate object) so that theyll stay together

    Frosty on
  • RankenphileRankenphile Passersby were amazed by the unusually large amounts of blood.Registered User, Moderator Mod Emeritus
    edited May 2009
    not using bones, haven't gotten that far in class yet

    using object links, and yeah, they're linked to allow them to move with each other

    this is one I did last week, btw

    http://www.youtube.com/watch?v=fONg0y9FfEI

    as far as the wire parameters go, I'm having a hard time understanding how to get them to work - so far nothing seems to affect anything

    Rankenphile on
    8406wWN.png
  • FrostyFrosty Registered User regular
    edited May 2009
    Hang on I'll whip up a quick example with some pictures

    Frosty on
  • RankenphileRankenphile Passersby were amazed by the unusually large amounts of blood.Registered User, Moderator Mod Emeritus
    edited May 2009
    I got it figured out, there were a number of other issues going on with the pieces that were preventing me from doing what I needed, from all of my blind mucking about trying to get it working.

    Thanks, guys.

    Rankenphile on
    8406wWN.png
  • FrostyFrosty Registered User regular
    edited May 2009
    step1.jpg

    Right click on bone1 and go to Wire Properties. Then follow the windows down to the rotation you want (in my case it was the X axis). A little connector line will appear and you want to choose bone2. The same windows will appear so choose Transform > Rotation > X Rotation again.

    step2.jpg

    The parameter window will pop up, and since you want bone1 to control bone2, click the appropriate arrow and then Connect. Note the expression on the bottom right, which by default is just 'X_Rotation', or 1-to-1. You may want to change this to something else like (X_Rotation * 1.5) or whatever works for you.

    step3.jpg

    Then just do the same wiring from bone2 to bone3 and you should be set

    edit: damn yooouuuu

    Frosty on
  • RankenphileRankenphile Passersby were amazed by the unusually large amounts of blood.Registered User, Moderator Mod Emeritus
    edited May 2009
    bwahahaha

    what timing

    thanks, man, I appreciate the effort. I ended up getting the thing working great, and even figured out how to link the control for the parts up to sliders to make my life a hell of a lot easier. I ended up working with one of my professors on it for a few hours.

    Rankenphile on
    8406wWN.png
  • valerycevaleryce Registered User regular
    edited May 2009
    You're a digipen student aren't you? :)

    The answer is in the wire parameters. I got beaten to the punch by frosty, but that's basically what you need to do. If you have any 3Ds questions feel free to PM me, or ask one of us upperclassman on campus.

    valeryce on
    Art Blog!
    I like drawing, cartoons, cookies, and shiny pointy objects.
This discussion has been closed.