Hi guys!
Just to let you know, this year we’re facing an extremely hot summer here in Italy (50 degrees in some cities!), so as you would image sitting all day in front of a screen is getting quite challenging.. nonetheless, I’m still too excited about learning Houdini to stop my researches! This time I picked up an old time classic from the interactive world, the Kinect , and I wanted to push it a little forward. I wanted to import point cloud animations into Houdini, and manipulate them in all the magical ways that this software lets us do.
Exporting .ply from Openframeworks
As a first step, you need to create the point cloud animation by recording the kinect data.
I’m using OpenFrameworks in order to connect with the Kinect and export a binary .ply file for each frame received.
On my github repo you’ll find the code, which is very easy and mostly grabbed online and from the examples of the official library. A .ply file contains a header and a list of x,y,z position for each point. The header structure can be seen from https://en.wikipedia.org/wiki/PLY_(file_format) and the list of points in our case was supplied as stream of bytes (see https://stackoverflow.com/questions/20400128/how-to-write-a-file-byte-by-byte-using-c)).