Assignment7 Writeup

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Assignment 7

This assignment deals with how to write a plugin for Maya and how we can directly export a Maya mesh
to be read by our Lua interpreter.
1. Game ControlsThe arrow keys are used to move the sphere.
W,A,S,D is used to move the camera.
Q,E is used to zoom the camera in and out.
2. Below is the screenshot of the game when initially loadedWe can see the sphere resting on the plane and the sphere is rotating constantly about the Y
axis. Above the sphere is a torus which was also built in Maya.

3. I setup the MayaMeshExporter project such that it doesnt have any dependencies with any
other project. And no other projects depend on this project. This is because this project is
handling the code to create a plugin. This plugin is used only by Maya while generating the
mesh. The game itself doesnt need the plugin to run when it starts because by that time the
generated Mesh is already available for the game.

4. Below screenshot shows that both the plugins (for debug and release) are built and that the
plugin for debug is currently loaded.

5. To debug the plugin we need to build it first. Once it is built, we can go to Maya and load the
plugin as above. Once that is done we need to attach our debugger to the Maya process-

As we see above the maya.exe process needs to be selected and we have to click Attach.
Once this is done we can put a breakpoint in WriteMeshToFile method in the file
cMayaMeshExporter.cpp. This is the point where we can write the lua file with the vertex and
index data gathered by the plugin.

Now we go back to Maya and export the mesh into our desired format.

Once we click Export selection and accept, the debugger is triggered and we stop at our
breakpoint.

We can also see the values present in the index buffer-

6. The screenshot from the game is seen in the first page.


7. Places where I struggled for this assignment
a. The Mesh file which this plugin was generating was ending with a comma. This was an error
in writing to the correct format needed by lua and hence no file was getting loaded.
b. The debugger was not initially triggering for me for the plugin. This was because I had not
noticed that there is a custom format generated by the plugin, which must be used to
export the mesh from Maya. This was the last value in a dropdown list of many possible
formats.

You might also like