Siobhan Maracle
  • About Me
  • Work
    • Rigging
    • Animation
  • Projects
  • Blog

Attach object to curve using pointOnCurveInfo nodes - from Zeth Willie

9/4/2018

 
This has been taken from a tutorial by Zeth Willie. I can't recommend his tutorials enough, seriously go check them out. He has a wonderful way of explaining things and he really goes in depth into topics.

He explains that this particular way of attaching an object to a curve is a less chunky way than the more well known 'attach to motion path'.

  • Create a curve, you will probably need to rebuild curve so that the U value goes between 0 and 1. Pretty useful for later.
  • Make an empty pointOnCurveInfo node using 'shadingNode -asUtility pointOnCurveInfo -n "myName". Obviously name it whatever you want.
  • Open connection editor. Load the shape node of the curve into the left and the pointOnCurveInfo node into the right.
  • Connect worldSpace to inputCurve.
  • Then load up the pointOnCurveInfo into the left and the object you're trying to attach intot he right side.
  • Connect result.position to translate.
Voila.

Maya/Rigging: Attaching objects to a curve (using pointOnCurveInfo node) from zeth willie on Vimeo.

Rigging Efficiency

7/4/2018

 
Motion Paths
For some reason, Maya makes an addDoubleLinear when you attach an object to a motion path, and it connects it in a way that causes a cyclic dependency. You don't actually need this addDoubleLinear node.
To get rid of it you can shift+MMD the motion path node and the node of the object that's attached to the motion path, this will open up the Connection Editor. On the motion path node side, expand 'allCoordinates' and on the constrained node expand 'translate'. Now connect the 'xCoordinate' from the left to the 'translateX' on the right. Do the same for Y and Z. Now you can delete the addDoubleLinear node.
Skinning
Make sure to remove unused influences, limit max influences and prune small influences to improve rig performance.
Profiler
The profiler can locate performance bottlenecks in your scene by recording and demonstrating in a graph the amount of time that each process consumes.

Useful Tips, Scripts and Formulae

7/4/2018

 
  • If you ever see FBXASC### somewhere in your Maya files, that's just Maya's way of dealing with characters that it can't understand. FBXASC032 represents a [space], for example. So far I've only encountered these when bringing in meshes from 3ds Max.
  • Not sure about this, needs testing. But you can make 'left' and 'right' namespaces. Then name all your joints the same, but put them under the appropriate namespace. In theory this would make mirroring easier.
  • Tear off a persp view when skinning and set it to Legacy High Quality Viewport, this will let you see the textures on the mesh, great for checking stretching.
  • Hold shift+MMD from one node to another in the hypergraph and it'll open up the Connection Editor straight away.
Script (mel)
Description
parent -r -s
Used to parent a shape node to another object
arclen -ch 1
Gives you a curveinfo node where you can find the length of a nurbs curve or spline ik curve.
string $stuff[] = `ls -sl`;

int $numbjoints = `size($stuff)`;
​
print("Number of objects selected: "+ $numbjoints +"\n");
Select objects then run this script. It'll count the number of objects you have selected. So works with most things, not just joints.
I currently use it to count the number of joints going into engine. I make a set called 'joint counter' or something, make sure all joints are there. When I add new ones, I add them to the set. Then I can just select all set members and run the script.
import maya.cmds as cmds

viewport = cmds.getPanel(wf = True)

if cmds.modelEditor(viewport, q = True, nc = False) == False:
     cmds.modelEditor(viewport, e = True, m = True,  alo = True)

else:

     cmds.modelEditor(viewport, e = True, m = False, alo = False)
     cmds.modelEditor(viewport, e = True, pm = True)
This script was put together by Jack Plummer during his time at Automaton.

Assign this to Alt+1 'On Press' in Maya's hotkey editor.
This will hide everything but the geometry in your scene on the first press, and then show everything on your second press.
​Good for previewing animation quickly without clutter.
shadingNode -asUtility pointOnCurveInfo -n "myName"
Will create a pointOnCurveInfo node called myName and adds it to the utilities tab in the hypershade. makes it easier to find.
dagPose -reset -name bindPose1
This will reset the bindpose on any given joint, you can select multiple joints if you wish.

Select the joint you with to affect, move it to your new desired bind pose. With it still selected, enter the script into the mel command line at the bottom, change 'bindPose1' to whatever the appropriate bind pose is and hit enter. The geometry should stay where it needs to be and the joint has assumed a new bind pose.
​dagPose -bindPose -save
Select the skeleton and enter this command, it will save a new bind pose for your skeleton.

If you find you have too many bind poses, and you just want one, it can be useful to delete the ones that are there and then run this.
setAttr "nurbsCircleShape1.isHistoricallyInteresting​" 0;
Can use this to make shape nodes disappear from the Channel Box. Particularly useful when you need to combine curves to make a control but don't want all the clutter.

The shape nodes are still visible in the outliner.
lockNode -lock off sphere1;
Sometimes you encounter locked nodes in rigs that restrict what you can do with them. Use this to unlock them at your own risk, ha!
import maya.cmds as cmds
import pymel.core as pm

# Get the panel
pan = pm.getPanel(withFocus=True)

# Add selected to panel
cmds.isolateSelect(pan, addSelected=True)
Just added this to my custom shelf. It adds whatever you've selected to the current 'isolate selected' view you have open.

​It's easy to make this also remove elements from your isolate selected by changing 'addSelected' to 'removeSelected'.
​Formula
​Description
a^2 + b^2 = c^2
Pythagoras Theorem (right angled triangles)
Useful for figuring out root motion for moving diagonally.
Forward>>

    What Is This?

    So this is a collection of things I've learned as I progress in rigging and animation. I just like to keep a note of things here so I can find things easily later.

    Does this all belong to you?

    Some things are things that I've figured out, but there's a great deal of tutorials and knowledge that I've found from perusing the internet. I've tried to give credit where it's due.

    Archives

    June 2019
    May 2019
    August 2018
    April 2018

    Categories

    All

    RSS Feed

Picture
siobhan.maracle@gmail.com