Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTree.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTree.h	(revision 1187)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTree.h	(revision 1190)
@@ -232,6 +232,5 @@
 					if (mLevel == level)
 					{
-						//mWBB->setMaterial("BaseGreenNoLighting");
-						mWBB->setMaterial("aabbHiLite");
+						mWBB->setMaterial("KdTree/BoxHiLite");
 						return mWBB;
 					}
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp	(revision 1187)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneManager.cpp	(revision 1190)
@@ -590,5 +590,5 @@
 	}
 
-	mVisibleNodes.clear();
+	mVisibleNodes.clear();	
 }
 
@@ -951,18 +951,9 @@
 		// ignore
 	}
-	// add bounding boxes of rendered objects
-	//if (0)
-		//for (BoxList::iterator it = mBoxes.begin(); it != mBoxes.end(); ++it)
-		//{
-		//	getRenderQueue()->addRenderable(*it);
-		//}
 
 	if (mRenderNodesForViz || mRenderNodesContentForViz)
 	{
 		// HACK: change node material so it is better suited for visualization
-		MaterialPtr nodeMat = MaterialManager::getSingleton().getByName("Core/NodeMaterial");
-		nodeMat->setAmbient(1, 1, 0);
-		nodeMat->setLightingEnabled(true);
-		nodeMat->getTechnique(0)->getPass(0)->removeAllTextureUnitStates();
+		//MaterialPtr nodeMat = MaterialManager::getSingleton().getByName("Core/NodeMaterial");
 
 		for (KdTree::NodeList::iterator it = mVisibleNodes.begin(); it != mVisibleNodes.end(); ++it)
@@ -970,26 +961,13 @@
 			if (mRenderNodesForViz)
 			{
-				//KdTreeSceneNode * node = static_cast<KdTreeSceneNode *>(*it);
-				//// render the leaf nodes
-				//if (node->numAttachedObjects() && 
-				//	!node->numChildren() && 
-				//	(node->getAttachedObject(0)->getMovableType() == "Entity") &&
-				//	node->getAttachedObject(0)->isVisible())
-				//{
-				//	//getRenderQueue()->addRenderable(node);
-				//	node->_addBoundingBoxToQueue(getRenderQueue());
-				//}
-
-				/*** TODO: fix this ... maybe revert to original state, not quite happy now! ***/
-
-				// addbounding boxes instead of node itself
-				//(*it)->_addBoundingBoxToQueue(getRenderQueue());
+				WireBoundingBox * wirebox = (*it)->getWireBoundingBox();
+				if (wirebox)
+					getRenderQueue()->addRenderable(wirebox);
 			}
 			// add renderables itself
 			if (mRenderNodesContentForViz) 
 			{
-				//(*it)->queueObjects(cam, getRenderQueue(), false);
 				(*it)->queueVisibleObjects(mHierarchyInterface->GetFrameId(), 
-					cam, getRenderQueue(), false, mShowBoxes);
+					cam, getRenderQueue(), false, true);
 			}
 		}
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneNode.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneNode.cpp	(revision 1187)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneNode.cpp	(revision 1190)
@@ -39,4 +39,11 @@
 	void KdTreeSceneNode::computeScene(PlaneEventList& events, AxisAlignedBox& aabb, int& nObjects, bool includeChildren)
 	{
+		/**************************************************************************************/
+		/* HACK: do not include camera node, FUCKS UP world AABB really BAD, dunno why        */
+		/* TODO: find a generic solution where MOVABLE nodes are NOT INSERTED into the KDTREE */
+		/**************************************************************************************/
+		if (mName == "PlayerCamNode")
+			return;
+
 		// first compute nodes AABB
 		mWorldAABB.setNull();
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTree.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTree.cpp	(revision 1187)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTree.cpp	(revision 1190)
@@ -311,14 +311,28 @@
 	mShowNodeAABB(true)
 	{
-#ifdef KDTREE_DEBUG
-		MaterialPtr mp = MaterialManager::getSingleton().getByName("aabbHiLite");
-		if (mp.isNull())
-		{
-			ColourValue cv(0.0, 1.0, 0.0);
-			MaterialPtr mp = MaterialManager::getSingleton().create("aabbHiLite","General");
-			mp->setSelfIllumination(cv);
-			mp->setDiffuse(cv);
-		}
-#endif
+		MaterialPtr mphi = MaterialManager::getSingleton().getByName("KdTree/BoxHiLite");
+		if (mphi.isNull())
+		{
+			ColourValue green(0, 1, 0);
+			mphi = MaterialManager::getSingleton().create("KdTree/BoxHiLite", "General");
+			mphi->setAmbient(green);
+			mphi->setDiffuse(green);
+			mphi->setSelfIllumination(ColourValue::Black);
+			mphi->setLightingEnabled(true);
+			mphi->getTechnique(0)->getPass(0)->removeAllTextureUnitStates();
+		}
+
+		MaterialPtr mpviz = MaterialManager::getSingleton().getByName("KdTree/BoxViz");
+		if (mpviz.isNull())
+		{
+			ColourValue yellow(1, 1, 0);
+			mpviz = MaterialManager::getSingleton().create("KdTree/BoxViz", "General");
+			mpviz->setAmbient(yellow);
+			mpviz->setDiffuse(yellow);
+			mpviz->setSelfIllumination(ColourValue::Black);
+			mpviz->setLightingEnabled(true);
+			mpviz->getTechnique(0)->getPass(0)->removeAllTextureUnitStates();
+		}
+
 		try
 		{
