A downloadable game for Windows

Write Up:

This was a really fun assignment. My favorite part was opening Maya for the first time ever around other artists and tech artists and watching them laugh at me. But also, I have to say: it's not as bad as I've heard. Maya's pretty freaking powerful. It's also just... a lot.

The first part of the assignment was going very smoothly (a bit too smoothly) and getting the geometry exported to the correct file format was really easy.

And then came the errors. 

I ran into a very mysterious set of errors surrounding Lua's lua_close() function. The function runs through a bunch of GCObjects allocated on the heap and frees each one, but for certain geometries (or like, once we hit a threshold on the number of vertices we could load?) that free() function would try to free some invalid memory and all hell would break loose. It was getting really weird, because there were certain geometries that were apparently totally fine, and others that Lua just hated. And I couldn't really find the pattern that separated the ones that were okay and the ones that weren't.
(I realize that there was supposed to be a "hard limit" on the number of vertices our engine can handle, but this is like less than 50 vertices. It's way too small to be related to that.)

I could only get three Maya geometries working on a x86 Release build (oddly specific, I know) which is how I obtained that first screenshot.

Another weird thing I noticed was that some of my geometries (well, most of my geometries) would have duplicate vertices in the vertex list exported by my plugin. I spent a good amount of time tracking that down and could only conclude that the data being passed into the plugin had duplicates in them. (Unless, of course, I missed something.)

This is a bit baffling, since the entire purpose of the vertex-buffer/index-buffer split is to make your data smaller. The only situation I can imagine redundancy like this might be useful is for cache-coherency. I don't know if that's actually a thing in graphics though.

  • Show at least one screenshot of your game running:
    • Ta da! We've got screenshots!
  • Tell us what references you had to add to the MayaGeometryExporter project
    • I actually added the Graphics project as a reference on impulse, but afterwards realized that was totally unnecessary. We don't need to add any references to this project.
  • Tell us what other projects depend on MayaGeometryExporter
    • Same as before, not a thing. This is really just a totally standalone piece of software.
  • Tell us whether you exported the unused data (i.e. normals, tangents, bitangents) to your human-readable file or not. Explain why.
    • I didn't bother with exporting all that unused data mostly because I wouldn't even know what to do with it if I had it. I'll let Future Srija handle adding that functionality once we know what that functionality really is. Then I can optimize the format I read the data in for that functionality.
  • Show a screenshot of you debugging your plug-in
    • I spent a ridiculous amount of time getting this to work, but to no avail. Visual Studio isn't loading symbols from Maya at all. I'm definitely just doing something wrong here.
  • Tell us what happens if you try to load a model with too many vertices.
    • Unless this is actually the cause of my Mystery Error, I have no clue. My guess, though, is that this has something to do with the fact that our indices are 16-bit integers. So we can only have at most 65536 vertices in our current set up, after which we run out of indices to index the vertices with.

EDIT: I fixed the Mystery Error. Turns out my index array was being allocated too small for the actual number of indices I had? What a silly error. Also though, I wish tracking this stuff down was much easier. Can't we have some sort of trace of every piece of code that wrote to a memory location or something?

Download

Download
MyGame_x64_D3D.zip 206 kB
Download
MyGame_x86_OpenGL.zip 199 kB

Leave a comment

Log in with itch.io to leave a comment.