prPairBlend

prpairBlendNode Plug-in for Maya

download

Introduction

The prPairBlend plugin is a tool that is developed for Maya by Mohammad Jafarian and designed to address the challenges of using rotation values as drivers for blendshape targets or set-driven keys in Maya. Unlike translation parameters, rotation values are interdependent, making it difficult to achieve consistent results when manipulating rotations. The prPairBlend plugin provides a solution by offering a node that takes rotation values and rotation order as inputs and outputs Euler angle rotations with a locked twist and blends attribute-controlled angled weight. This simplifies the process of managing rotations and allows for precise control.

Features

  • Supports rotation values as drivers for blendshape targets or set-driven keys.
  • Produces a new rotation within a locked twist for consistent results.
  • Control of output rotation values through a blend attribute.
  • Additional outputs for directional movement based on the rotation, no need for set-driven keys or SetRanges
  • generating secondary motion based on rotation values
  • Decomposes the Euler angle rotation of a bone into three independent angles: twist, vertical, and horizontal.

Input Parameters

  • inRotation: The driver’s joint’s X, Y, and Z rotation values.
  • rotationOrder:The driver’s joint’s rotation order.
  • Blend: Determines the influence of the input rotation on the driven object.
  • Intensity: Overall translation strength generated by input rotation for support joints in all directions.
  • Roll & Yaw & Pitch: Decomposes the Euler angle rotation of the driver’s joint into three independent angles: twist, vertical and horizontal bend.
  • start Frame: Determines the frame at which the spring effect should be enabled.
  • spring Intensity: Controls the overall effect of the spring.
  • spring Stiffness: Determines the rigidity of the spring effect.
  • Spring Damping: Dampens the spring effect, with higher values causing the spring to settle faster.

OUTPUT PARAMETERS

  • outRotation: output rotation should be connected to the input rotation of the driven joint
  • Forward & Backward & Upward & Downward: the translation value generated by input rotation for support joints in each direction.
  • Roll & Yaw & Pitch: Decomposes the Euler angle rotation of the driver’s joint into three independent angles: twist, vertical and horizontal bend.
  • tySpring: spring output value for translateY of driven joints
  • tzSpring: spring output value for translateZ of driven joints

License

prPairBlend is under the terms of the MIT License

Copyright (C) 2017-2023 Mohammad Jafarian

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Installation

  1. Download the plugin files.
  2. Drag and drop the dragDropInstaller.py file into the Maya viewport.
  3. A new menu called “Perseus” will appear in the Maya Menu. If you don’t see this menu, ensure that “perseus” is enabled in the plugin manager.

Usage

Select a joint, then under prRigTools Menu, click on the AddSupportJnts

Spring Joint

To create custom rigs using the prPairBlend by Python, follow the steps below:

1. helper joint &support joints

import maya.cmds as cmds
cmds.joint(n='joint1',p=(0, 12.212644, -0.574713))
cmds.joint(n='joint2',p=(0, 12.136015, -4.482759))
cmds.joint('joint1', sao='yup', zso=1, e=1, oj='xyz')
cmds.joint(n='joint3',p=(0, 8.898467, -8.524904))
cmds.joint('joint2', sao='yup', zso=1, e=1, oj='xyz')
cmds.select('joint2',r=1)
cmds.prSupportJnts()
cmds.select('joint2',r=1)

# Add additional mirror joint-> for ex. elbow
cmds.select('joint2_upward',r=1)
cmds.prMirrorSupportJnts()

2. Helper joint

import maya.cmds as cmds
cmds.joint(n='joint1',p=(0, 12.212644, -0.574713))
cmds.joint(n='joint2',p=(0, 12.136015, -4.482759))
cmds.joint('joint1', sao='yup', zso=1, e=1, oj='xyz')
cmds.joint(n='joint3',p=(0, 8.898467, -8.524904))
cmds.joint('joint2', sao='yup', zso=1, e=1, oj='xyz')
cmds.joint(n='hlprJoint',p=(0, 0,0))
cmds.parent('hlprJoint','joint1')
cmds.delete(cmds.parentConstraint('joint2','hlprJoint'))
cmds.setAttr("hlprJoint.radius", 10)
pm.setAttr("hlprJoint.overrideEnabled", 1)
pm.setAttr("hlprJoint.overrideColor", 17)
cmds.ToggleLocalRotationAxes()
cmds.select('joint2','hlprJoint',r=1)
cmds.prPairBlend()
cmds.select('joint2',r=1)