This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
modelling:static [2005-10-10 17:13] Thrawn |
modelling:static [2006-04-30 15:53] Thrawn Optimized link path |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Importing own static models ====== | ||
- | 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. | ||
- | |||
- | {{modelling:tutorial_model.jpg}} | ||
- | |||
- | ===== 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 [[http://www.ca3d-engine.de/wiki/doku.php?id=textures:myfirst|here]]. Although it features everything you need to know here is what my texture shader (which contains informations about my textures) looks like: | ||
- | |||
- | <code>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 | ||
- | }</code> | ||
- | |||
- | |||
- | The only difference compared to a normal texture shader is that a model texture shader also features the following key words: | ||
- | |||
- | <code>red ambientLightRed | ||
- | green ambientLightGreen | ||
- | blue ambientLightBlue</code> | ||
- | |||
- | ===== 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:** {{modelling:tut-staticmodel2parts.zip|2 Parts/Textures example files (.zip file)}} | ||
- | **Download:** {{modelling:tut-staticmodel2parts.tar.gz|2 Parts/Textures example files (.zip file)}} | ||
- | |||
- | ===== 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: | ||
- | |||
- | {{modelling:tutorial_model2.jpg}} | ||
- | |||
- | 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:** {{modelling:tut-staticmodel.zip|Static model example files (.zip file)}} | ||
- | |||
- | **Download:** {{modelling:tut-staticmodel.tar|Static model example files (.tar file)}} | ||
- | |||
- | __**Relevant links:**__ | ||
- | |||
- | - [[http://www.ca3d-engine.de/wiki/doku.php?id=textures:myfirst|Texture shader tutorial]] |