Index: GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo/include/PRMDemo.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo/include/PRMDemo.h	(revision 2296)
+++ GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo/include/PRMDemo.h	(revision 2334)
@@ -81,5 +81,5 @@
 		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Basic");
 		ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc");
-		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Demo");
+		//ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Demo");
 		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_PathMapDemo");
 	}
@@ -163,5 +163,5 @@
 		OgreIlluminationManager::getSingleton().initTechniques();
    }*/
-
+/*
 	void createScene(void) ///TOWERS
     {
@@ -214,5 +214,5 @@
 		
 		OgreIlluminationManager::getSingleton().initTechniques();
-   }/*
+   }*/
 
 	void createScene(void) ///PATHMAP Hangar
@@ -256,10 +256,10 @@
 		mainLight = mSceneMgr->createLight("MainLight");
 		mainLight->setType(Light::LT_SPOTLIGHT);
-		mainLight->setCastShadows(true);
-        mainLight->setDiffuseColour(ColourValue::White);
+		mainLight->setCastShadows(false);
+        mainLight->setDiffuseColour(ColourValue(0.5,0.8,1,1));
 		mainLight->setSpecularColour(ColourValue::White);
 		mainLightNode = rootNode->createChildSceneNode();
 		
-		mainLightNode->setPosition(32,1,0.0);		
+		mainLightNode->setPosition(30,1,0.0);		
 		mainLight->setPosition(30,0,0);
 		mainLight->setPowerScale(300);
@@ -268,7 +268,26 @@
 		mainLight->setAttenuation(50, 0, 1, 0);
 		mainLightNode->attachObject(mainLight); 	
+
+
+
+
+		Light* blueLight = mSceneMgr->createLight("BlueLight");
+		blueLight->setType(Light::LT_SPOTLIGHT);
+		blueLight->setCastShadows(false);
+        blueLight->setDiffuseColour(ColourValue(0.0,0.1,1,1));
+		blueLight->setSpecularColour(ColourValue::White);
+		SceneNode* blueLightNode = rootNode->createChildSceneNode();
+		
+		blueLightNode->setPosition(-30,1,0.0);		
+		blueLight->setPosition(-30,0,0);
+		blueLight->setPowerScale(300);
+		blueLight->setDirection(1, 0, 0);
+		blueLight->setSpotlightOuterAngle(Radian(Degree(90)));
+		blueLight->setAttenuation(50, 0, 1, 0);
+		blueLightNode->attachObject(blueLight); 	
+
 		
 		OgreIlluminationManager::getSingleton().initTechniques();
-   }*/
+   }
 	
 	void createPlane(Ogre::String _name, Ogre::String _material, Ogre::Vector3 _pos, Ogre::Vector2 _size, Ogre::Vector2 _subdivisions = Ogre::Vector2(1,1)) 
Index: GTP/trunk/App/Demos/Illum/Ogre/src/DiffuseTest/include/DiffuseTest.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Ogre/src/DiffuseTest/include/DiffuseTest.h	(revision 2260)
+++ GTP/trunk/App/Demos/Illum/Ogre/src/DiffuseTest/include/DiffuseTest.h	(revision 2334)
@@ -361,5 +361,5 @@
 		ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc");
 		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Basic");
-		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Diffuse");
+		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Diffuse_Simple");
 	}
 
@@ -379,6 +379,6 @@
 	void chooseSceneManager()
 	{
-		//mSceneMgr = mRoot->createSceneManager("OctreeSceneManager");
-		mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager");
+		mSceneMgr = mRoot->createSceneManager("OctreeSceneManager");
+		//mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager");
 	}
     
@@ -401,7 +401,7 @@
 	void createScene(void)
     {
-		std::string occlusion_cfg("OcclusionCulling.cfg");
-		mSceneMgr->setWorldGeometry(occlusion_cfg);
-		//createPostproc();
+		//std::string occlusion_cfg("OcclusionCulling.cfg");
+		//mSceneMgr->setWorldGeometry(occlusion_cfg);
+		createPostproc();
 		
 		OgreIlluminationManager::getSingleton().setMainCamera(mCamera);
@@ -661,6 +661,8 @@
 
      	Entity* object = mSceneMgr->createEntity("object", "buddha.mesh");
-		object->setMaterialName("GTP/Diffuse/Disc2Point");
+		//object->setMaterialName("GTP/Diffuse/Disc2Point");
 		//object->setMaterialName("GTP/Diffuse/Poly2Point");
+		object->setMaterialName("GTP/Diffuse/Poly2PointSimple");
+
 		objectNode = rootNode->createChildSceneNode();
 		objectNode->attachObject(object);
Index: GTP/trunk/App/Demos/Illum/Ogre/src/DiffuseTest/scripts/DiffuseTest.7.10.vcproj
===================================================================
--- GTP/trunk/App/Demos/Illum/Ogre/src/DiffuseTest/scripts/DiffuseTest.7.10.vcproj	(revision 2141)
+++ GTP/trunk/App/Demos/Illum/Ogre/src/DiffuseTest/scripts/DiffuseTest.7.10.vcproj	(revision 2334)
@@ -138,11 +138,4 @@
 	<Files>
 		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
-			<File
-				RelativePath="..\src\DiffuseTest.cpp">
-			</File>
-		</Filter>
-		<Filter
 			Name="Header Files"
 			Filter="h;hpp;hxx;hm;inl;inc">
@@ -150,4 +143,11 @@
 				RelativePath="..\include\DiffuseTest.h">
 			</File>
+			<Filter
+				Name="Source Files"
+				Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+				<File
+					RelativePath="..\src\DiffuseTest.cpp">
+				</File>
+			</Filter>
 		</Filter>
 		<Filter
Index: GTP/trunk/App/Demos/Illum/Ogre/src/Moria/include/Moria.h
===================================================================
--- GTP/trunk/App/Demos/Illum/Ogre/src/Moria/include/Moria.h	(revision 2329)
+++ GTP/trunk/App/Demos/Illum/Ogre/src/Moria/include/Moria.h	(revision 2334)
@@ -25,4 +25,6 @@
 #include "OgreIlluminationManager.h"
 #include "SceneSerializer.h"
+
+AnimationState* mAnimState;
 
 
@@ -49,11 +51,17 @@
     bool frameStarted(const FrameEvent& evt)
     {	
-	/*	light->setDirection(mCamera->getDirection());
-		light->setPosition(mCamera->getPosition());
-		mainLightNode->setPosition(mCamera->getPosition());*/
-		bool result = ExampleFrameListener::frameStarted(evt);
-       framecount++;
+		float thisTime = (float) Root::getSingleton().getTimer()->getMilliseconds() / 2000.0f;
+		
+		mainLightNode->setPosition(Vector3(10*cos(thisTime), 7, 10 * sin(thisTime)) + Vector3(5, 0, 5));
+		Vector3 pos = light->getDerivedPosition();
+		pos.normalise();
+		pos *= -1;
+		//light->setDirection( pos);
+		
+		framecount++;
 	  
-        return result;     
+	    mAnimState->addTime(evt.timeSinceLastFrame * 0.5);        
+
+        return ExampleFrameListener::frameStarted(evt);     
     }
 
@@ -82,7 +90,8 @@
 		ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc");
 		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Particles");
-		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Moria");
-		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_EnvMap");
-		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Caustic");
+		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_PathMap");
+		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Moria");		
+		//ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_EnvMap");
+		//ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Caustic");
 	}
 
@@ -108,6 +117,6 @@
 	void chooseSceneManager()
 	{
-		//mSceneMgr = mRoot->createSceneManager("OctreeSceneManager");
-		mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager");
+		mSceneMgr = mRoot->createSceneManager("OctreeSceneManager");
+		//mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager");
 	}
 
@@ -115,5 +124,5 @@
     {
 		std::string occlusion_cfg("OcclusionCulling.cfg");
-		mSceneMgr->setWorldGeometry(occlusion_cfg);
+		//mSceneMgr->setWorldGeometry(occlusion_cfg);
 		
 		//createPostproc();
@@ -122,8 +131,10 @@
 		OgreIlluminationManager::getSingleton().setMainViewport(mWindow->getViewport(0));
 		 OgreIlluminationManager::getSingleton().setFocusingSM(false);
-	   OgreIlluminationManager::getSingleton().setShadowMapSize(512);
+	   OgreIlluminationManager::getSingleton().setShadowMapSize(128);
 	   OgreIlluminationManager::getSingleton().setBlurShadowMap(true);
-	   OgreIlluminationManager::getSingleton().setShadowMapMaterialName("GTP/Basic/Distance_Normalized");//GameTools/ShadowMapDistance
-	  OgreIlluminationManager::getSingleton().setUseLISPSM(false);
+	   OgreIlluminationManager::getSingleton().setShadowMapMaterialName(Light::LT_SPOTLIGHT, "GTP/Basic/Distance_Normalized");//GameTools/ShadowMapDistance
+	   OgreIlluminationManager::getSingleton().setShadowMapMaterialName(Light::LT_POINT, "GTP/Basic/Distance_Normalized");
+	   OgreIlluminationManager::getSingleton().setUseLISPSM(false);
+	   OgreIlluminationManager::getSingleton().joinSharedRuns(false);
 				
 		Root::getSingleton()._setCurrentSceneManager(mSceneMgr);
@@ -133,5 +144,5 @@
 		mCamera->setFOVy(Radian(Degree(80)));
 		mCamera->setNearClipDistance(0.01);
-		mCamera->setFarClipDistance(1000);
+		mCamera->setFarClipDistance(150);
 		// Set ambient light
         mSceneMgr->setAmbientLight(ColourValue(0.1, 0.1, 0.1));
@@ -145,10 +156,11 @@
 		inputStream = ResourceGroupManager::getSingleton().openResource("moria.level");	//towers2.level	
 		s.parseScript(inputStream, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
-
+		s.parseEntryPoints("prmEntryPoints.text");
+/*
 	   ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "GTP/Moria/Smoke_Large");
 	   pSys1->setKeepParticlesInLocalSpace(false);
 	   SceneNode *pSysNode = rootNode->createChildSceneNode("psys1");
 	   pSysNode->attachObject(pSys1);
-	   pSysNode->setPosition(-40,-1,-15);
+	   pSysNode->setPosition(-40,-1,-15);*/
 		
 	   /*Entity* object = mSceneMgr->createEntity("object", "head.mesh");
@@ -163,6 +175,6 @@
 		//createPlane("p","groundmaterial",Vector3(0,-0.3,0),Vector2(150,150));
 
-		Light* mainLight = mSceneMgr->createLight("MainLight");
-		mainLight->setType(Light::LT_SPOTLIGHT);
+		mainLight = mSceneMgr->createLight("MainLight");
+		mainLight->setType(Light::LT_POINT);
 		mainLight->setCastShadows(true);
         mainLight->setDiffuseColour(ColourValue::White);
@@ -170,12 +182,27 @@
 		mainLightNode = rootNode->createChildSceneNode();
 		
-		mainLightNode->setPosition(-20,10,0);		
-		mainLight->setPosition(-20,10,0);
-		mainLight->setPowerScale(5);
-		mainLight->setDirection(-1,-0.2, -1);
+		mainLightNode->setPosition(15,10,15);		
+		mainLight->setPowerScale(30);
+		//mainLight->setDirection(1,0, 0);
 		mainLightNode->attachObject(mainLight);
-		mainLight->setSpotlightRange(Degree(0),Degree(90));
-		mainLight->setAttenuation(40.0, 0, 1, 0);
-		
+		//mainLight->setSpotlightRange(Degree(0),Degree(120));
+		mainLight->setAttenuation(40.0, 0, 3, 0);
+
+		Vector4 v = mainLight->getAs4DVector();
+
+		BillboardSet* bbs = mSceneMgr->createBillboardSet("bb", 1);
+		bbs->setDefaultDimensions(0.3, 0.3);
+		bbs->createBillboard(Vector3::ZERO, ColourValue::White);
+		bbs->setMaterialName("Flare");
+		mainLightNode->attachObject(bbs);
+
+		    Entity* ent = mSceneMgr->createEntity("troll", "troll.mesh");
+            // Add entity to the scene node
+            SceneNode *trollNode = mSceneMgr->getRootSceneNode()->createChildSceneNode( Vector3(5,0,5));
+			trollNode->attachObject(ent);
+			trollNode->setScale(0.1,0.1,0.1);
+            mAnimState = ent->getAnimationState("stand");
+            mAnimState->setEnabled(true);          
+
 		OgreIlluminationManager::getSingleton().initTechniques();
    }
