This week assignment was about the Maya mesh exporter. We created a plugin which can be used to export human readable files of different meshes directly from Maya.
Maya Mesh Exporter
Maya mesh exporter is used to import the data from Maya. With respect to our game application, it is not dependent on anything as it’s a Maya plugin. I didn’t add any dependency or references.
To debug this, we can attach the visual studio debugger to Maya process, and it will hit the break-point as shown:
Human Readable Format
Since we are exporting from Maya this time, there is a bunch of information available to us which we can import to our human readable file. But as in the game, I am just using the position, I decided to only import the positions from Maya to avoid complexity.
Too many Vertices
While reading the index data, I am using uint16_t variable. The limit of this variable is 65535. So, any number of indices more than this will crash the application. I realized this as I was using uint8_t variable before. I have added a condition while reading this data that if the indices crosses this number, I will log an error and print in debugger that mesh data has exceeded. Also, the application will not be crashed, but will show a default line mesh.
Playable EXE Download
W S A D to move game object (Cone will move in the updated exe)
Up Down Left Right to move camera - Plane can be seen with better perspective by moving the camera.
Ctrl to switch the mesh of game object.
Space to hide one object (plane).