Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOctreeHierarchyInterface.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOctreeHierarchyInterface.h	(revision 2258)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOctreeHierarchyInterface.h	(revision 2259)
@@ -55,9 +55,13 @@
 	void TraverseNode2(GtpVisibility::HierarchyNode *node);
 
-	HierarchyNode *GetRandomLeaf();
+	GtpVisibility::HierarchyNode *GetRandomLeaf(GtpVisibility::HierarchyNode *node);
 
 	bool IsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const;
 
+	void RenderNodeRecursive(GtpVisibility::HierarchyNode *node);
+
+
 protected:
+
 	/** Returns pointer to the bounding box of the node.
 		@param node current hierarchy node
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreSceneNodeHierarchyInterface.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreSceneNodeHierarchyInterface.h	(revision 2258)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreSceneNodeHierarchyInterface.h	(revision 2259)
@@ -48,5 +48,5 @@
 	void DetermineFullVisibility(GtpVisibility::HierarchyNode *node) const {}
 	void TraverseNode2(GtpVisibility::HierarchyNode *node) {}
-	HierarchyNode *GetRandomLeaf() { return NULL;}
+	GtpVisibility::HierarchyNode *GetRandomLeaf(GtpVisibility::HierarchyNode *root) { return NULL;}
 	bool IsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const { return false;}
 
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchyInterface.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchyInterface.h	(revision 2258)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchyInterface.h	(revision 2259)
@@ -97,4 +97,5 @@
 	void TraverseNode2(GtpVisibility::HierarchyNode *node) {}
 	bool IsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const { return false;}
+	GtpVisibility::HierarchyNode *GetRandomLeaf(GtpVisibility::HierarchyNode *root) { return NULL;}
 };
 
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeHierarchyInterface.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeHierarchyInterface.h	(revision 2258)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeHierarchyInterface.h	(revision 2259)
@@ -96,9 +96,10 @@
 	void DetermineFullVisibility(GtpVisibility::HierarchyNode *node) const {}
 
-	void TraverseNode2(GtpVisibility::HierarchyNode *node);
+	void TraverseNode2(GtpVisibility::HierarchyNode *node) {}
 
-	HierarchyNode *GetRandomLeaf() { return NULL;}
+	GtpVisibility::HierarchyNode *GetRandomLeaf(GtpVisibility::HierarchyNode *root) { return NULL;}
 
 	bool IsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const { return false;}
+
 };
 
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp	(revision 2258)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp	(revision 2259)
@@ -51,12 +51,17 @@
 }
 //-----------------------------------------------------------------------
-HierarchyNode *OctreeHierarchyInterface::GetRandomLeaf() 
+GtpVisibility::HierarchyNode *OctreeHierarchyInterface::GetRandomLeaf(GtpVisibility::HierarchyNode *root) 
 { 
-	return NULL;
-}
-//-----------------------------------------------------------------------
-bool OctreeHierarchyInterface::GIsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const
-{
-	return static_cast<Octree *>(node)->isOctreeFullyVisible();
+	if (IsLeaf(root))
+		return root;
+
+	Octree *octree = static_cast<Octree *>(root);
+
+	int mask = (int) (rand() * 8);
+	
+	// random decision
+	Octree *child = octree->mChildren[mask & 1][mask & 2][mask & 3];
+
+	return GetRandomLeaf(child);
 }
 //-----------------------------------------------------------------------
@@ -214,4 +219,25 @@
 }
 //-----------------------------------------------------------------------
+void OctreeHierarchyInterface::RenderNodeRecursive(GtpVisibility::HierarchyNode *node)
+{
+#ifdef GTP_VISIBILITY_MODIFIED_OGRE
+	Octree *octant = static_cast<Octree *>(node);
+
+	if (octant->lastRendered() != mFrameId)
+	{
+		octant->setLastRendered(mFrameId);
+		OctreeSceneManager *ocm = 
+			static_cast<OctreeSceneManager *>(mSceneManager);
+
+		ocm->_renderOctantRecursive(mCamera, 
+									octant, 
+									mOnlyShadowCasters, 
+									mLeavePassesInQueue);
+
+		mVisibleNodes.push_back(node);
+	}
+#endif	
+}
+//-----------------------------------------------------------------------
 bool OctreeHierarchyInterface::IsNodeVisible(GtpVisibility::HierarchyNode *node) const
 {
@@ -223,4 +249,13 @@
 }
 //-----------------------------------------------------------------------
+bool OctreeHierarchyInterface::IsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const
+{
+#ifdef GTP_VISIBILITY_MODIFIED_OGRE
+	return static_cast<Octree *>(node)->isOctreeFullyVisible();
+#else
+	return true;
+#endif
+}
+//-----------------------------------------------------------------------
 unsigned int OctreeHierarchyInterface::LastVisited(GtpVisibility::HierarchyNode *node) const
 {
