Adding Materials

From Computing and Software Wiki

(Difference between revisions)
Jump to: navigation, search
 
(3 intermediate revisions not shown)
Line 1: Line 1:
-
In this tutorial, you have to have a world with some geometrics that you would like to work with.
+
In this tutorial, you have to have a world with some geometrics that you would like to work with. If not, please refer to [http://www.cas.mcmaster.ca/wiki/index.php/Creating_a_new_world Creating a new world]. In this tutorial, we use our previously created world 'base.wld' and applying textures to each of the objects we have placed in our world.
<br>
<br>
-
If not, please refer to [http://www.cas.mcmaster.ca/wiki/index.php/Creating_a_new_world Creating a new world]. In this tutorial, we use our new world as an example
+
==Getting Ready==
-
<br>
+
[[Image:addmat1.jpg|right]]
-
'''Creating a material'''
+
The Material panel should likely be visible during when the world editor is opened.  If it is not go to the menu and click Page > Material to view the Material page.
-
<br>
+
Double click on the black box in the Material panel and the Material Manager is displayed.  For in depth descriptions of how each option will affect a material please refer to the Official C4 Engine Wiki under the page [http://www.terathon.com/wiki/index.php?title=Creating_a_New_Material Creating a New Material]. You should likely only see the Default material when the manager first opens, but you should always create a new material each time you would like to use a different texture in order to keep your work organized.  When working on a larger level with many materials it can get very confusing when there are a lot of textures.
-
Select Page and Material if Material panel is not on the left panel.
+
 
-
*pic
+
[[Image:addmat3.jpg]]
-
Double click on it, Material Manager is displayed
+
 
-
*pic
+
 
-
Click on new to make a new material
+
==Creating a Material==
-
*pic
+
 
-
In the middle of Material Manager, select Textures
+
Click on '''New''' to create a new material.  Name your material MetalBall and click on the '''Textures''' tab.  This allows you to apply a texture that has been previously imported from a *.tga file.  All textures in the C4 Game Engine have the form of *.tex.  In this case we will be using textures given with the C4 engine as a Demo.  Click on '''Choose''' beside Texture map and navigate to '''Data/Demo/texture'''.  Choose the texture '''MetalPlate.tex''' and you will see the material is applied to reflect your change.  You may also add a bump mapping to make the texture more realistic. To do this click '''Choose''' on the Normal map and navigate to the '''MetalPlateBump.tex''' as before.  Make sure the boxes beside each texture path is checked to ensure they are applied.  You will see a screen similar to the one below.
-
*pic
+
 
 +
[[Image:addmat4.jpg]]
 +
 
 +
 
 +
==Applying a Material==
 +
 
 +
Click close to close the Material Manager window.  You will see the active material is the MetalBall that we just created.  To apply this material to an object in the world select the sphere either in a viewport or the scene graph and click '''Geometry > Set Material''' or simply press Ctrl-M.  Your material is now set to the sphere!  You may use a single material for many objects in your scene.  Try applying additional materials to other objects in your scene.  Make sure to create a '''New''' material each time so to not change textures that are already being used.  When you are finished click '''World > Save and Play World''' to view your creation.  It should look something similar to the following with your chosen textures.
-
To apply the current material to the box primitive, select the floor and press Ctrl-M, this will apply the current material to the geometry.
+
[[Image:addmat5.jpg]]
-
*pic
+
<br>
<br>
<br>Return to [http://www.cas.mcmaster.ca/wiki/index.php/RCaragogo RCaragogo]
<br>Return to [http://www.cas.mcmaster.ca/wiki/index.php/RCaragogo RCaragogo]

Current revision as of 05:10, 20 March 2008

In this tutorial, you have to have a world with some geometrics that you would like to work with. If not, please refer to Creating a new world. In this tutorial, we use our previously created world 'base.wld' and applying textures to each of the objects we have placed in our world.

Getting Ready

The Material panel should likely be visible during when the world editor is opened. If it is not go to the menu and click Page > Material to view the Material page. Double click on the black box in the Material panel and the Material Manager is displayed. For in depth descriptions of how each option will affect a material please refer to the Official C4 Engine Wiki under the page Creating a New Material. You should likely only see the Default material when the manager first opens, but you should always create a new material each time you would like to use a different texture in order to keep your work organized. When working on a larger level with many materials it can get very confusing when there are a lot of textures.

Image:addmat3.jpg


Creating a Material

Click on New to create a new material. Name your material MetalBall and click on the Textures tab. This allows you to apply a texture that has been previously imported from a *.tga file. All textures in the C4 Game Engine have the form of *.tex. In this case we will be using textures given with the C4 engine as a Demo. Click on Choose beside Texture map and navigate to Data/Demo/texture. Choose the texture MetalPlate.tex and you will see the material is applied to reflect your change. You may also add a bump mapping to make the texture more realistic. To do this click Choose on the Normal map and navigate to the MetalPlateBump.tex as before. Make sure the boxes beside each texture path is checked to ensure they are applied. You will see a screen similar to the one below.

Image:addmat4.jpg


Applying a Material

Click close to close the Material Manager window. You will see the active material is the MetalBall that we just created. To apply this material to an object in the world select the sphere either in a viewport or the scene graph and click Geometry > Set Material or simply press Ctrl-M. Your material is now set to the sphere! You may use a single material for many objects in your scene. Try applying additional materials to other objects in your scene. Make sure to create a New material each time so to not change textures that are already being used. When you are finished click World > Save and Play World to view your creation. It should look something similar to the following with your chosen textures.

Image:addmat5.jpg

Return to RCaragogo


References
http://www.terathon.com/wiki/index.php?title=Creating_a_Basic_World

Personal tools