Link to download:
In this assignment, we changed our human-readable file from Maya to a binary file. In this case, it will be faster than reading lua file in run-time.
Show an example of a binary geometry file built by your GeometryBuilder
My order is: (bool)isLeftHand, (uint_16)vertex count, (float*)vertex data, (uint_16)index count, (uint_16*)index data
The color range distinguished my order. This is a very simple plane mesh. The following is the human-readable file.
Tell us at least two advantages of using binary file formats
First of all, it is faster to load binary file in run-time because it will not iterate the whole data array in run-time. Secondly, the file size is much smaller. Compare to human-readable file, binary file can be loaded faster but it cannot be updated after deployment. However, user can change human-readable file after deployment and before running the application, which can update the run-time data. Therefore, in our way of handling loading geometry insures the changeability and loading speed.
Tell us whether the built binary geometry files should be the same or different for the different platforms, and explain why.
They should be different. The Geometry builder will handle the difference when it generates the binary file. The main difference is the winding order in different platforms. After generating the binary files, they are different in different platforms.
Show us how you extract the four pieces of data from binary data at run-time
Create a geometry in Maya with many vertices and indices to measure the advantages of binary files
|Size in KB||1886||345|
|Time of reading (in sec)||0.068911||0.001151|