Design

I have finally gotten to a point where I am very happy with the design of the exporter, from a software-engineering standpoint. The past few days were spent simply staring at every part of the exporter code and asking, “Is this well designed? Can this break? Is this modular?”

When I first started programming I thought it was pointless to ask these questions. Instead I would dive blindly into writing some code thinking, arrogantly, that I was such an awesome programmer that I would just end up with fantastic code in the end. I’d come back to it later and it would be a mysterious piece of crap that I no longer understood and was unnecessarily complicated and inflexible.

It may occur to you that my about page says I have a degree in Computer Science, that I probably learned these lessons at the University of Wisconsin Madison. I’m sorry to say they don’t actually teach that, they don’t even acknowledge it. If you are serious about programming I would suggest, highly, that you actually go beyond your class work and read a few books on software engineering and architecture. The best book I found on this subject is Large Scale C++ Software Desgin. And don’t think your above these things, unless you’ve had lots of experience developing lots of software.

Anyway, new node types can be added and handled very elegantly by the exporter. It took a little work to get the Maya API to do exactly what I wanted, but it’s turned out extremely well. Right now geometry, bounding volumes, and scene nodes are exported. Maya transform nodes are handled properly as well. They only modify the transformation of the nodes in the scene but are not exported. This allows a user to group together things in maya for convenience while not having these unnecessary nodes export to the final scene. Many new nodes will be eventually added, Lights, Sounds, etc. All very soon.

Leave a Reply