Skip navigation

File Link(.exe)

Click Me


In this assignment,I learned:

1. how to create a maya plug-in to export the mesh data from maya to my custom lua format.

2. Using setting file to configure the game.

3. How to use PIX instrumentation

Export Model from Maya

I made a maya export plug-in to export meshes to my custom mesh format:

1. I coded the export plug-in based on Maya API. The Maya API can automatically collect mesh data from Maya for me. So I just call its functions to get the data and output them as my own file format, which is actually a lua file that return a table to indicate the mesh.I configured it to build a x64 version in Build->Configuration Manager since I’m using the x64 version Maya.

2. I made Visual Studio to put my plug-in to the Maya plug-in folder after building. And enable my plug-in in Window->Settings/Preferences->Plug-in Manager in Maya to make sure my plug-in is running.

3. I downloaded a free licence model, import it into Maya and export it to my custom format with my Maya. Then I build it with my mesh builder and load it to show in the scene in the game.The model in my game looks like this:




Maya’s coordinate system is different to default D3D, There are some changes I made while exporting

1. Position : x,y, -z

2. Normal: nx,ny,-nz

3.Texture Coord : u, 1.0 – v

PIX instrumentation

I added my custom “event” to make the PIX show the information more organized. I used  D3DPERF_BeginEvent() and D3DPERF_EndEvent() to wrap my material setting and draw function. that’s what they look like in PIX:


User Settings


I added a user settings file to my project which will be copy to the root folder of my final game and will be loaded when the game is initializing. The user settings file provided information about some options to initialize the game, such as window size and full screen mode option.

Time estimation

Reading and searching — 2.5 h
Coding / Debugging — 6 h
Writing blog — 1 h
Total — 9.5 h

Leave a Reply