Game Engineering II Assignment 7
In the last lesson, we discussed exporting meshes from Maya to our engine. I was pretty worried about programming a Maya plugin. Still, it turned out to be relativity easier than the challenges I met lately.
I tried to color the meshes by following the instructions. However, it took me much longer than I expected to finish this. The first problem is I did not understand the structure of the vertex buffer. Do vertex and color data send to the one vertex buffer or two? Is one color data following one vertex data or a color data array following a vertex data array? I tried so many times to figure them out. After that, I realized I couldn't pass the color to the D3D game. Although the engine and shader codes gave me no error, the meshes are still black for some reason. After hours of clueless trying, I realized I should have put the o_color before the o_postion, which caused the problem to happen.
The only reference I added to the MayaMeshExporter is Window. Because the only other project header file used in MayaMeshExporter is the Window. And it works as I expected.
No project relies on MayaMeshExporter for one reason: MayaMeshExporter only handles generating a plugin that Maya can use. Other projects can still work fine even without the MayaMeshExporter.
I did not export unused data because I don't think it is necessary to do it right now. We don't need those data for now, so it is not worth spending time on. Besides, it will be effortless to export any of these data in the future.
I may not understand the last question correctly. I pass a mesh with more than 40,000 vertex in it, and the engine handles it like normal. I think the engine should take the big mesh just right until it runs out of memory or graphics memory. The engine should be good if the index is not large enough beyond the uint16_t limitation. Controls:
How to control:
WASD to move the object1. QE to scale the object1,
Left Right Arrow Key to rotate camera. Up Down Arrow Key to move camera back and forward. Num 4 and 6 to rotate the camera.
Enter to slow down the time.