[Sidefx-houdini-list] camera Rotation and Translate to Matrix3
captainhammy at gmail.com
Mon Jul 9 12:24:19 EDT 2012
You can get a camera's transform matrix by using hou.ObjNode.worldTransform().
>>> wt = hou.node('/obj/cam1').worldTransform()
Your translations can only be expressed in a 4x4 matrix, or a simple tuple.
>From the world transform you can build a translation matrix from the
extracted translation values.
>>> t = wt.extractTranslates()
>>> trans = hou.hmath.buildTranslate(t)
Rotations are a 3x3 though and can be accessed directly.
>>> rot = wt.extractRotationMatrix3()
On Mon, Jul 9, 2012 at 8:42 AM, Alvaro Castaneda <varomix at gmail.com> wrote:
> HI guys
> I need help with this
> I need to extract the translate and rotate of my camera, objects also I
> guess, and build
> that into a 3x3 matrix.
> help :(
> MIX Studio
> Houdini Wizard *<|:)
> : [image: LinkedIn] <http://www.linkedin.com/in/varomix> [image:
> Twitter]<http://twitter.com/varomix> [image:
> Facebook] <http://www.facebook.com/varomix> [image:
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
More information about the Sidefx-houdini-list