User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
textures:myfirst [2005-09-12 21:34]
Stormtrooper Fixed a form error²
textures:myfirst [2013-01-07 12:07] (current)
Line 1: Line 1:
-This tutorial has 2 part. The first part covers ​textures ​for maps and the second part covers skins for models.+====== Using own textures ​======
  
-__**Part 1: Map textures**__+ 
 +This tutorial has 3 part. The first part covers textures for maps, the second part covers skins for models and the third part skybox textures. 
 + 
 +===== Part 1: Map textures ​=====
  
 Create your texture. Then save it into one of the supported file formats (those are: .jpg, .png, .tga, .bmp). Create your texture. Then save it into one of the supported file formats (those are: .jpg, .png, .tga, .bmp).
  
-Go into your Ca3DE directory ​(Ca3DE-MDK -> Projects -> Ca3D-Engine) ​and from there into the textures directory: **Games -> DeathMatch -> Textures**. There it should somehow look like this:+Go into your Cafu directory and from there into the textures directory: **Games -> DeathMatch -> Textures**. There it should somehow look like this:
  
 {{textures:​tut1_1.jpg}} {{textures:​tut1_1.jpg}}
Line 16: Line 19:
 <​code>​Textures/​directory_name(in which the textures are palced)/​texture name <​code>​Textures/​directory_name(in which the textures are palced)/​texture name
 { {
-type_of_texture Textures/​directory_name/​texture_patch +    ​type_of_texture Textures/​directory_name/​texture_patch
 } }
 </​code>​ </​code>​
Line 25: Line 27:
 Textures/​tutorial/​texture1 Textures/​tutorial/​texture1
 { {
-diffusemap Textures/​tutorial/​texture1_diff.jpg +    ​diffusemap Textures/​tutorial/​texture1_diff.jpg 
-normalmap Textures/​tutorial/​texture1_norm.jpg +    normalmap Textures/​tutorial/​texture1_norm.jpg 
-specularmap Textures/​tutorial/​texture1_spec.jpg +    specularmap Textures/​tutorial/​texture1_spec.jpg 
-lightmap $lightmap+    lightmap $lightmap
 } }
 </​code>​ </​code>​
Line 35: Line 37:
 It's easy, isn't it? And that's already it! You can save it as yourshadername.cmat or within another shader and it will work. Start your mapping editor and you will be able to use the texture! It's easy, isn't it? And that's already it! You can save it as yourshadername.cmat or within another shader and it will work. Start your mapping editor and you will be able to use the texture!
  
-**Download:​** ​[[http://www.ca3d-engine.de/​wiki/​lib/​exe/​fetch.php?​cache=cache&​media=textures%3Atut-textures.zip|Tutorial example files (.zip file)]]+**Download:​** ​{{textures:tut-textures.zip|Tutorial example files (.zip file)}} 
 +**Download:​** {{textures:tut-textures.tar.gz|Tutorial example files (.tar.gz ​file)}}
  
-**Download:​** [[http://​www.ca3d-engine.de/​wiki/​lib/​exe/​fetch.php?​cache=cache&​media=textures%3Atut-textures.tar.gz|Tutorial example files (.tar.gz file)]] 
  
  
-__**Part 2: Model textures**__+===== Part 2: Model textures ​=====
  
 Using own skins (model texures) is as easy as using map textures. There are only slight differences. Using own skins (model texures) is as easy as using map textures. There are only slight differences.
  
-Instead of being placed in a directory in the textures directory ​yo have to place them in one of the directories in the Models (like the models themselves) directory. Let's say we place them into the Static directory that is placed in the Models directory. Our shader-file has to be placed in the Models directory that can be found in the Materials directory. It would look like this:+Instead of being placed in a directory in the textures directory, you have to place them in one of the directories in the Models (like the models themselves) directory. Let's say we place them into the Static directory that is placed in the Models directory. Our shader-file has to be placed in the Models directory that can be found in the Materials directory. It would look like this:
 <​code>​ <​code>​
 Models/​Static/​mymodelname/​a_name_for_my_skin Models/​Static/​mymodelname/​a_name_for_my_skin
 { {
-diffusemap Models/​Static/​a_name_of_my_skin_diff.png +    ​diffusemap Models/​Static/​a_name_of_my_skin_diff.png 
-normalmap Models/​Static/​a_name_of_my_skin_norm.png +    normalmap Models/​Static/​a_name_of_my_skin_norm.png 
-specularmap Models/​Static/​a_name_of_my_skin_spec.png+    specularmap Models/​Static/​a_name_of_my_skin_spec.png
  
-red ambientLightRed +    ​red ambientLightRed 
-green ambientLightGreen +    green ambientLightGreen 
-blue ambientLightBlue+    blue ambientLightBlue
 } }
 </​code>​ </​code>​
Line 62: Line 64:
  
 Well that's it! If there are questions, feel free to post them in the forums! Well that's it! If there are questions, feel free to post them in the forums!
 +
 +===== Part 3: Skybox textures ======
 +
 +You can find detailed tutorial concerning the integration of new skyboxes here:
 +
 +  * [[textures:​skydomes#​how_to_integrate_a_skybox_into_cafu|How to integrate a skybox into Cafu]]
 +
 +
textures/myfirst.1126553669.txt.gz · Last modified: 2013-01-07 12:07 (external edit)