This is an old revision of the document!
Importing own static models into Ca3DE is very easy and only requires a modelling program that can export into the ASE file format.
Step 1: Create your model and texture
Ok let's start. Create your model and textures. I made a simple crate.
Step 2: Create a texture shader
Now you have to create your model texture shader. You have to know what a texture shader is and how to create it. There is a tutorial for this that can be found here. Although it features everything you need to know here is what my texture shader (which contains informations about my textures) looks like:
Models/Static/tutorial-model/box <- texture path/name { diffusemap Models/Static/djcrate03_diff.png <- diffuse texture path normalmap Models/Static/djcrate03_norm.png <- normal map path red ambientLightRed green ambientLightGreen blue ambientLightBlue }
The only difference compared to a normal texture shader is that a model texture shader also features the following key words:
red ambientLightRed green ambientLightGreen blue ambientLightBlue
Step 3: Prepare your model
After you have created your texture shader, you have to do the following: In order to let your texture work, you need to give the material you applied to your model your texture name/path. Like this, my material is named:
Models/Static/tutorial-model/box
The right material name is VERY important, if you don't apply it, the engine WONT find the texture!
Step 4: Further notes
Every texture has to have it's own model part. You can't apply 2 textures to a model that features only 1 part. This also means that that you need a bigger shader file.
Here is an example archive containing an example model + textures + shader.
Download: 2 Parts/Textures example files - .zip version
Download: 2 Parts/Textures example files - .tar.gz version
Step 5: Exporting
Ok, now export your model and place it into a directory of the Models directory. Note: The path in the textures shaderhas to be right: As an example let's take my shader, the texutre path/name is Models/Static/tutorial-model/box. This means that I have to place my model and my textures into the Static directory that can be found in the Models directory.
The result ingame:
And that's it. It's that easy! If you have a problem, have a look at the example files that can be downloaded here (links below)!
Example files:
Download:Static model example files - .zip version
Download:Static model example files - .tar.gz version
Relevant links: Texture shader tutorial