3D Models - Exporting & Importing Summary

Exporting Models

Object & material text files

Models created in Blender need to be exported as “Wavefront (.obj)” files. There are two resulting text files, an object (.obj) and a material (.mtl) file. The first-time models are loaded into the simulator, these two files are parsed and automatically stored as binary files. Thereafter, the models will be loaded from the newly created binary files.

Exporting 3D model helicopter from blender

Adding textures (images) to meshes

Unwrapping meshes within Blender produces a UV Map which represents the area a loaded image is applied to. This UV Map can be scaled and stretched to manipulate how the image fits onto the face of a given part. You can even export the UV Map from Blender, which can then be loaded into image editing software such as GIMP (free image editing software). The exported UV Map is a faint grey line representation of the mesh, which acts as a template for you to create a design.

Moving parts - Identifying meshes

All parts (meshes) that are further animated in addition to the overall model’s position and rotation i.e. blades, swash, links etc, need to have a material assigned to them that has been named accordingly, before exporting the model from Blender.

Importing Models

Initial loading (Object file)

Options for controlling how models are handled when they're imported are being developed. One idea is to allow individual parts to be saved separately, which can then later be loaded to become part of a different model, so bespoke models in effect. Excluding less-essential meshes (such as meshes which aren’t often visible - which to some extent compares to “Back-face Culling” whereby processing mesh-faces which can’t be seen is avoided) from highly detailed (more demanding for the graphics card to process) models might also help performance for relatively low spec PCs,

Saving as binary file

Model loading from object (.obj) files can take several seconds, especially for example, a highly detailed helicopter or plane plus a detailed scene, either of which might have tens (even hundreds) of thousands of vertices (incidentally, the material (.mtl) file size is typically tiny in comparison). This load time is reduced to a fraction of a second when those same models are loaded from the binary files created.