Q100357: Transforming a constrained object in Katana to allow for further manipulation

Follow

SUMMARY

When you constrain an object to a target, you may want to manipulate the target object after the constraint has been resolved. However, in this case the constrained object will no longer follow any transformations of the target object that are applied downstream of the ConstraintResolve node.

This article will explain how to transform a constrained object and illustrate the setup via an example Katana project. 

 

MORE INFORMATION

In the attached example project, we demonstrate a constraint object setup using a CameraScreenWindowConstraint to constrain a plane to a camera's field of view. When the camera is manipulated after the constraint is resolved, the constrained plane will no longer follow the camera's transformations.

Before the ConstraintResolve node, when viewing the object location at the CameraScreenWindowConstraint node level, the constrained object will display an xform.constraint attribute that references the camera as the constraint target:


​​

After setting the view flag on the ConstraintResolve node, observe that the xform.constraint attribute is resolved to a xform.resolvedConstraint.matrix attribute.
This calculates the transformation that is applied to the constrained object at this point:​​



Any transformation of the target object (i.e. the camera) further downstream in the node graph doesn't have an effect anymore on the constraint, as the matrix has already been calculated and applied by this point.

 

If you would like to transform your constrained object, create a Transform3D node upstream from the ConstraintResolve node, like:

mceclip0.png

This will enable you to manipulate the constrained object. Attached, you can find the example Katana project illustrating this setup.

 

ATTACHMENTS

We're sorry to hear that

Please tell us why