House of Cards

Posted by on Mar 10, 2007 in Uncategorized | Comments Off on House of Cards

Test done with the Radiohead’s clip ‘House of Cards’. I wrote a python script to import the Cvs data into Houdini. It 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 SOP node to create a mesh on the point cloud data:

[vimeo width=”460″ height=”342″]http://www.vimeo.com/21334136[/vimeo]

 

Playblast from viewport showing the point colors in action.

[vimeo width=”460″ height=”342″]http://www.vimeo.com/21334261[/vimeo]

 

Final test, using some random techniques:

[vimeo width=”460″ height=”342″]http://www.vimeo.com/9198820[/vimeo]

 

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.
[python]

import hou

path = “D:\shared\HoC\HoC_AnimationData\\”
geoNode = hou.node(‘/obj’).createNode(‘geo’)

for i in range(1,2102):#2101
f = open(path + str(i) + “.csv”)

#get info
position = []
for line in f:
info=line.split(“,”)
t = info[3].replace(“\n”,””)
position.append((info[0],info[1],info[2],t))

f.close()

#create add node
addNode = geoNode.createNode(“add”)
addNode.parm(‘points’).set(len(position))

#set add node
for p in range(len(position)):
#active point
addNode.parm(“usept” + str(p)).set(1)

#position
addNode.parm(“pt” + str(p) + “x”).set(position[p][0])
addNode.parm(“pt” + str(p) + “y”).set(position[p][1])
addNode.parm(“pt” + str(p) + “z”).set(position[p][2])

#intensity
color = float(position[p][3])/100
addNode.parm(“weight” + str(p)).set(color)

#save geometry
hou.node(addNode.path()).geometry().saveToFile(path + str(i) + “.bgeo”)
#delete geometry
addNode.destroy()
geoNode.destroy()
[/python]