Index: orxonox/trunk/src/lib/graphics/importer/model.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/model.cc	(revision 3800)
+++ orxonox/trunk/src/lib/graphics/importer/model.cc	(revision 3801)
@@ -236,5 +236,5 @@
   face->firstElem = NULL;
   
-  face->materialString = NULL;
+  face->material = NULL;
   
   face->next = NULL;
@@ -288,6 +288,4 @@
   PRINTF(5)("Cleaning up Face\n");
 
-  if (face->materialString != NULL)
-      delete []face->materialString;
   if (face->firstElem != NULL)
     {
@@ -549,14 +547,28 @@
     }
   */      
-  if (this->currentGroup->faceCount >0)
+  if (this->currentGroup->faceCount > 0)
     this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face;
   this->initFace (this->currentGroup->currentFace);
   
-  this->currentGroup->currentFace->materialString = new char[strlen(matString)+1];
-  strcpy (this->currentGroup->currentFace->materialString, matString);
-  
+  this->currentGroup->currentFace->material = material->search(matString);
+
   if (this->currentGroup->faceCount == 0)
     this->currentGroup->faceCount ++;
-
+}
+
+/**
+   \brief Function that selects a material, if changed in the obj file.
+   \param mtl the Material that will be set.
+*/
+bool Model::addUseMtl (Material* mtl)
+{
+  if (this->currentGroup->faceCount > 0)
+    this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face;
+  this->initFace (this->currentGroup->currentFace);
+  
+  this->currentGroup->currentFace->material = mtl;
+
+  if (this->currentGroup->faceCount == 0)
+    this->currentGroup->faceCount ++;
 }
 
@@ -591,5 +603,5 @@
       while (tmpFace != NULL)
 	{
-	  if (tmpFace->vertexCount == 0 && tmpFace->materialString != NULL)
+	  if (tmpFace->vertexCount == 0 && tmpFace->material != NULL)
 	    {
 	      if (this->currentGroup->faceMode != -1)
@@ -597,13 +609,9 @@
 	      this->currentGroup->faceMode = 0;
 	      Material* tmpMat;
-	      if ((tmpMat = material->search(tmpFace->materialString)) != NULL)
+	      if (tmpFace->material != NULL)
 		{
-		  tmpMat->select();
-		  PRINTF(5)("using material %s for coming Faces.\n", tmpFace->materialString);
+		  tmpFace->material->select();
+		  PRINTF(5)("using material %s for coming Faces.\n", tmpFace->material->getName());
 		}
-	      else 
-		PRINTF(2)("material %s not found.\n", tmpFace->materialString);
-
-
 	    }
 
Index: orxonox/trunk/src/lib/graphics/importer/model.h
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/model.h	(revision 3800)
+++ orxonox/trunk/src/lib/graphics/importer/model.h	(revision 3801)
@@ -54,5 +54,5 @@
     FaceElement* firstElem; //!< Points to the first Vertex (FaceElement) of this Face.
 
-    char* materialString;   //!< The Name of the Material to which to Change.
+    Material* material;     //!< The Material to use.
 
     Face* next;             //!< Pointer to the next Face.
@@ -106,4 +106,5 @@
   bool addVertexTexture(const float u, const float v);
   bool addUseMtl(char* mtlString);
+  bool addUseMtl(Material* mtl);
   void finalize(void);
 
Index: orxonox/trunk/src/story_entities/world.cc
===================================================================
--- orxonox/trunk/src/story_entities/world.cc	(revision 3800)
+++ orxonox/trunk/src/story_entities/world.cc	(revision 3801)
@@ -940,5 +940,5 @@
       this->simpleAnimation->tick(seconds);
       
-            testAnim->tick(seconds);
+      //testAnim->tick(seconds);
 
     }
Index: orxonox/trunk/src/world_entities/skybox.cc
===================================================================
--- orxonox/trunk/src/world_entities/skybox.cc	(revision 3800)
+++ orxonox/trunk/src/world_entities/skybox.cc	(revision 3801)
@@ -47,16 +47,18 @@
   this->setClassName("SkyBox");
 
+  this->model = NULL;
 
-  this->model = (Model*)ResourceManager::getInstance()->load("cube", PRIM, RP_LEVEL);
   this->setMode(PNODE_MOVEMENT);
 
   this->setSize(1900.0);
+  this->rebuild();
 
-  this->material = new Material("Sky");
-  if (fileName)
-    this->setTexture(fileName);
-  this->material->setIllum(3);
-  this->material->setAmbient(1.0, 1.0, 1.0);
-
+  this->material = new Material*[6];
+  for (int i = 0; i <6; i++) 
+    {
+      this->material[i] = new Material();
+      this->material[i]->setIllum(3);
+      this->material[i]->setAmbient(1.0, 1.0, 1.0);
+    }
 }
 
@@ -67,8 +69,80 @@
 SkyBox::~SkyBox()
 {
-  PRINTF(3)("Deleting the SkyBox\n");
-  delete this->material;
+  PRINTF(5)("Deleting the SkyBox\n");
+  
+  for (int i = 0; i < 6; i++)
+    delete this->material[i];
+  delete []this->material;
 }
 
+
+void SkyBox::rebuild()
+{
+  if (this->model)
+    delete model;
+  model = new Model();
+
+  model->addVertex (-0.5*size, -0.5*size, 0.5*size);
+  model->addVertex (0.5*size, -0.5*size, 0.5*size);
+  model->addVertex (-0.5*size, 0.5*size, 0.5*size);
+  model->addVertex (0.5*size, 0.5*size, 0.5*size);
+  model->addVertex (-0.5*size, 0.5*size, -0.5*size);
+  model->addVertex (0.5*size, 0.5*size, -0.5*size);
+  model->addVertex (-0.5*size, -0.5*size, -0.5*size);
+  model->addVertex (0.5*size, -0.5*size, -0.5*size);
+
+  model->addVertexTexture (0.0, 0.0);
+  model->addVertexTexture (1.0, 0.0);
+  model->addVertexTexture (0.0, 1.0);
+  model->addVertexTexture (1.0, 1.0);
+  model->addVertexTexture (0.0, 2.0);
+  model->addVertexTexture (1.0, 2.0);
+  model->addVertexTexture (0.0, 3.0);
+  model->addVertexTexture (1.0, 3.0);
+  model->addVertexTexture (0.0, 4.0);
+  model->addVertexTexture (1.0, 4.0);
+  model->addVertexTexture (2.0, 0.0);
+  model->addVertexTexture (2.0, 1.0);
+  model->addVertexTexture (-1.0, 0.0);
+  model->addVertexTexture (-1.0, 1.0);
+
+  model->addVertexNormal (0.0, 0.0, 1.0);
+  model->addVertexNormal (0.0, 0.0, 1.0);
+  model->addVertexNormal (0.0, 0.0, 1.0);
+  model->addVertexNormal (0.0, 0.0, 1.0);
+  model->addVertexNormal (0.0, 1.0, 0.0);
+  model->addVertexNormal (0.0, 1.0, 0.0);
+  model->addVertexNormal (0.0, 1.0, 0.0);
+  model->addVertexNormal (0.0, 1.0, 0.0);
+  model->addVertexNormal (0.0, 0.0, -1.0);
+  model->addVertexNormal (0.0, 0.0, -1.0);
+  model->addVertexNormal (0.0, 0.0, -1.0);
+  model->addVertexNormal (0.0, 0.0, -1.0);
+  model->addVertexNormal (0.0, -1.0, 0.0);
+  model->addVertexNormal (0.0, -1.0, 0.0);
+  model->addVertexNormal (0.0, -1.0, 0.0);
+  model->addVertexNormal (0.0, -1.0, 0.0);
+  model->addVertexNormal (1.0, 0.0, 0.0);
+  model->addVertexNormal (1.0, 0.0, 0.0);
+  model->addVertexNormal (1.0, 0.0, 0.0);
+  model->addVertexNormal (1.0, 0.0, 0.0);
+  model->addVertexNormal (-1.0, 0.0, 0.0);
+  model->addVertexNormal (-1.0, 0.0, 0.0);
+  model->addVertexNormal (-1.0, 0.0, 0.0);
+  model->addVertexNormal (-1.0, 0.0, 0.0);
+
+  model->addUseMtl(material[0]);
+  model->addFace (4, 3, 1,1,1, 2,2,2, 4,4,3, 3,3,4);
+  model->addUseMtl(material[1]);
+  model->addFace (4, 3, 3,3,5, 4,4,6, 6,6,7, 5,5,8);
+  model->addUseMtl(material[2]);
+  model->addFace (4, 3, 5,5,9, 6,6,10, 8,8,11, 7,7,12);
+  model->addUseMtl(material[3]);
+  model->addFace (4, 3, 7,7,13, 8,8,14, 2,10,15, 1,9,16);
+  model->addUseMtl(material[4]);
+  model->addFace (4, 3, 2,2,17, 8,11,18, 6,12,19, 4,4,20);
+  model->addUseMtl(material[5]);
+  model->addFace (4, 3, 7,13,21, 1,1,22, 3,3,23, 5,14,24);
+}
 
 /**
@@ -76,7 +150,12 @@
    \param fileName The filename of the Texture
 */
-void SkyBox::setTexture(char* fileName)
+void SkyBox::setTexture(char* top, char* bottom, char* left, char* right, char* front, char* back)
 {
-  this->material->setDiffuseMap(fileName);
+  this->material[0]->setDiffuseMap(top);
+  this->material[1]->setDiffuseMap(bottom);
+  this->material[2]->setDiffuseMap(left);
+  this->material[3]->setDiffuseMap(right);
+  this->material[4]->setDiffuseMap(front);
+  this->material[5]->setDiffuseMap(back);
 }
 
@@ -94,5 +173,5 @@
   glTranslatef(r.x, r.y, r.z);
 
-  this->material->select();
+  this->material[1]->select();
 
   this->model->draw();
Index: orxonox/trunk/src/world_entities/skybox.h
===================================================================
--- orxonox/trunk/src/world_entities/skybox.h	(revision 3800)
+++ orxonox/trunk/src/world_entities/skybox.h	(revision 3801)
@@ -26,10 +26,12 @@
 
   void setSize(float size);
-  void setTexture(char* fileName);
+  void setTexture(char* top, char* bottom, char* left, char* right, char* front, char* back);
 
   virtual void draw();
 
- private: 
-  Material *material;    //!< A Material for the Skybox.
+ private:
+  void rebuild();
+
+  Material **material;    //!< A Material for the Skybox.
   float size;       //!< Radius of the Skybox. This should match the frustum maximum range.
     
