[Sidefx-houdini-list] camera Rotation and Translate to Matrix3

Graham Thompson 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 :(
>
> thanks
>
>
>
>
>  *.:varomix:.*
> MIX Studio
> Houdini Wizard *<|:)
> www.varomix.net
>   : [image: LinkedIn] <http://www.linkedin.com/in/varomix> [image:
> Twitter]<http://twitter.com/varomix> [image:
> Facebook] <http://www.facebook.com/varomix> [image:
> about.me]<http://about.me/varomix>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list



More information about the Sidefx-houdini-list mailing list