Programming & VR

I've been programming in Python for 10 years now, and so far haven't found a more beautiful language to draw me away from it. Although my official titles at my previous job were "Designer" and "Artistic and Technical Researcher", I spent much of my time (3 years) working on solving complex programming tasks (you can read about that below).  I've been an Open Source developer since 1996, and spent 2 years from 2001 through 2003 focusing on various Open Source projects.  I was a partner in VexTech Corporation for three years where I did closed-source development based on Open Source packages.  I currently run my own small software consultancy.

I have various pieces of documentation which seem to be useful to some people:

There are various modules I've created floating around the web that I haven't bothered to link here, I've contributed to a number of projects including wxPython, win32all and Stackless Python, and generally de-list a module when I no longer see the need to be a distribution point for it (such as when it is incorporated into another project).

OpenSource Software (BSD-style Licenses)

PyOpenGL
I'm the administrator for the "official" Python bindings to the OpenGL library. This is a fairly straightforward wrapper for OpenGL and related libraries, and the work is mostly maintenance and bug-fixing.
OpenGLContext
This project provides a learning environment for new Python OpenGL programmers. It provides a cross-GUI interface abstraction that lets you run the same demonstrations in a number of different GUI libraries.  It also includes fairly extensive VRML97 loading capabilities.
TwistedSNMP
Implementation of SNMP protocol handler for the Twisted networking framework.  Uses PySNMP for the SNMP encoding/decoding.  This code was originally based on a demo/sample by Patrick K. O'Brien, though it doesn't have much of a resemblance to the original code any more.
StarPy
Implementation of Asterisk PBX FastAGI and AMI interfaces for use with Twisted.
SimpleParse
A parser generator for the Python mxTextTools extension. SimpleParse lets you write EBNF grammars for this fast text-scanning Python extension. IBM's Developer Works has posted an article by David Mertz on using SimpleParse 1.0.
PyTable RDBMS Middleware
Originally part of the wxPython Properties Distribution, PyTable is a relational database wrapper based on BasicProperty's rich property-based modelling system.  PyTable provides a "thick" wrapper for PostgreSQL (and MySQL) database adaptors which fills in missing functionality in the adaptor layer to provide a uniform rich external API.
BasicProperty Python 2.2 property classes
This package creates Python 2.2+ descriptors which automate much of the work of creating property-based classes. Provides a framework supporting such things as type and range checking for property objects. Provides automatic storage in the client's dictionary, default values and default functions. Base property classes for a number of common data types are included.
wxOO (formerly wxPython Properties Distribution)
Provides object-oriented controls and events for wxPython.  A set of controls and classes that allow wxPython controls to interact with Python objects, rather than primitive data types (such as strings). Included are object-based drag-and-drop (drops reported as events), object-holding list controls and object-holding wxChoice controls. Also includes the configui sub-project which is trying to create a user-configurable UI similar to what you see in many larger modern application.
ResourcePackage
Mechanism for automatically embedding resources in Python packages particularly for use with wxPython or end-user-targeted Python projects which need reliable cross-platform resource embedding.
RunSnakeRun
GUI utility for viewing HotShot profiles of Python programs.
TTFQuery
Package using FontTools to query (system) TTF fonts for their font style and family information (as well as glyph metrics and outlines).  Also has a minimal framework for creating a font-registry.  This module is also used by OpenGLContext to extract polygonal text outlines for creating 3D OpenGL text.
Python Spelling Construction Set
This is a project to provide a toolkit for constructing spell-check and suggestion engines for (multiple) natural languages using Python. The toolkit allows for plugging in different storages, different phonetic compressors and different normalisers. It is based algorithmically on ASpell (with a few changes to optimise speed with Python). The project is still early in its life-cycle, but it has the basic functionality available.
ConflictSolver
An Open-Source small-office/institutional room scheduling system, ConflictSolver was developed for a local charity that wanted software which would let them see graphically what rooms were booked and when conflicts were created. The users seem to like it quite a lot.
metakitstructure.py
Simple metakit db structure display for Python 2.2.x, gives you a formatted structural tree for a storage/view and all of its sub-elements (including sub-views). Note that this script will add records to 0-length views in order to get access to sub-views. It deletes those records when it's done with the sub-view.
sunriseset.py
Rough calculation of sun rise/set times for given dates and latitude/longitude coordinates. Currently doesn't auto-calculate your timezone, but does most of the other things you'd want. Based on code from the SRRB which, in turn, is based on code from Astronomical Algorithms, by Jean Meeus. This is a new version which now passes the included tests.
toposort.py
Two implementations of topological sort algorithms in Python (one based on Tim Peter's code). These allow you to do dependency resolution by supplying a collection of nodes and the arcs between them. Both report results as lists of generations which can be simultaneously executed.
mcf.vrml
When I was working with VRML code frequently, this was my primary toolbox. Parts of the system date from 1995. At the moment, not working with VRML anymore, so I don't tend to use anything from the toolbox
fibonacci.py
A Python Fibonacci number generator and a printout of fibonacci( 1000000 ) (this takes ~ 30 minutes to calculate with the script). This was just an optimization challenge gone horribly awry.
acrostic.py
Acrostic puzzle finder, searches dictionary for X*X word-sets that spell out across and down as the same set of words. The blog post has an example and a link to downloading the 7x7 solutions from my system's dictionary.

Commercial Software (for VexTech Corporation/Cinemon Inc.)

Most of my work as part of VexTech focussed on one of our joint partnerships, Cinemon Inc (of which I am the CTO). Our first product, Cinemon is a Cable System Monitor, that is, a server which sits in a Cable ISP/Cable Television operator's head-end and monitors the health of the equipment both in the head-end and out in the field.  The system uses TwistedSNMP, PySNMP, PyTable, PostgreSQL and a few other tools to monitor networks of a few thousand or tens of thousands of cable modems to provide early-warning notification of network failures and/or degradation.

I also worked on the VoIP provisioning module for the VIBES ISP billing system, a project on which I continue to work with my new company.

Screenshot of Holodesk Commuicator running my world and avatarCommercial Software (for Tpresence Inc.)

I worked for Tpresence Inc. (A.K.A. VRTelecom) for three years under contract as a designer (one year) and a researcher (two years). The company created a Virtual Reality system for use on Windows desktops using standard hardware. The primary product, Holodesk Communicator, was released in (if memory serves) 1999, and included person-to-person voice chat, three different avatar formats, approximately six background environments, with the ability to use any standard VRML 97 world as a background, and a set of collaborative mechanisms including a shared in-world whiteboard, slide show, file sharing, and avatar-based gesturing (all produced by "in-game" scripting of core functionality provided by the underlying system).

Interactive Objects

VRML 97's event model was horribly broken, especially as implemented in Cosmo Player. The original code for Holodesk (when I arrived at the company) was attempting to use Java-based VRML code with custom-written Java classes for every piece of content (and there was almost no content as a result of the extremely technical requirements for creating it). The Java bindings in Cosmo were so flaky that the system was usable only for a few minutes at a time.

Although technically working as a Designer at the time (charged with optimizing one of the world's geometry), I concluded that there was no way to work with the system as designed. I embarked on a project (with my friend Eric Mason) to completely re-construct the system using certain principles I had discovered in my Thesis work regarding ways of producing robust VRML 97 code (basically an object-oriented approach using VRML prototypes religiously with ECMA-Script as the scripting language). Combined with the exploitation of the Cosmo COM APIs, it was possible for us to produce VR environments with access to specific system services (such as file-sharing) which Eric coded using C++.

We went from a programmer-coded environment (every object was a Java class handling network data-sharing itself, as seen in the only text on the subject at the time (written by my thesis supervisor, incidentally)) to one which could load user-scripted worlds based on an open content standard (Living Worlds). We went from a system that might last for a few minutes at most to one which ran stably for hours. We produced one of the most complete Living Worlds-based systems ever created. Basically, within the limits of the technology available, we produced a cyberspace browser.

The prototypes I produced during this project were still the primary source of interactivity in our worlds 3 years later, with only a tiny number of bugs logged against tens of thousands of lines of unique code running in a fundamentally non-deterministic system and embodying the bulk of the direct user experience. I trained three content developers in my approach to VRML 97 coding, and they were largely able to construct new objects to order without any alteration of the basic prototypes I provided or the services Eric had exposed.

I am very proud of this work, and I think I can say that, along with Eric's masterful coding on the C++ side, it was a significant contribution to the company.

H-Anim Avatar Prototypes for Living Worlds

This project was carried out at the same time as the Interactive Objects project. The original avatar code was based on custom coding throughout the system and provided only the most rudimentary features. I created a set of bridge prototypes which allowed standard H-Anim avatars to be loaded into our new Living Worlds-based system. Eric had a lot of headaches working around the quirks of Living Worlds (poorly specified) Avatar semantics, but he did manage it in the end.

As a bonus, I developed a system for applying action scripts to avatars (eventually including "displacer" actions (an H-Anim term meaning a vertex-interpolation script)) which became one of the most popular features in the system. The ability to use almost any H-Anim avatar provided for a wider choice of avatars, but more importantly, it made it possible for us to have our in-house creators only worry about modelling the avatars. As a note, it also meant that during the VRML99 conference, Holodesk was used to demonstrate a number of H-Anim avatars in live VR worlds.

As another bonus, the avatar system was generic enough to allow the creation of bridge prototypes for three other avatar formats. As a result, it was possible for our users to install custom avatars from other VR systems with full support for their built-in actions.

SkeletonBuilderH|Anim icon by Eric Mason

SkeletonBuilder was originally an in-house tool to allow our designers to produce H|Anim-compliant VRML 97 avatars from the output of 3-D Studio Max, Alias Power Animator and Maya. I developed the primary engine and original interface (using the mcf.vrml library and Python's Tkinter GUI) over a weekend, and that version of the software was used for quite some time within the company.

Later on, as we expanded our operations and wanted external developers to be able to generate content for the Holodesk system, I rewrote the interface to be more compact and professional looking (replacing the Tkinter interface with a wxPython one). This rewritten version of the project was distributed on the content creators' CD.

Living Worlds

I was involved in trying to get the Living Worlds Working Group of the VRML Consortium to improve the Living Worlds specification to be more readily implementable. Eric and I spent a huge amount of time trying to work around and/or fix problems with Living Worlds as we were building Holodesk 1.0, and we wanted other companies to be able to produce content we could use (in a standard format) without that barrier to entry. The Working Group eventually disbanded, abandoning the standard as too complex.

During our work with this committee I proposed a dramatically smaller standard (Fruits of Living Worlds) modelled loosely on the Component Object Model (COM) from Microsoft, but the untimely demise of VRML (VRML largely imploded when the group charged with directing it decided to re-focus on "Web3D", instead of "Cyberspace") made attempts to define a VRML-related standard somewhat pointless.

Portals Next-generation MUTech

Among the projects I undertook during my period as a researcher with Tpresence was the "Portals" Next Generation multi-user technology (MUTech) project. This project attempted to create an entirely distributed interconnection mechanism which would allow huge numbers of computers to participate in the maintenance of a shared/negotiated Virtual Reality environment linked to any number of real world services.

Neat (implemented) features:

I produced and delivered the prototype system three or four months before my contract expired with Tpresence. Unfortunately, no-one had been assigned to work with me to learn the new system. With me leaving and no other MUTech specialist to continue the work, the project was shelved in favour of the original Holodesk Communicator code, the design of which was more familiar to the remaining development team.

From what I understand, the entire Portals project is currently sitting on a backup disk, but is otherwise untouched. This was one of the most disappointing features of my time with the company, as, at the time I wrote it (2000 and early 2001), the system was an amazing piece of work that could have made whole classes of Point-to-Point application considerably easier to develop. In retrospect, management probably knew that the company wouldn't last long enough to commercialise the new product (though they hadn't shared that information) and so decided to put their money into the more established product instead. It was likely the right decision, but it doesn't make the disappointment any less acute.

WorldBuilder

Having been pulled from the Portals project, I turned my last few months with the company to the problem of automatically generating and composing virtual reality worlds into content suitable for use with the Holodesk Communicator system. In large part this was an exercise in producing an intuitive interface for a complex and involved process. Although the result was functional, and was able to produce usable Holodesk worlds from the unmodified output of the various modellers, it would have been useful to have had another two months to work on the interface, which though usable, required the user to learn about the underlying object model, rather than allowing a natural interaction.

WorldBuilder replaced an earlier project which I had produced to manage the content development process. That system allowed the user to store individual prototypes in separate files, with the project files including the various used to prototype declarations, content files etc. in a "recipe file" which included "coded" interactions, settings and markers for further customization points. WorldBuilder wrapped the process of writing those files (in reality, an entirely different mechanism was used for the process, but from the user's point of view it had the same effect) in a point-and-click/drag-and-drop interface. I'm not sure if WorldBuilder ever made it onto the content development CD. The earlier recipe-file system was included on the content development CD.

I spoke/presented at a couple of VRML conferences regarding the work Eric and I did with a number of these projects. Tpresence has largely disappeared these days, closing up shop a few months after I left, so unfortunately I can't point you to downloads of Holodesk or SkeletonBuilder any more. The open-source package mcf.vrml (see above) on which SkeletonBuilder and WorldBuilder were built is still available, and I'd be happy to send anyone who's interested a copy of the Fruits of Living Worlds proposal.

Back to my homepage...