Create a ticket

Q100357: Transforming constrained objects in Katana


When constraining an object to a target, the user 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.

This article will explain how you can still transform the constrained object and illustrate the setup via an example Katana project. 



In the attached example project, we demonstrate a constrain 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 which 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 any more 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:



This will allow you to transform the constrained object, and attached you can find the example Katana project which demonstrates this setup.

Was this article helpful?
0 out of 0 found this helpful