[Sidefx-houdini-list] H16 Constraint behavior

Guillaume Laferriere guillaume at sidefx.com
Wed Nov 15 12:56:10 EST 2017


Hi Olivier,
(I'm reposting my answer because it had an attachment...)

Here's a scene that might give you a solution to your problem.
https://drive.google.com/file/d/1fG8OBAI_fx43og8CJSV00DWKe8Dr7eLd/view

It uses constraints, but it also exports back the local rotations on the
object.
tube_object1 is setup in a dual fashion, where it uses the CHOP exports
when the constraints_on toggle is off and fallback on the applied
constraint when it is on.

I made two hda's to ease the fetch and export rotation constraints.
If you dive in /obj/tube_object1/constraints/local_rotate_constraint,
you'll see the juggling that is needed to extract a worldspace matrix
without pulling the local rotation parameter.

/obj/tube_object1/constraints/export_local_rotation, shows you how to get a
local matrix from a world matrix and the inverted (parent transform *
pretransform) matrix.
Having a local matrix, you can now use a CHOP export to drive local
parameters.

/obj/tube_object2/constraints, shows the original setup entirely done with
constraints.

I had to resort to a trick to be able to get a local rotation controller.
The end goal of constraints is to offer the posibility to use local
transform parameters without adding an extra controller but it isn't
currently possible in H16.0.
You need to add a HOOK object to fetch the world transform you want as a
parent, and then add a child rotation controller. This is needed to have
the object level viewport manipulator behave properly.
Then you add a CHOP_Transform node with parameter expressions on the
rotation.

Guillaume Laferriere


More information about the Sidefx-houdini-list mailing list