MAYA TUTORIAL: Cartoon eyeLid rigging PT2A

Поделиться
HTML-код
  • Опубликовано: 12 окт 2024
  • ИгрыИгры

Комментарии • 24

  • @tonmai_rigging
    @tonmai_rigging 10 месяцев назад +2

    For who doesn't wanna write the script (which is not working for me) ,you can use nearestPointOnCurve node which required two input:
    1) inputCurve( world space from the curve shape )
    2) inPosition (world translate of the locator)
    then you will get the parameter output , copy this parameter to your pointOnCurveInfo node ( do not connect directly ,just copy and paste to avoid a cycle error )

  • @kingskye7110
    @kingskye7110 6 лет назад +1

    wow it`s too later for me to see the video.I found that the command poly edge to curve will helpful for this rigging.u can use this command at beginning and depend on the cvs on the curve. u can make jnt system and loc system. it will ignore the extra script which seem like cpp plug-in (with dag and mfx calssify in it).and very very very thank for sharing this for us.

  • @steakosaurusrex
    @steakosaurusrex 4 года назад

    I'm having trouble with getUParam as downloaded from the tinyurl link. After creating my curve and running the example to the point where we print u, I'm getting numbers in the range of 1.575 to 1.595 instead of nice round larger numbers I see in the video. I've followed the tutorial very closely. Any thoughts on what might be wrong? Also, the result when trying to connect the locators to the pci nodes is all the locators go to some wrong place down near the origin of the scene.

    • @steakosaurusrex
      @steakosaurusrex 4 года назад +2

      Don't you love figuring the answer out right after you give in to posting the question... For anyone else who might come across this problem: I am working in an existing scene in which curveShape1 already existed from one of the other tech artists. When I created this curve following the tutorial, the shape name was different.

    • @MarcoGiordanoTD
      @MarcoGiordanoTD  4 года назад

      @@steakosaurusrex yes ideally you would not use an hardcoded name but would find the right shape with different means, like for example the selection or letting the user select the curve with a UI

    • @steakosaurusrex
      @steakosaurusrex 4 года назад +1

      Yep. Eventually I'm going to script all of it, so that won't be an issue. Just while I was following through the tutorial manually was it a problem.

  • @ArcaneBunny
    @ArcaneBunny 8 лет назад +1

    # Error: line 1: NameError: file line 7: name 'getParam' is not defined #

    • @MarcoGiordanoTD
      @MarcoGiordanoTD  8 лет назад +1

      +ArcaneBunny sorry mate in order to follow this tutorial some basic scripting knowledge is needed.

  • @remicolcombet4604
    @remicolcombet4604 2 года назад

    Hello I am trying to recreate this tutorial on a personal project but I cannot identify the origin of this error, can someone help me ?
    The different nodes are well created but refuse to connect to each other :c
    # Warning: Unrecognized node type 'pointOnCurveInfo1'; preserving node information during this session. #
    # Error: RuntimeError: file line 10: The destination attribute 'L_upEyeLidAim15_PCI1.inputCurve' cannot be found. #
    I run this script first :
    from maya import cmds , OpenMaya
    def getUParam( pnt = [], crv = None):
    point = OpenMaya.MPoint(pnt[0],pnt[1],pnt[2])
    curveFn = OpenMaya.MFnNurbsCurve(getDagPath(crv))
    paramUtill=OpenMaya.MScriptUtil()
    paramPtr=paramUtill.asDoublePtr()
    isOnCurve = curveFn.isPointOnCurve(point)
    if isOnCurve == True:

    curveFn.getParamAtPoint(point , paramPtr,0.001,OpenMaya.MSpace.kObject )
    else :
    point = curveFn.closestPoint(point,paramPtr,0.001,OpenMaya.MSpace.kObject)
    curveFn.getParamAtPoint(point , paramPtr,0.001,OpenMaya.MSpace.kObject )

    param = paramUtill.getDouble(paramPtr)
    return param
    def getDagPath( objectName):

    if isinstance(objectName, list)==True:
    oNodeList=[]
    for o in objectName:
    selectionList = OpenMaya.MSelectionList()
    selectionList.add(o)
    oNode = OpenMaya.MDagPath()
    selectionList.getDagPath(0, oNode)
    oNodeList.append(oNode)
    return oNodeList
    else:
    selectionList = OpenMaya.MSelectionList()
    selectionList.add(objectName)
    oNode = OpenMaya.MDagPath()
    selectionList.getDagPath(0, oNode)
    return oNode
    ### then this one ######
    from maya import cmds , OpenMaya
    sel = cmds.ls(sl =1 )
    crv = "L_downLidHigh_CRVShape"
    for s in sel :
    pos = cmds.xform(s , q = 1 , ws = 1 , t = 1)
    u = getUParam(pos , crv)
    name = s.replace ("_LOC" , "_PCI")
    pci = cmds.createNode("pointOnCurveInfo1" , n = name)
    cmds.connectAttr(crv + '.worldSpace' , pci + '.inputCurve')
    cmds.setAttr(pci + '.parameter' , u )
    cmds.connectAttr( pci + '.position' , s + '.t')
    # Warning: Unrecognized node type 'pointOnCurveInfo1'; preserving node information during this session. #
    # Error: RuntimeError: file line 10: The destination attribute 'L_upEyeLidAim15_PCI1.inputCurve' cannot be found. #
    Thanks you.

    • @remicolcombet4604
      @remicolcombet4604 2 года назад +1

      okey i found a fixe for maya 2022
      Add this at the beginning just to be sure
      import maya.api.OpenMaya as om
      import maya.cmds as cmds
      And
      and pay attention on node name pointOnCurveInfo at line :
      pci = cmds.createNode("pointOnCurveInfo" , n = name)
      Thanks for this tutorial !

    • @neeshma
      @neeshma Год назад +1

      @@remicolcombet4604 Hello! I'm getting an "#Error: invalid syntax#". This script used to work fine in an earlier version of Maya but not working in 2022. I tried your steps here, but still getting this error :( . Could you please help?

    • @remicolcombet4604
      @remicolcombet4604 Год назад +1

      @@neeshma Hi yes I can help you , I haven't used this script for a while. From memory, the method I wrote in this comment worked for 2022.3 or 2022.2.
      I have a lot of work at the moment I don't think I have time to look before this weekend.
      If I find something I will send you the solution and the explanations !

    • @neeshma
      @neeshma Год назад +1

      @@remicolcombet4604 Thanks so much :)!

    • @remicolcombet4604
      @remicolcombet4604 Год назад

      @@neeshma Hi, I tested it on my side and it works on maya 2022.3. Could you send me the scripts you use on your side ?
      I'm not sure if it's a "#Error: invalid syntax#" which can be caused by forgetting "," or "()".

  • @dragoneelyuu
    @dragoneelyuu 6 лет назад

    will it be fixed when we use the codes at 3:10 master ? "line7" "getparam"

    • @MarcoGiordanoTD
      @MarcoGiordanoTD  6 лет назад +1

      Dragoneel Yuu what needs ti be fixed?

    • @dragoneelyuu
      @dragoneelyuu 6 лет назад

      Getparam is not defined

    • @MarcoGiordanoTD
      @MarcoGiordanoTD  6 лет назад

      are you getting that error :) ? Please if you want people to help you need to provide context and necessary repro steps. In the code that I provide there is not getParam, there is noly getUParam which is the function I provide.

    • @MarcoGiordanoTD
      @MarcoGiordanoTD  6 лет назад

      Also, there is no getParam at the time you linked :)

    • @dragoneelyuu
      @dragoneelyuu 6 лет назад +1

      Master. i just did what u did but i took this error which is line7 getParam is not defined like the other guy . And yes i dont know about python code things but it could be nice if i fixed getparam define problem to contunie to your 2b part master :D i dont know the other ways to create eyelid