Index: code/branches/presentation3/src/orxonox/Level.cc
===================================================================
--- code/branches/presentation3/src/orxonox/Level.cc	(revision 7035)
+++ code/branches/presentation3/src/orxonox/Level.cc	(revision 7036)
@@ -145,5 +145,8 @@
     {
         std::string meshName = lodInformation->getMeshName();
-        this->lodInformation_.insert(std::make_pair(meshName,lodInformation));
+//         this->lodInformation_.insert(std::make_pair(meshName,lodInformation));
+        if( this->lodInformation_.find(meshName) != this->lodInformation_.end())
+          CCOUT(4) << "replacing lod information for " << meshName << endl;
+        this->lodInformation_[meshName] = lodInformation;
     }
 
Index: code/branches/presentation3/src/orxonox/graphics/MeshLodInformation.cc
===================================================================
--- code/branches/presentation3/src/orxonox/graphics/MeshLodInformation.cc	(revision 7035)
+++ code/branches/presentation3/src/orxonox/graphics/MeshLodInformation.cc	(revision 7036)
@@ -41,5 +41,5 @@
 
     MeshLodInformation::MeshLodInformation(BaseObject* creator) 
-	: BaseObject(creator), lodLevel_(-1), bEnabled_(true)
+	: BaseObject(creator), lodLevel_(5), bEnabled_(true), numLevels_(10), reductionRate_(0.15)
     {
         RegisterObject(MeshLodInformation);
@@ -56,4 +56,6 @@
         XMLPortParam(MeshLodInformation, "lodQuality", setLodLevel, getLodLevel, xmlelement, mode);
         XMLPortParam(MeshLodInformation, "enabled", setEnabled, getEnabled, xmlelement, mode);
+        XMLPortParam(MeshLodInformation, "numLevels", setNumLevels, getNumLevels, xmlelement, mode);
+        XMLPortParam(MeshLodInformation, "reductionRate", setReductionRate, getReductionRate, xmlelement, mode);
     }
     
Index: code/branches/presentation3/src/orxonox/graphics/MeshLodInformation.h
===================================================================
--- code/branches/presentation3/src/orxonox/graphics/MeshLodInformation.h	(revision 7035)
+++ code/branches/presentation3/src/orxonox/graphics/MeshLodInformation.h	(revision 7036)
@@ -47,4 +47,6 @@
             std::string getMeshName();
             bool getEnabled(){ return this->bEnabled_; }
+            unsigned int getNumLevels(){ return this->numLevels_; }
+            float getReductionRate(){ return this->reductionRate_; }
             
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
@@ -53,9 +55,13 @@
             void setLodLevel(float lodLevel);
             void setMeshSource(std::string meshSource);
-            void setEnabled( bool enabled ){ this->bEnabled_ = true; }
+            void setEnabled( bool enabled ){ this->bEnabled_ = enabled; }
+            void setNumLevels( unsigned int num ){ this->numLevels_ = num; }
+            void setReductionRate( float rate ){ this->reductionRate_ = rate; }
             std::string getMeshSource();
             std::string meshSource_;
             float lodLevel_;
             bool bEnabled_;
+            unsigned int numLevels_;
+            float reductionRate_;
 
     };
Index: code/branches/presentation3/src/orxonox/graphics/Model.cc
===================================================================
--- code/branches/presentation3/src/orxonox/graphics/Model.cc	(revision 7035)
+++ code/branches/presentation3/src/orxonox/graphics/Model.cc	(revision 7036)
@@ -42,13 +42,10 @@
     CreateFactory(Model);
 
-    Model::Model(BaseObject* creator) : StaticEntity(creator)
+    Model::Model(BaseObject* creator) : 
+        StaticEntity(creator), bCastShadows_(true), lodLevel_(5), bLodEnabled_(true), numLodLevels_(10), lodReductionRate_(.15)
     {
         RegisterObject(Model);
 
-        this->bCastShadows_ = true;
-
         this->registerVariables();
-        //LoD
-        this->lodLevel_=5;
     }
 
@@ -102,6 +99,5 @@
                 
                 //LOD
-                if(this->mesh_.getEntity()->getMesh()->getNumLodLevels()==1
-                    &&this->meshSrc_!="laserbeam.mesh")
+                if( this->mesh_.getEntity()->getMesh()->getNumLodLevels()==1 )
                 {
                     Level* level = this->getLevel();
@@ -109,9 +105,19 @@
                     assert( level != 0 );
                     
-                    if( level->getLodInfo(this->meshSrc_)!=0 )
-                        setLodLevel(level->getLodInfo(this->meshSrc_)->getLodLevel());
-                    if( level->getLodInfo(this->meshSrc_)==0 || level->getLodInfo(this->meshSrc_)->getEnabled() )
+                    MeshLodInformation* lodInfo = level->getLodInfo(this->meshSrc_);
+                    if( lodInfo )
                     {
-
+                        setLodLevel(lodInfo->getLodLevel());
+                        this->bLodEnabled_ = lodInfo->getEnabled();
+                        this->numLodLevels_ = lodInfo->getNumLevels();
+                        this->lodReductionRate_ = lodInfo->getReductionRate();
+                    }
+                    if( this->numLodLevels_>10 )
+                    {
+                        CCOUT(2) << "More than 10 LoD levels requested. Creating only 10." << endl;
+                        this->numLodLevels_ = 10;
+                    }
+                    if( this->bLodEnabled_ )
+                    {
                         float volume = this->mesh_.getEntity()->getBoundingBox().volume();
     //                     float scaleFactor = 1;
@@ -139,5 +145,5 @@
                             float factor = volume/3/lodLevel_;
                             
-                            COUT(4)<<"LodLevel set with factor: "<<factor<<std::endl;
+                            COUT(4) << "LodLevel set with factor: " << factor << endl;
 
                             distList.push_back(70.0f*factor);
@@ -151,10 +157,10 @@
                             distList.push_back(310.0f*factor);
                             distList.push_back(330.0f*factor);
-
-                            float reductionValue = 0.15f;
+                            while(distList.size()>this->numLodLevels_)
+                                distList.pop_back();
 
                             
                             //Generiert LOD-Levels
-                            this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
+                            this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, this->lodReductionRate_);
                         }
                         else
@@ -166,7 +172,9 @@
                                 what = "<0";
                             
-                            COUT(4)<<"LodLevel not set because lodLevel("<<lodLevel_<<") was "<<what<<"."<<std::endl;
+                            COUT(4)<<"LodLevel not set because lodLevel("<<lodLevel_<<") was "<<what<<"." << endl;
                         }
                     }
+                    else
+                        COUT(4) << "LodLevel for " << this->meshSrc_ << " not set because is disabled." << endl;
                 }
             }
Index: code/branches/presentation3/src/orxonox/graphics/Model.h
===================================================================
--- code/branches/presentation3/src/orxonox/graphics/Model.h	(revision 7035)
+++ code/branches/presentation3/src/orxonox/graphics/Model.h	(revision 7036)
@@ -79,4 +79,8 @@
             //LoD
             float lodLevel_;
+            bool bLodEnabled_;
+            unsigned int numLodLevels_;
+            float lodReductionRate_;
+            
     };
 }
