{"id":1055,"date":"2020-03-08T09:15:16","date_gmt":"2020-03-08T09:15:16","guid":{"rendered":"https:\/\/howiem.org\/wordpress\/?p=1055"},"modified":"2020-03-08T09:15:16","modified_gmt":"2020-03-08T09:15:16","slug":"houdini-to-fusion-camera-animation-exporter-script","status":"publish","type":"post","link":"https:\/\/howiem.org\/wordpress\/2020\/03\/08\/houdini-to-fusion-camera-animation-exporter-script\/","title":{"rendered":"Houdini to Fusion camera animation exporter script [U]"},"content":{"rendered":"<p>Send a camera (or other animated object) from Houdini to Fusion. This is a work in progress, but it works, so I figured it&#8217;s worth making available in case anyone&#8217;s desperate. If nothing else it&#8217;s useful example code for anyone trying to export data from Houdini.<!--more--><\/p>\n<h4>To use:<\/h4>\n<ul>\n<li>In Houdini, right click on a Shelf (mebbe make a new shelf if you want to keep things neat) and choose Add Tool&#8230;<\/li>\n<li>Paste the code linked below into the Script Tab of the dialog that pops up. Make sure &#8220;Python&#8221; is selected at the bottom of the dialog, and click Accept.<\/li>\n<\/ul>\n<blockquote><p><strong>Tip:<\/strong> if you&#8217;ve added a new shelf to house this tool, don&#8217;t forget to save your desktop so it&#8217;ll show up automatically in future. If you forget, you can always find your new shelf listed among the others on the right-click-add shelf menu)<\/p><\/blockquote>\n<ul>\n<li>Now you can select any OBJ-level node &#8211; a camera perhaps &#8211; and click your new button. You&#8217;ll know it&#8217;s working if nothing at all seems to happen.<\/li>\n<li>Switch over to Fusion, click somewhere in the Flow panel, and hit Ctrl\/Cmd-V to paste&#8230; ta-da &#8211; you now have a new Camera_3D node, all keyframed up with position and rotation. If it wasn&#8217;t a camera you chose in Houdini, the new Fusion node will instead be a Custom Tool with 6 Number parameters for the position and rotation, which you can then hook up to any other parameters you need in Fusion.<\/li>\n<\/ul>\n<p>Nothing to stop you pasting into a text editor first if you want to see what&#8217;s going to be created.<\/p>\n<h4>Caveats:<\/h4>\n<ul>\n<li>the only animation that&#8217;ll be carried over is rotation and translation\u2014it&#8217;s up to you to set up the rest of the camera parameters correctly (field of view etc). Rotation order should carry across automatically, at least for camera objects.<\/li>\n<li>No Euler wind-up or discontinuity filtering is implemented (yet)<\/li>\n<\/ul>\n<h4>To do:<\/h4>\n<ul>\n<li><del>Euler wind-up (ie dealing with rotations greater than 360\u00b0 without wrapping) <\/del>(Updated!)<del><br \/>\n<\/del><\/li>\n<li><del>Euler discontinuity filtering (so you may get jumps in rotation when the camera swings through an axis &#8211; the gimbal lock thing)<\/del>(Updated!)<del><del><br \/>\n<\/del><\/del><\/li>\n<li>Focus distance animation, aperture and field-of-view settings will be carried across once I get my head round the way Fusion measures them<\/li>\n<li>A bit of error checking would be nice<\/li>\n<li><del>Pruning redundant keyframes (ie where the value doesn&#8217;t change between 3 or more consecutive frames)<\/del>(Updated!)<del><del><br \/>\n<\/del><\/del><\/li>\n<\/ul>\n<p>Link:\u00a0<a class=\"postlink\" href=\"https:\/\/gist.github.com\/howiemnet\/9ab718844ecf66952268addfdbdf4385\">https:\/\/gist.github.com\/howiemnet\/9ab71 &#8230; dfdbdf4385<\/a><\/p>\n<p>Comments \/ corrections \/ suggestions welcome as usual<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Send a camera (or other animated object) from Houdini to Fusion. This is a work in progress, but it works, so I figured it&#8217;s worth making available in case anyone&#8217;s&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":{"0":"post-1055","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-houdini-tips"},"_links":{"self":[{"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/posts\/1055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/comments?post=1055"}],"version-history":[{"count":0,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/posts\/1055\/revisions"}],"wp:attachment":[{"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/media?parent=1055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/categories?post=1055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howiem.org\/wordpress\/wp-json\/wp\/v2\/tags?post=1055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}