Meshes you can overwrite:
-Both of which are found in the Assets folder.
The above is just to make grading easier to find the locations of meshes to overwrite to test my exporter and build process.
So this week we added a plugin for Maya to export a mesh file to a lua file for our project to read in. My exporter takes the mesh and makes it look like all my previous mesh files. These are all in lua and it saves a HUGE amount of time if we’re doing anything other than a square. After it gets exported, it gets thrown through the MeshBuilder like before and things go on their merry way. It just makes it easier to make complex shapes by not forcing me to do it by hand and let Maya export all the vertices and the index buffer.
So we needed to have a multitude of objects and various materials. I realized halfway through this that I had some things not working the way they should be. It was a simple thing that just took me a little while to figure out where things were going wrong. In the fragment shader, I was using “g_colorModifier” to adjust the colors in the materials and this must have been changed when we switched to a new shader recently and now was using “g_color_perMaterial.” After I figured that out, the materials were pretty easy to throw together and attach them to different meshes.
In the picture above, the cone and the middle circle share the same material (orange). The middle sphere and right sphere share a mesh, but have different materials (orange and green, respectively). The floor mesh remains unchanged. I figured we didn’t need to complicated something that was only to help as a reference. It’s neat though, because you can use the same material on multiple things or use the same mesh for different objects and you don’t need to duplicate data.
We then added in a user settings project that allows the user to adjust values in a text file for screen width, height, and fullscreen capabilities. It does error checking and has a fallback in case no values were entered in correctly. The only time it runs in to trouble is on multiple monitors. It does crash on fullscreen if you have multiple monitors up. If you have a single monitor, then it’s no problem. Or if you just don’t run it in fullscreen.
Finally, we had to add in some small details for draw calls. In PIX, you can see below that each draw call is separated and doesn’t create a giant list of commands and you can break it up in to each draw call.
In release, these do not show up, because we don’t really want to see output from that in a release build of the game as can be seen below.
Maya Exporter: 1 Hour
Refactoring materials: 1.5 Hours
User Settings: 1 Hour
Fixing a problem with the .exe resulting from the refactor: 1 Hour
Writeup: 30 Minutes
Total: 5 Hours