Friday, October 25, 2013

TIL: Maya Has More To Offer

It's been a while since I last blogged. Since then I've learned quite a bit about Ogre3D and I'm still working on Havok. But for this blog I'd like to focus on my new relationship with Maya (Autodesk Maya that is).

Not long ago I believed Maya was nothing more than just a 3D mesh creation and animation tool, among other things. In one of our Game Engine Design lectures, Dr. Hogue showed the class some menus that were basically created using Maya. Funnily enough I had been working on the assignments and for some reason I got it in my head that Maya was only good for creating locators, waypoints or paths. But after toying with the FBX format I realized that Maya can be used for much more than just creating paths; using a predefined naming convention in Maya, one could essentially use the FBX format as a design tool.

The FBX format includes meshes, animations, locators, lights, cameras and even the scene nodes' hierarchical structures (and possibly other things I may not be aware of). When loaded into Ogre3D these all get added to the scene graph. Finding them in the scene graph is just a matter of a search through the scene graph by name.

Now using a naming convention for a point on a path - say something like "path1_point1", or simplified further "path1_1" - we could have a class that stores paths, and to store the points after they are loaded in from the FBX we would create a search algorithm that searches for all the "path1" points. Once the node is found in Ogre we would search for the next path point until we are finished. The same naming system, applied to the objects in a level could achieve a similar result.

For example, if we have weapon pads in 6 different places in the level, traditionally one would have to either hard code each one's position or create a level editor and save those positions in a text file. With Maya, we basically already have a level editor and so the positions are saved in the file itself. Loading those weapon pads into game is done for us when we load the FBX, and finding them is a matter of a naming convention e.g.("weaponPad_1").

In terms of the pipeline this makes things so much faster. For one, as one of two programmers I get to be even more lazy as I don't have to create a level editor. This also means that as long as the development team has access to Maya (which luckily we all do), anyone can create a level. The only training I have to provide the team will be the naming conventions that we will be using, which I plan to store on the repository wiki.

I am still in the planning phase for this system, as I don't want to just jump into implementation and then along the way discover that it'll never work, but so far I think that this pipeline will be solid and reduce our development time significantly.