A couple of years ago I ran into one interesting challenge. It consisted in pulling out from the catalog program all 3D models (about 2000 pieces) in the form of a list of files with name-number in accordance with the model numbers in the catalog. The program used a third-party component to visualize models - O2CPlayer. All models were sewn into one large file with the extension dat. Description and examples of using O2Cplayer can be viewed on the official site: the
site and the example of
Ferrari .
Attempt to parse the archiveI already had experience with 3ds and other graphic formats of models, I began to look for O2C format documentation. It was assumed that the file will consist of parts with certain headers (chunks), which you can try to pull out from the dat file of the model. I could not find the documentation, I managed to find several ready-made models in the right format and the official website of the developer of visualization components. The binaries did contain similar headlines. I analyzed the dat file for their repetition, it turned out to be about 600. This was obviously not enough, and the headers were repeated chaotically. An attempt to remove models directly from a file failed.
Framework research')
I decided to postpone this task, especially since there were no concrete ideas for implementation. But after a while the thought came - whether to see this framework of visualization. Created a WinForms project in MSVS, connected the necessary COM O2CPlayer assemblies. After installing the official application, they are available from Com Reference. O2CPleer is available on the developer’s official website.
This engine out of the box has all the basic visualization functions, and does not require special knowledge in the field of 3D graphics. O2CPlayer has an intuitive settings interface. Presents the functions of rotation, movement, detail, object animations and others. For tasks such as viewing the catalog of models, is quite a good solution.

In the interface of the component more than a hundred methods, properties and events. But I was interested in the fact that the engine opens only files for visualization, it is impossible to transfer an array of data in memory for display. It is likely that for the display of models, the catalog program does the following:
- Select the desired model from the archive
- Creates a file on disk
- Sends the file name for rendering.
DecisionSketching a simple utility using the FileSystemWatcher object from the System.IO namespace, scanned all the changes to the files on drive C. Indeed, before displaying the next model in the program, in the folder @ "C: \ Users \ D395 ~ 1 \ AppData \ Local \ Temp \" .. ”creates a new file with arbitrary name. The task was to copy this file with the desired name to the desired folder. Within an hour, all models were selected.