Home Technical Talk

Wiring Parameters and Custom Attributes

polycounter lvl 17
Offline / Send Message
Sam Hatami polycounter lvl 17
Hey, I'm trying to learn how to do these things. I'm following James Haywood's tutorial (I know its old :p). The thing is that I can't make the wiring work properly. He says he is using a script by Michael Comet (and I'm not).

Ill try to explain my problem with screenshots.

1. I'v created a bone structure with two joints, one point helper and also added a custom attribute called "Curl".

25440490fb6.jpg

2. All the bones have a Float List assigned to their Z-axis rotation controller

39500558xg0.jpg

3. Then I wire the point's custom attribute to the bones, connecting it to the beizer float and writing in that line of code.

84176470fa0.jpg

4. Now to the problems, and this seem to me be different each time I create this bone structure :p. As seen the parent bone has rotated around the z-axis with point custom attribute at zero. the two other bones went nuts and thought life sucked.

93865303ce2.jpg

5. And with the custom attribute changing the parent bone rotates around the z-axis and the rest is nuts.

62981089af0.jpg


Now the point is: Why is this reacting as it is? I maybe started off in the wrong end, but I guess I have to start somewhere :P

Thanks for any comments/suggestions

Replies

  • Mark Dygert
    You might have better luck using the reaction manager, my head explodes anytime I go near the wire parameters dialog box.

    Mostly because the UI is so borked, oh and its a technical rats nest of bugs, but hey if it kind of works lets put it in 3dsmax right? heh
  • Eric Chadwick
    Param Wiring works if you know what you're doing ;)

    Look into what Paul Neale has on his site, he's got some solid material to share, might be easier to follow.
    http://paulneale.com/tutorials.htm
  • Mark Dygert
    True but I'm not a programmer and writting expressions and scrolling and hunting in a tiny tree window (that can not be scaled) is just about as backwards as you can get for an artist.

    Even with a degree in astrophysics from MIT it doesn't solve the UI or the general un-helpfulness of the "help" docs to decipher its cryptic uses in non-programmer-ese. Written for programmers by programmers, bah humbug... Its an artist tool keep that in mind when you make the silly thing...

    "Once you know how to use it, you'll know how to use it"
    ok ... how do I use it?
    "Once you know..."
    Oh hey look reaction manager.

    What artists even knows or can remember what a "Trigonometric Function" is or how to write one? MIght as well be typing sign language into the expressions box.
  • Rick Stirling
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    The max wiring dialogue has always left me cold. I also have to do a good deal of wiring of rollbones.

    Now, depending on how much you like maxscript....

    ...I've written a small function that makes wiring much easier when you are just using one object to drive the rotation of another. Even if this isn't exatcly what you need, you might be able to extract the commands you need.


    To wire one objects rotation to another, you only need to use this command:

    wireroll bonetoroll driverbone x y z

    For example:
    wireRoll $'L Calf Roll' $eTM_LFoot 0.5 0 0

    You can see that I'm wiring a calf roll to foot (using an Expose Transform helper)


    Here is the function

    -- Wire up a Local rotation rollbone given a bone to roll, a controller object and a roll amount per axis.
    -- If any of x, y or z are 0, skip the wiring for that axis (inherits parent rotation)
    fn wireRoll theRollbone theDriver xr yr zr = (
    if xr != 0 then
    (
    controlExp = "Local_Euler_X*" + (xr as string)
    paramWire.connect theDriver.baseObject[#Local_Euler_X] theRollBone.rotation.controller[#X_Rotation] controlexp
    )
    if yr != 0 then
    (
    controlExp = “Local_Euler_Y*” + (yr as string)
    paramWire.connect theDriver.baseObject[#Local_Euler_Y] theRollBone.rotation.controller[#Y_Rotation] controlexp
    )
    if zr != 0 then
    (
    controlExp = “Local_Euler_Z*” + (zr as string)
    paramWire.connect theDriver.baseObject[#Local_Euler_Z] theRollBone.rotation.controller[#Z_Rotation] controlexp
    )
    )


    So, it might be a pain to use script, but I have to the UI for the wiring is a dog.


    Slightly more detail here: http://www.rsart.co.uk/2008/06/18/maxscript-wiring-function-for-rolltwist-bones/
  • Eric Chadwick
    Oooh I got Vig pissed! Heheh. I know, it's a mess. But so is scripting or any quasi-coding system, until you start learning how to use it.

    I used param wiring once to get some text to update on the screen in response to time passing, or somesuch, been awhile.
  • Mark Dygert
    Eric, yea its really hard to get me going...
    I've been up at 4:30am every week to be at work by 5 so I can animate years worth of dialog before deadline, so I'm a peach to be around =P

    I've used it (once) to rig up a facial control board that drove morph targets based on the position of objects. I'm sure it was the expressions I wrote (or lack there of) that caused things to go hay wire at times. That was before I really dove into MaxScript so I was pretty clueless.

    I then discovered reaction manager and never looked back.

    Rick, that example is gold, thanks for taking the time to write it up and explain it. I actually understand your script. Thats a cool way of handling it, once its set up...

    I now return your high-jacked thread, back to you Mr MetalMind.
  • Rick Stirling
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    Vig - no bother!

    I've spent pretty much all the time at work since IV shipped just rewriting all our character scripts - there were dozens and dozens of them with various issues, so it has been good taking the time to improve them, condense, replace, update yadda yadda.
  • Sam Hatami
    Offline / Send Message
    Sam Hatami polycounter lvl 17
    Oh, nice thanks mr Stirling I'll look into it asap, im not very familiar with maxScript (just started today LockAllTransfrom ftw!)

    I guess you are correct though Vig, in a way, since this doesnt seem to be very self explanotory, but in another sense it seem to be the thing I need to use. I wish time was a friend of mine, then I could spend alot more on different types of animation controllers.

    Again, thank you and I don't mind getting "my" thread hi-jacked, it's all good reading all of it
  • e_x
    Offline / Send Message
    e_x polycounter lvl 18
    The wire parameter dialog box has been improved upon in max 2008. Still a bit cumbersome though. The best way I've found to navigate through connections is to open up the 'Schematic View' and turn on the 'Param Wires' display. You can then double click on the purple connections to bring up the parameter wiring dialog box.

    Like Eric said, Paul Neale's website is the best resource for max rigging, outside of the help files. This tutorial might help you out some:

    http://paulneale.com/tutorials/twistBones/twistBones.html
  • Rick Stirling
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    The CG Academy DVDs by Paul are well worth the cash.

    http://www.cg-academy.com/dvds_menu_3dsmax.php?Result=rigging

    I've got the set here.
  • e_x
    Offline / Send Message
    e_x polycounter lvl 18
    I'd also recommend 3d Quakers max rigging dvd.

    http://3dquakers1.com/webroot5/review.php?id=9

    And for maxscript, the help docs that come with 3ds max are good, but CGTalk has a lot of "real-world" examples that can help tremendously.

    http://forums.cgsociety.org/forumdisplay.php?f=98
  • Sam Hatami
    Offline / Send Message
    Sam Hatami polycounter lvl 17
    Well, I tried my hands more at the controllers but they are damn hard to understand, I even tried to understand some scripting but that felt like overkill for what I'm trying to achieve.

    I will hijack my own thread now, no use of starting a new thread about this.

    I've rigged a couple of arms for a game based on doom3/q4 engine. Using der_tons exporter for max I successfully implement the md5mesh and a md5anim into the game. Everything is joy and happiness...until I hit scaling issues. I need to rescale my mesh inside max, however, each time I try this and export into md5mesh it deforms horribly.

    There as has to be a way to rescale the rigged mesh without redoing all the rigging/envelopes?

    Any suggestion will be humbly taken into future acknowledgements on my tomb.

    And thanks to all of you who answered prior to this, you guys are a bunch of encyclopaedias.
Sign In or Register to comment.