Index: trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj
===================================================================
--- trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj	(revision 370)
+++ trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj	(revision 371)
@@ -103,7 +103,4 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
 			<File
-				RelativePath="..\src\BatchedQueriesCullingManager.cpp">
-			</File>
-			<File
 				RelativePath="..\src\CoherentHierarchicalCullingManager.cpp">
 			</File>
@@ -140,7 +137,4 @@
 			Filter="h;hpp;hxx;hm;inl;inc;xsd"
 			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<File
-				RelativePath="..\include\BatchedQueriesCullingManager.h">
-			</File>
 			<File
 				RelativePath="..\include\CoherentHierarchicalCullingManager.h">
Index: trunk/VUT/GtpVisibility/src/VisibilityManager.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/VisibilityManager.cpp	(revision 370)
+++ trunk/VUT/GtpVisibility/src/VisibilityManager.cpp	(revision 371)
@@ -5,5 +5,5 @@
 #include "DummyPreprocessingManager.h"
 #include "DummyQueryManager.h"
-#include "BatchedQueriesCullingManager.h"
+//#include "BatchedQueriesCullingManager.h"
 
 namespace GtpVisibility {
Index: trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env	(revision 370)
+++ trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env	(revision 371)
@@ -82,5 +82,5 @@
 	#	input fromViewCells
 	#	input fromSceneGeometry
-		samples 200000
+		samples 100000
 		sideTolerance 0.005
 	}
Index: trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.h
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.h	(revision 369)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.h	(revision 371)
@@ -97,4 +97,8 @@
 	int PostprocessViewCells(const RayContainer &rays);
 
+	/** Simulated rendering using a simple render heuristics. Used to evaluate the 
+		quality of the view cell partition.
+	*/
+	Real EvaluateRenderHeuristics();
 };
 
Index: trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp	(revision 370)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp	(revision 371)
@@ -531,5 +531,4 @@
 		cout << "#totalPvsSize=" << mKdTree->CollectLeafPvs() << endl;
   
-	// merge or subdivide view cells
 	if (mBspTree)
 	{
@@ -538,4 +537,5 @@
 		Debug << "original pvs size: " << mBspTree->CountViewCellPvs() << endl;
 
+		// merge or subdivide view cells
 		long startTime = GetTime();
 		int merged = PostprocessViewCells(mSampleRays);
@@ -548,4 +548,10 @@
 		Debug << "merged pvs size: " << mBspTree->CountViewCellPvs() << endl;
 
+
+		cout << "evaluating render time heuristics ... ";
+		Real rt = EvaluateRenderHeuristics();
+		cout << "finished" << endl;
+
+		Debug << "render time: " << rt * 1e-3 << endl;
 	}
 	
@@ -881,2 +887,40 @@
 	}
 }
+
+Real SamplingPreprocessor::EvaluateRenderHeuristics()
+{
+	Real renderTime = 0;
+
+	const float objRt = 1.0f; // render time for 1 object of PVS
+	const float vcOverhead = 1.0f; // const overhead for crossing a view cell border
+	
+	float totalArea = 0;
+
+	ViewCellContainer viewCells;
+
+	mBspTree->CollectViewCells(viewCells);
+
+	ViewCellContainer::const_iterator it, it_end = viewCells.end();
+	PolygonContainer::const_iterator pit;
+
+	for (it = viewCells.begin(); it != it_end; ++ it)
+	{
+		// surface area substitute for probability
+		PolygonContainer cell;
+		float area = 0;
+
+		mBspTree->ConstructGeometry(dynamic_cast<BspViewCell *>(*it), cell);
+
+		for (pit = cell.begin(); pit != cell.end(); ++ pit)
+			area += (*pit)->GetArea();
+		
+		renderTime += area * (*it)->GetPvs().GetSize() * objRt;
+		totalArea += area;
+	}
+
+	renderTime /= totalArea;
+
+	renderTime += (float)viewCells.size() * vcOverhead;
+	
+	return renderTime;
+}
