Luomu / pioneer

space simulation adventure game
http://pioneerspacesim.net/
6 stars 1 forks source link

Model compiler #24

Closed Luomu closed 11 years ago

Luomu commented 12 years ago

A system to binarize newmodels, instead of assimp-loading them every time

Luomu commented 12 years ago

This would probably be an offline preprocess thing, only compiled models would be supplied with game releases

Luomu commented 11 years ago

Going to do simple profiling first to see where most time is taken.

Luomu commented 11 years ago

The only multi-second delays are when assimp is loading meshes. Converting those aiMeshes to Surfaces is very fast. Converting the node structure, animations and materials is very fast.

It is possible to skip loading meshes using:

importer.SetPropertyInteger(AI_CONFIG_PP_RVC_FLAGS, aiComponent_MESHES);

This is good, because then there is no need to save node structure or animation, they can be always converted from the original data file. Only aiMeshes/surfaces need to be serialized.