{"id":121,"date":"2014-03-27T00:14:07","date_gmt":"2014-03-27T07:14:07","guid":{"rendered":"http:\/\/www.davidcorral.com\/?page_id=121"},"modified":"2021-11-03T19:16:26","modified_gmt":"2021-11-04T02:16:26","slug":"house-of-cards","status":"publish","type":"page","link":"http:\/\/www.davidcorral.com\/?page_id=121","title":{"rendered":"House of Cards"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Test done with the Radiohead&#8217;s clip &#8216;House of Cards&#8217;. I wrote a python script to import the Cvs data into Houdini which imports point position and intensity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are interested to do some experiments with the data, you can find the project here:<br><a href=\"http:\/\/http:\/\/code.google.com\/creative\/radiohead\/\">http:\/\/code.google.com\/creative\/radiohead\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First test using a particleFluidSurface&nbsp;SOP node to create a mesh on the point cloud data:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-vimeo wp-block-embed-vimeo wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\" style=\"text-align: center;\">\n<iframe loading=\"lazy\" title=\"House of Cards Test1\" src=\"https:\/\/player.vimeo.com\/video\/21334136?dnt=1&amp;app_id=122963\" width=\"424\" height=\"320\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Playblast from viewport showing the point colors in action.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-vimeo wp-block-embed-vimeo wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\" style=\"text-align: center;\">\n<iframe loading=\"lazy\" title=\"House of Cards Test2\" src=\"https:\/\/player.vimeo.com\/video\/21334261?dnt=1&amp;app_id=122963\" width=\"500\" height=\"422\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Final test, using some random techniques:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-vimeo wp-block-embed-vimeo wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\" style=\"text-align: center;\">\n<iframe loading=\"lazy\" title=\"House of Cards\" src=\"https:\/\/player.vimeo.com\/video\/9198820?dnt=1&amp;app_id=122963\" width=\"500\" height=\"400\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This is the code I wrote to import the point cloud data into Houdini, nothing fancy, but it can give you a good start point.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import hou\n\npath = \"D:\\shared\\HoC\\HoC_AnimationData\\\\\"\ngeoNode = hou.node('\/obj').createNode('geo')\n\n#\n# Get Data from csv\n#\nfor i in range(1,2102):\n\nf = open(path + str(i) + \".csv\")\n\n# get info\nposition = &#91;]\nfor line in f:\ninfo=line.split(\",\")\nt = info&#91;3].replace(\"\\n\",\"\")\nposition.append((info&#91;0],info&#91;1],info&#91;2],t))\n\n# close file\nf.close()\n\n#\n# Create add node\n#\naddNode = geoNode.createNode(\"add\")\naddNode.parm('points').set(len(position))\n\n#\n# Set data to add node\n#\nfor p in range(len(position)):\n\n# active point\naddNode.parm( \"usept%s\" % p).set(1)\n\n# position\naddNode.parm( \"pt%sx\" % p ).set(position&#91;p]&#91;0])\naddNode.parm( \"pt%sy\" % p ).set(position&#91;p]&#91;1])\naddNode.parm( \"pt%sz\" % p ).set(position&#91;p]&#91;2])\n\n# intensity\ncolor = position&#91;p]&#91;3]\/100.0\naddNode.parm( \"weight%s\" % p ).set(color)\n\n# save geometry\nhou.node(addNode.path()).geometry().saveToFile( path + str(i) + \".bgeo\")\n\n# delete geometry\naddNode.destroy()\ngeoNode.destroy()\n\n&#91;\/python]<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Test done with the Radiohead&#8217;s clip &#8216;House of Cards&#8217;. I wrote a python script to import the Cvs data into Houdini which imports point position and intensity. If you are interested to do some experiments with the data, you can find the project here:http:\/\/code.google.com\/creative\/radiohead\/ First test using a particleFluidSurface&nbsp;SOP node to create a mesh on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":21,"parent":13,"menu_order":13,"comment_status":"open","ping_status":"open","template":"full-width.php","meta":{"footnotes":""},"class_list":["post-121","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"http:\/\/www.davidcorral.com\/index.php?rest_route=\/wp\/v2\/pages\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.davidcorral.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.davidcorral.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.davidcorral.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.davidcorral.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=121"}],"version-history":[{"count":0,"href":"http:\/\/www.davidcorral.com\/index.php?rest_route=\/wp\/v2\/pages\/121\/revisions"}],"up":[{"embeddable":true,"href":"http:\/\/www.davidcorral.com\/index.php?rest_route=\/wp\/v2\/pages\/13"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.davidcorral.com\/index.php?rest_route=\/wp\/v2\/media\/21"}],"wp:attachment":[{"href":"http:\/\/www.davidcorral.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}