PyMT – A Python Multi-Touch Framework

pymt demo reel from Thomas Hansen on Vimeo.

With PyMT there is a new kid in town for visual multi-touch interaction frameworks, which is based on the scripting language Python and connects to TUIO producers like the Touchlib, reacTIVision or Touchsmart TUIO.

Currently, the most multi-touch applications seem to be implemented in Flash AS3. Flash is relatively easy to learn, offers great possibilities in interactive 2D animation programming and there seem to be of people that at least can make multi-touch things work in Flash by plugging modules together. Python has not so far been common for interaction or animation but for rapid, high-performance and professional “underneath the hood” server development.

However, when it comes to e.g. 3D interaction or animation of a great lot of 2D objects Flash seems not to be the right choice. For 3D animation there are hacks like Papervision but scenes in Papervision seem to be purely rendered by the CPU in the Flash player and in my opinion they are far away from looking perfect.

PyMT uses many multi-media Python packages to provide possibilities to produce sounds, enable video playback, show images and so on. PyMT makes heavy use of OpenGL and is thus hardware accelerated, which means that you have native 3D support and you can use very snappy OpenGL rendered 2D scenes. However, it offers high-level APIs for the embedding of graphics in OpenGL. Thus, you do not need to fumble around endlessly with textures and texture coordinates. But it goes without saying that you can do so if you like. As PyMT founds on OpenGL it offers an inherent support of hardware shaded content. This means that you can use GLSL vertex and pixel shaders to render custom surfaces in 2D and 3D.

Additionally, PyMT offers a set of multi-touchable GUI elements like buttons and menus.

PyMT installs itself as a Python module and can be tested and used from the IDLE. This means that you can combine it easily with existing Python applications like Django server applications (e.g. the backend from the Pf Design Media Installation).

For more information about the installation of PyMT visit the PyMT installation page or ask in the comments.

Posted in Uncategorized Tagged with: 3d, Multi-Touch, opengl, python