Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/scripts/GtpVisibility.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/scripts/GtpVisibility.vcproj	(revision 662)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/scripts/GtpVisibility.vcproj	(revision 827)
@@ -62,4 +62,5 @@
 			<Tool
 				Name="VCCLCompilerTool"
+				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="..\include;&quot;$(OGRE_PATH)\OgreMain\include&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp	(revision 726)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp	(revision 827)
@@ -70,4 +70,5 @@
 	
 	return (mCameraPosition - pos).squaredLength();
+	//return (mCullCamera->getDerivedPosition() - pos).squaredLength();
 }
 //-----------------------------------------------------------------------
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj	(revision 810)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj	(revision 827)
@@ -59,15 +59,17 @@
 		<Configuration
 			Name="Release|Win32"
-			OutputDirectory="..\bin\$(ConfigurationName)"
+			OutputDirectory="..\lib\$(ConfigurationName)"
 			IntermediateDirectory="..\obj\$(ConfigurationName)"
-			ConfigurationType="1"
+			ConfigurationType="4"
 			CharacterSet="2">
 			<Tool
 				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="2"
-				FavorSizeOrSpeed="1"
+				InlineFunctionExpansion="0"
+				FavorSizeOrSpeed="0"
+				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;..\src;&quot;$(CG_INC_PATH)&quot;;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces"
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
-				RuntimeLibrary="2"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="0"
 				DisableLanguageExtensions="FALSE"
 				ForceConformanceInForLoopScope="FALSE"
@@ -80,9 +82,5 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="xerces-c_2.lib zdll.lib zziplib.lib devil.lib qtmain.lib QtOpenGL4.lib QtCore4.lib QtGui4.lib Qt3Supportd4.lib QAxContainer.lib glut32.lib OpenGL32.Lib glu32.lib cg.lib cgGL.lib"
-				AdditionalLibraryDirectories="..\support\xercesc\lib\;..\support\zlib\lib\;..\support\devil\lib;&quot;$(QTDIR)\lib&quot;;..\include;..\src\GL;&quot;$(CG_LIB_PATH)&quot;;&quot;$(GTPDIR)\NonGTP\Xerces&quot;;&quot;$(GTPDIR)\NonGTP\Xerces\xercesc\lib&quot;;&quot;$(GTPDIR)\NonGTP\zlib\lib&quot;;&quot;$(GTPDIR)\NonGTP\Devil\lib&quot;"
-				GenerateDebugInformation="FALSE"
-				LargeAddressAware="2"/>
+				Name="VCLibrarianTool"/>
 			<Tool
 				Name="VCMIDLTool"/>
@@ -99,6 +97,4 @@
 			<Tool
 				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
 			<Tool
 				Name="VCManagedWrapperGeneratorTool"/>
@@ -205,7 +201,4 @@
 			</File>
 			<File
-				RelativePath="..\src\main.cpp">
-			</File>
-			<File
 				RelativePath="..\src\Material.cpp">
 			</File>
Index: GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 822)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 827)
@@ -4369,10 +4369,5 @@
 	case 1: // pvs
 		{
-			importance = (float)mViewCellsTree->GetPvsSize(vc) /
-#if 1 // hack for result			
-				(float)mCurrentViewCellsStats.maxPvs;
-#else
-				463.0f;
-#endif
+			importance = (float)mViewCellsTree->GetPvsSize(vc) / (float)mCurrentViewCellsStats.maxPvs;
 		}
 		break;
Index: GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp
===================================================================
--- GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp	(revision 744)
+++ GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp	(revision 827)
@@ -191,4 +191,28 @@
 
 
+
+
+
+// evaluate number of view cells needed for same rendercost
+int EvalSingleNumViewCells(const StatsContainer &currentStats,
+						   const float cost)
+{
+	
+	StatsContainer::const_iterator it, it_end = currentStats.end();
+
+	RenderStats dummy; dummy.mRenderCost = cost;
+	
+	// find equivalent render cost in the other stats container.
+	// don't stop until cursor is placed one element behind
+	// or end of vector is reached
+	StatsContainer::const_iterator equalCostIt = std::upper_bound(currentStats.begin(),currentStats.end(), dummy, vlt);
+
+	int j = (int)(equalCostIt - currentStats.begin());
+
+	return j;
+}
+
+
+
 int _tmain(int argc, _TCHAR* argv[])
 {
@@ -203,5 +227,5 @@
 	vector<string> outFilenames;
 	vector<string> outFilenames2;
-
+	vector<string> methodnames;
 	// read input files from command line
 	for (int i = 1; i < argc; ++ i)
@@ -227,7 +251,9 @@
 			string outFilename = string(fn) + string("-ratio.log");
 			string outFilename2 = string(fn) + string("-reverse.log");
-
+			
 			outFilenames.push_back(outFilename);
 			outFilenames2.push_back(outFilename2);
+			methodnames.push_back(fn);
+
 			cout << "new filen: " << outFilename2 << endl;
 		}
@@ -243,7 +269,10 @@
 	vector<string>::const_iterator sit, sit_end = outFilenames.end();
 	vector<string>::const_iterator sit2, sit2_end = outFilenames2.end();
+	vector<string>::const_iterator sit3, sit3_end = methodnames.end();
+
 
 	sit = outFilenames.begin();
 	sit2 = outFilenames2.begin();
+	sit3 = methodnames.begin();
 
 	// compare all values with this vector
@@ -253,10 +282,14 @@
 	//++ it;
 	//++ sit;
-
-	for (it; it != it_end; ++ it, ++ sit, ++ sit2)
+	ofstream statsOut3;
+	statsOut3.open("numviewcells.log");
+
+	for (it; it != it_end; ++ it, ++ sit, ++ sit2, ++sit3)
 	{
 		cout << "now writing output to file " << *sit << endl;
+
 		ofstream statsOut;
 		statsOut.open((*sit).c_str());
+	
 		ofstream statsOut2;
 		statsOut2.open((*sit2).c_str());
@@ -275,8 +308,17 @@
 		EvalNumViewCells(statsOut2, firstStats, (*it));
 
+		const float rendercost = 100;
+		const int j = EvalSingleNumViewCells(*it, rendercost);
+
+		statsOut3 << (*sit3).c_str() << " " << j << endl;
+
 		statsOut.close();
 		statsOut2.close();
 	}
 
+	statsOut3.close();
+
+
+
 	return 0;
 }
Index: GTP/trunk/Lib/Vis/shared/scripts/GtpVisibility.sln
===================================================================
--- GTP/trunk/Lib/Vis/shared/scripts/GtpVisibility.sln	(revision 668)
+++ GTP/trunk/Lib/Vis/shared/scripts/GtpVisibility.sln	(revision 827)
@@ -21,4 +21,9 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EvalStats", "..\EvalStats\EvalStats.vcproj", "{935D1BDD-41B0-49F1-A86C-EB49B94DDB20}"
 	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPreprocessor", "..\..\Preprocessing\scripts\TestPreprocessor.vcproj", "{0D592644-5404-4054-8F11-CF0B178D286D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{EABCE292-D598-4600-A1C9-2591E7D62FDA} = {EABCE292-D598-4600-A1C9-2591E7D62FDA}
 	EndProjectSection
 EndProject
@@ -49,4 +54,8 @@
 		{935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Release.ActiveCfg = Release|Win32
 		{935D1BDD-41B0-49F1-A86C-EB49B94DDB20}.Release.Build.0 = Release|Win32
+		{0D592644-5404-4054-8F11-CF0B178D286D}.Debug.ActiveCfg = Debug|Win32
+		{0D592644-5404-4054-8F11-CF0B178D286D}.Debug.Build.0 = Debug|Win32
+		{0D592644-5404-4054-8F11-CF0B178D286D}.Release.ActiveCfg = Release|Win32
+		{0D592644-5404-4054-8F11-CF0B178D286D}.Release.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
