Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/include/RandomUpdateCullingManager.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/include/RandomUpdateCullingManager.h	(revision 2258)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/include/RandomUpdateCullingManager.h	(revision 2259)
@@ -30,4 +30,5 @@
 
 protected:
+
 	/** Decides if node is considered to be visible depeding on the 
 		assumed visibility factor.
@@ -35,5 +36,4 @@
 	*/
 	bool DecideVisible(HierarchyNode *node) const;
-
 
 	/** Skip query for this node.
@@ -45,8 +45,10 @@
 	unsigned int mAssumedVisibility;
 
-	/** Threshold for rand function to return positive result with respect to
-		mAssumedVisibility.
+	/** Threshold for rand function to return positive result 
+		with respect to mAssumedVisibility.
 	*/
 	int mThreshold;
+
+	int mRandomCandidates;
 };
 
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/include/HierarchyInterface.h
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/include/HierarchyInterface.h	(revision 2258)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/include/HierarchyInterface.h	(revision 2259)
@@ -163,6 +163,6 @@
 	virtual void TraverseNode2(GtpVisibility::HierarchyNode *node) = 0;
 
-	virtual HierarchyNode *GetRandomLeaf() = 0;
-	virtual bool IsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const;
+	virtual HierarchyNode *GetRandomLeaf(HierarchyNode *root) = 0;
+	virtual bool IsNodeFullyVisible(GtpVisibility::HierarchyNode *node) const = 0;
 
 protected:
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp	(revision 2258)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp	(revision 2259)
@@ -10,4 +10,6 @@
 	// initialise random generator in case we use assumed visibility
 	srand(time(NULL));
+
+	mRandomCandidates = 1;
 }
 //-----------------------------------------------------------------------
@@ -18,4 +20,6 @@
 	// initialise random generator in case we use assumed visibility
 	srand(time(NULL));
+
+	mRandomCandidates = 1;
 }
 //-----------------------------------------------------------------------
@@ -45,5 +49,6 @@
 				// in case geometry is in interior node: 
 				// ensure that we only traverse once
-				if (!mHierarchyInterface->IsNodeVisible(node))
+				if (!mHierarchyInterface->IsNodeVisible(node) &&
+					!mHierarchyInterface->IsNodeFullyVisible(node))
 				{
 					mHierarchyInterface->TraverseNode(node);
@@ -105,5 +110,5 @@
 				{
 					// node fully visible => test only random leaves
-					/*for (int i = 0; i < mRandomCandidates; ++ i)
+					for (int i = 0; i < mRandomCandidates; ++ i)
 					{
 						HierarchyNode *randomLeaf = mHierarchyInterface->GetRandomLeaf(node);
@@ -116,6 +121,8 @@
 
 						queryQueue.push(QueryPair(node, 
-							mHierarchyInterface->IssueNodeOcclusionQuery(node, wasVisible)));
-					}*/
+							mHierarchyInterface->IssueNodeOcclusionQuery(node)));
+						
+						mHierarchyInterface->TraverseNode2(node);
+					}
 
 					continue;
@@ -151,4 +158,7 @@
 		}
 	}
+
+	// update the fully visible classifications
+	mHierarchyInterface->DetermineFullVisibility(mHierarchyInterface->GetHierarchyRoot());
 }
 //-----------------------------------------------------------------------
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
 {
