3D World

(Sean Pound) #1
Artist q&A
Your CG problems solved

pythOn


If implementing this as part of a Python script you won’t be able to use the ikSpringSolver


command, as this can only be activated using MEL. Instead you can use the following code (see


right) to run a MEL command in Python, so in this case we can evaluate ikSpringSolver.


ExpErt tip


01


WhErE’S thE SOlvEr?
You may be wondering where to find the IK spring solver. As
mentioned, the option isn’t readily available under the IK Handle
tools, so you will need to load it first.
To do this simply execute the following code in the script
editor – ikSpringSolver – simple as that. You will now see the
ikSpringSolver option under the Current Solver drop-down box
inside the IK Handle Tool settings.

02


Apply tO yOur chAin
You can now build your joint chain as you would normally.
To help illustrate the difference between the spring solver and the
standard solvers, temporarily duplicate the skeleton and move it
to one side. On the left apply the standard rotate-plane solver and
on the right, create a spring solver.
If you now raise both IK handles you will see a clear difference.
The spring solver has done a better job of distributing the joints.

03


MOrE cOnfigurAtiOn OptiOnS
At this stage you could leave the solver in its default state,
but there are more options available for you to play around and
experiment with. If you select the spring solver’s IK handle and
open the attribute editor you will notice that a series of new
options have now become available under the IK Spring Solver
Attributes tab. The one we are most interested in here is the
Spring Angle Bias.

04


Spring AnglE biAS
By utilising this option, if you click on the large arrow next
to the ramp a larger version will appear, making it even easier
to adjust and tweak to your liking. Editing this will enable you to
alter the angle between the chain’s joints so that you can make
one section appear stiffer than another. Another option to give
the animators yet more freedom to express themselves when
animating longer joint chains.

StEp by StEp UTiliSe MAyA’S SPriNG SOlVer FOr A CHAiN


import maya.mel as mel
mel.eval(“ikSpringSolver”)
Free download pdf