Rigging

Rigging101 » Rigging128

Utility Node Tutorial (10 posts)

About This Topic

Tags

No tags yet.

  1. greatbear

    offline
    Member
    Posted 8 years ago
    #

    Hi!

    I've been working through the utility node tutorial (http://www.rigging101.com/free/utilitynodes/index.htm), and hit a bit of a snag on the second exercise...(pCube.translateX = (pBall.translateY * 1.5) + (pBall.translateZ / 2)

    The bit where it says "Connect the outputX of the nodeMultiply to the input1D[n]/[0]" has me at a loss - when I try to do this, there is no "input1D[n]/[0]", only "input1D[0]".

    I've had a look around on other forums, and tried copying and pasting the MEL script from the first operation, changing the [0] to [1]; which I thought had worked, but when I come to move pball, the cube moves also but not the way the equation states.

    I'm running Maya 2009, on a pc. If anyone has any ideas, please let me know.

    Cheers!!

    GB

  2. Javier "Goosh" Solsona (admin)

    offline
    Key Master
    Posted 8 years ago
    #

    Mmn... can't recall too much since it was a looooooong time ago that I wrote that.

    Could be something different from an older version of Maya? though it does seem strange

    I would say it's more like input1D[0]
    I think that should do it

    Javier

  3. greatbear

    offline
    Member
    Posted 8 years ago
    #

    Thanks Javier!

    I have tried using input1D[0], but when I try and connect the second Multiply Divide node to the +/-Average node it just replaces the first connection, so you can't have two connections - strange because you need at least 2 values to add subtract or average them.

    I wonder if there's anyone attempting this tutorial on Maya 2009, whose encountered this problem - could it be a bug??

    Cheers

    GB

  4. kwilli30

    offline
    Member
    Posted 8 years ago
    #

    The nodes work, the bug is in the display of the attributes. They don't show up in the connection editor or the attribute editor until they are connected. Stupid, I know, but easily solved.

    the MEL should be something like:

    connectAttr -f multiplyDivide1.outputX plusMinusAverage1.input1D[0];
    connectAttr -f multiplyDivide2.outputX plusMinusAverage1.input1D[1];

    Taking care that those are the appropriate names of all the objects and attributes. For simplicities sake, I'm not bother with variables.

    You'll know it worked because the input1D[0] and input1D[1] attributes will show up in the attribute editor, and the connection will be visible as a blue line in the hypergraph.

    p.s. - you can add as many values to the plusMinusAverage node as you want, just plug them into different slots.

    connectAttr -f multiplyDivide1.outputX plusMinusAverage1.input1D[0];
    connectAttr -f multiplyDivide2.outputX plusMinusAverage1.input1D[1];
    connectAttr -f multiplyDivide1.outputY plusMinusAverage1.input1D[2];
    connectAttr -f multiplyDivide2.outputY plusMinusAverage1.input1D[3];

    will add, subtract, or average all four values together.

  5. Javier "Goosh" Solsona (admin)

    offline
    Key Master
    Posted 8 years ago
    #

    Yeah.. I think I mainly did this with MEL

    There is a way to do the connections directly, I've done it before. But MEL is so much easier that I always ended up doing that

  6. greatbear

    offline
    Member
    Posted 8 years ago
    #

    Nice one, cheers guys - i'll give that a whirl!

  7. sim.On

    offline
    Member
    Posted 8 years ago
    #

    hey greatbear,

    i usually connect all the "plusMinusAverage"-nodes in MEL . most of the rest is usually easy to connect in the connectionEditor .

    -------------
    input1D is for adding "single values"

    e.g.

    when you use input3D you can connect a complete "translation" or "rotation" into it
    and you can add as many inputs into this chain - so it is not limited to 2 inputs ( thats the case , when you are using "multiplyDivide" . if you want to multiply (e.g.) 3 inputs , than you would have to create 2 multiplyDivide Nodes . first multiply the first 2 inputs , and in the second step multiply the output of the first multiplication , with the third input value - in order to get a multiplication for 3 inputs.

    the +/-average can handle infinite inputs - so you would just need one +/-average to add 3 inputs .

    e.g.

    createNode plusMinusAverage -n "myPlus";

    // create 4 cubes
    polyCube -n "inCube1";polyCube -n "inCube2";polyCube -n "inCube3";polyCube -n "inCube4";

    // connect the translation into the +/-average
    connectAttr -f "inCube1.t" "myPlus.input3D[0]";
    connectAttr -f "inCube2.t" "myPlus.input3D[1]";
    connectAttr -f "inCube3.t" "myPlus.input3D[2]";
    connectAttr -f "inCube4.t" "myPlus.input3D[3]";

    //create an output cube , which will have as translation the addition of all 4 input-cubes
    polyCube -n "outCube";
    connectAttr -f "myPlus.output3D" "outCube.t" ;

    ---------------
    PS:
    if you only want to add 2 single values , you can also use "createNode addDoubleLinear;" , or multiply "createNode multDoubleLinear;" , but unfortunately there is no "divDoubleLinear" or "subtractDobleLinear" .

  8. akshita

    offline
    Member
    Posted 8 years ago
    #

    i would be very thankfull if someone plz help me with tutorials on multiply divide node and simple ways to use it...since m new to it,finding it difficult to understand

  9. Javier "Goosh" Solsona (admin)

    offline
    Key Master
    Posted 8 years ago
    #

    Check out the utility notes tutorial on rigging101.com

    http://www.rigging101.com/free/utilitynodes/index.htm

    Hope that helps

    Javier

  10. VerteX

    offline
    Member
    Posted 7 years ago
    #

    so what if i want to do (pBall.translateY = pBall.translateY * 2)
    How can i solve that in hypershade ? without take cycle error.

Reply

You must log in to post.

Rigging101 » Rigging128
1,099 posts in 307 topics over 110 months by 188 of 8,226 members. Latest: fashionpvp, d2q4p5z2j, gasheldonl