Transitioning to the new model system

From PioneerWiki
Jump to: navigation, search

This page is aimed at people wanting to convert their old Lua-based models to the new model system, which was adopted during spring 2013.

Please add to this page with your experiences and tips for others converting their models.

Getting started

Before you start, please read about the new model system, try the test models, play with the new modelviewer and make yourself a simple model in your modelling package of choice (we recommend Blender). This job will be easier if you know what you're aiming for!

The new model system is available from alpha 30 onwards. Stay upto date with new developments using the nightly build.

Exporting LMR models

In alpha 29 lmrmodelviewer gained a new option, "Dump model to .obj". When clicked, this button will create a new directory called model_dump in your user data dir. For the current model, it will dump all models and submodels at all LODs, both static and dynamic, to Wavefront object files. Because of the number of parameters possible, dynamic sections will only be dumped with the current animation settings. It will also attempt to create material and texture files.

It should be possible to load these exported files into any modelling package that can import Wavefront objects (pretty much all of them) and use them as a basis for models for the new model system.

Testing in-game

The new model system is only partially hooked up to the game. While you can view your models in the model viewer, you'll want to see them in game. To do that, just use the model name (the name of the .model file) in the model parameter of the ship definition file.