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 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 SOP node to create a mesh on the point cloud data:

 

Playblast from viewport showing the point colors in action.

 

Final test, using some random techniques:

 

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.


import hou

path    = "D:\shared\HoC\HoC_AnimationData\\"
geoNode = hou.node('/obj').createNode('geo')

#
# Get Data from csv
#
for i in range(1,2102):

    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))
    
    # close file
    f.close()

    #
    # Create add node
    #
    addNode = geoNode.createNode("add")
    addNode.parm('points').set(len(position))

    #
    # Set data to add node
    #
    for p in range(len(position)):
    
        # active point
        addNode.parm( "usept%s" % p).set(1)

        # position
        addNode.parm( "pt%sx" % p ).set(position[p][0])
        addNode.parm( "pt%sy" % p ).set(position[p][1])
        addNode.parm( "pt%sz" % p ).set(position[p][2])

        # intensity
        color = position[p][3]/100.0
        addNode.parm( "weight%s" % p ).set(color)

    # save geometry
    hou.node(addNode.path()).geometry().saveToFile( path + str(i) + ".bgeo")

    # delete geometry
    addNode.destroy()
    geoNode.destroy()