collect the translation of an object which follow a curve?

   877   2   1
User Avatar
Member
3 posts
Joined: Nov. 2019
Offline
Hello!
I am working an a project which involves collecting the coordinates of an animated camera foreach frame. For this I use HOM in the python shell. I succeeded the collecting of coordinates for a camera which is animated by keyframe (in Houdini we can see the translation coordinates envolving in the parameters window when we launch the animation) but I don't see how I can collect these coordinates when the camera follow a curve (with the Follow Path tool). In this case the coordinates of my camera aren't modified when i launch the animation.
How can I collect these coordinates?:/

Thank you for your help.
User Avatar
Member
172 posts
Joined: Jan. 2014
Offline
It's like you parented you camera. Now you have to convert your camera coordinates to the world coordinates like this.
### Calculate World Pos ###

node = hou.node('./your/camera/path')
m = node.worldTransform() ## world transforms
trs = m.extractTranslates('srt') ## translates
rot = m.extractRotates('srt', 'xyz') ## rotates
I contribute to the beauty of this world
User Avatar
Member
3 posts
Joined: Nov. 2019
Offline
Thank you for your help!
  • Quick Links