Hi there,
We use Houdini's .clip file format as our standard for exported cameras, and have a number of minor plugins to handle this format for importing and exporting into other 3d packages. For the most part, our cameras only ever come from matchmoving software or from the animation package (in this case XSI) but I'm trying to create a simple OTL in the rare event that a camera has been animated in Houdini, and needs to be exported as a .clip.
Fetching the data channels (tx,ty,tz,rx,ry,rz,aspect,aperture,focal,resx,resy) and calling opsave to write out the .clip is simplicity itself, but fails in the case of a camera which is animated along a path, or has a Look At specified, due to the transformation information not being present in the data channels.
What is the simplest method for extracting the actual internal transformation of a camera, in the case that this information is not present in the t,r channels? I've tried searching the HOM documentation, to no avail, but I'm not discounting that I might just not be seeing what is in fact there.
Thanks in advance.
Exporting Pathed Cameras
4728 5 0- Darric
- Member
- 31 posts
- Joined: Jan. 2007
- Offline
- AndrewVK
- Member
- 136 posts
- Joined: July 2005
- Offline
- graham
- Member
- 1908 posts
- Joined: Nov. 2006
- Offline
As well as extracting the raw transforms using HOM, you could use an Object chop set to calculate Position and Rotation of your camera. Take a look at the attached file.
When using HOM to get the actual values, you can actually do the following since the results of the extracted transforms are just hou.Vectors3 and can be accessed like standard list type objects without having to explicitly call the __getitem__ function.
obj = hou.node(“/obj/cam1”)
wtm = obj.worldTransform()
tx, ty, tz = wtm.extractTranslates()
rx, ry, rz = wtm.extractRotates()
However, as Edward pointed our below and I neglected to mention, using HOM really isn't going to get you much in the case of outputting your information to a clip file so using CHOPs is the best way to go.
When using HOM to get the actual values, you can actually do the following since the results of the extracted transforms are just hou.Vectors3 and can be accessed like standard list type objects without having to explicitly call the __getitem__ function.
obj = hou.node(“/obj/cam1”)
wtm = obj.worldTransform()
tx, ty, tz = wtm.extractTranslates()
rx, ry, rz = wtm.extractRotates()
However, as Edward pointed our below and I neglected to mention, using HOM really isn't going to get you much in the case of outputting your information to a clip file so using CHOPs is the best way to go.
Edited by - Jan. 16, 2009 10:43:31
Graham Thompson, Technical Artist @ Rockstar Games
- edward
- Member
- 7725 posts
- Joined: July 2005
- Online
- Darric
- Member
- 31 posts
- Joined: Jan. 2007
- Offline
- Darric
- Member
- 31 posts
- Joined: Jan. 2007
- Offline
-
- Quick Links