matching a sheared maya camera

   2778   4   0
User Avatar
Member
120 posts
Joined: Feb. 2008
Offline
I need to exactly match a camera from Maya in which the shear parameter on the camera has been modified. This results in the rendered image being stretched and tilted a certain way. Is there any way to force shearing of a transformation matrix in the obj context at all?

Are there any workarounds I could use, like maybe manually setting a pretransform with a scripting command? Is it doable in the HDK? I looked through the help but didn't find anything except a sentence stating that Houdini does not allow shearing in obj parameters.
User Avatar
Member
7743 posts
Joined: July 2005
Offline
I think using the pretransform is probably the easiest workaround. Assuming you have no parent for the camera, you can just use the xform mel command to get the world matrix and then set that using hou.ObjNode.setPreTransform() in Houdini.
User Avatar
Member
120 posts
Joined: Feb. 2008
Offline
Thanks Edward, that worked.
Is it possible to have an animated pretransform? or would I need to rig up a scripting solution for that as well?
User Avatar
Member
7743 posts
Joined: July 2005
Offline
If you need it to animate, then you will probably need to script it as a custom Python Object. Then you can directly set the parm transform with your matrix containing shears from Maya. FWIW, this won't be a problem in the next major Houdini release.
User Avatar
Member
120 posts
Joined: Feb. 2008
Offline
Thanks, sounds excellent.
  • Quick Links