This shows you the differences between two versions of the page.
modeleditor:modelfiles [2011-06-10 12:19] Carsten Augmented the text |
modeleditor:modelfiles [2015-06-11 23:01] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Model Files ====== | ||
- | |||
- | Each model comprises several files on disk, such as the model file, material definition files, and texture images. | ||
- | |||
- | When you save a model in the Model Editor, the editor creates or re-creates some of these files, updates others, and leaves alone the rest. | ||
- | The result is normally exactly what you want and expect, but sometimes you may wish to hand-tune some details (such as the material definitions) without and independently of the Model Editor. In such cases, it is very helpful to understand the files that belong to a model. | ||
- | |||
- | This section explains the files that together form a model and how they relate to each other. | ||
- | |||
- | |||
- | ===== One directory per model ===== | ||
- | |||
- | Although not a technical requirement and not enforced by the Cafu model code, it is highly recommended to save each model in a directory of its own. This | ||
- | |||
- | * explicitly groups all files that logically form and belong to the model, and | ||
- | * makes packaging a complete model in a single ''my_model.zip'' archive possible, so that the model can easily and safely be distributed, shipped and handled. | ||
- | |||
- | The name of the directory should match the file name of the model. That is, if your model's name is ''Trinity.cmdl'', it should be stored in the directory with the same name ''Trinity/'' (or in a zip archive with the same base name ''Trinity.zip''). | ||
- | |||
- | Note that when you are saving a new model that does not yet have a separate directory, you can use the "New Folder" button (or right-click context menu) of the "Save" dialog to create such new directories as required. | ||
- | |||
- | |||
- | ===== cmdl model files ===== | ||
- | |||
- | The ''cmdl'' file is the main file of the model: It contains the definitions for the skeleton, the meshes and the animation sequences of the model. | ||
- | |||
- | The Cafu Engine and the Model Editor load ''cmdl'' files as [[http://www.lua.org/|Lua]] scripts, and as such they can be inspected or edited in a text editor if desired. | ||
- | |||
- | Besides the main ''cmdl'' file, the Model Editor also creates a ''cmdl_bak'' file that is the file before it was last saved. | ||
- | |||
- | |||
- | ===== cmat material definition files ===== | ||
- | FIXME | ||
- | |||
- | |||
- | ===== Texture images ===== | ||
- | FIXME | ||