Index: GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2638)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2653)
@@ -29,12 +29,12 @@
 #VIEWCELLS=../data/test1/test-viewcells.xml
 
-SCENE=../data/Arena/arena-high-lods.obj
-VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz
+#SCENE=../data/Arena/arena-high-lods.obj
+#VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz
 #VIEWCELLS=../data/Arena/viewcells-5000.xml.gz
 #VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz
 
 
-# SCENE=../data/vienna/vienna_cropped.obj
-# VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz
+ SCENE=../data/vienna/vienna_cropped.obj
+ VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz
 #VIEWCELLS=../data/vienna/vienna_cropped-20000-viewcells.xml.gz
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp	(revision 2635)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp	(revision 2653)
@@ -72,5 +72,5 @@
   cout<<"Sampling Preprocessor started\n"<<flush;
   //  cout<<"Memory/ray "<<sizeof(VssRay)+sizeof(RssTreeNode::RayInfo)<<endl;
-
+  
   Randomize(0);
   const long startTime = GetTime();
@@ -81,5 +81,5 @@
 	ConstructViewCells();
   }
-
+  
   int intersectables, faces;
   mSceneGraph->GetStatistics(intersectables, faces);
Index: GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp	(revision 2652)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp	(revision 2653)
@@ -96,7 +96,8 @@
 
 	// for sg snapshot
-	mViewPoint = Vector3(18.5133, 10.9818, -1032.24);
-	mViewDirection = Vector3(-0.5373, 0, 0.843391);
-	  
+	//mViewPoint = Vector3(18.5133, 10.9818, -1032.24);
+	//mViewDirection = Vector3(-0.5373, 0, 0.843391);
+
+	
 	  //	mViewPoint = Vector3(1213.85, 176.988, -437.364);
 	  //	mViewDirection = Vector3(0.433884, 0, -0.900969);
@@ -118,4 +119,8 @@
 	mViewPoint = Vector3(35.092, 17.7078, -857.966);
 	mViewDirection = Vector3(-0.411287, 0, -0.911506);
+
+	// strange viewcell for error measurements (id 534)
+	mViewPoint = Vector3(1405.9, 218.284, -736.785);
+	mViewDirection = Vector3(0.989155, 0, 0.146877);
 
 #endif
@@ -1614,5 +1619,5 @@
   SetupProjection(GetWidth(), GetHeight());
   
-  cout << "mPvsStatFrames=" << mPvsStatFrames << endl;
+  cout << "mPvsStatFrames=" << viewPoints.size() << endl;
   
   SimpleRayContainer::const_iterator sit, sit_end = viewPoints.end();
@@ -1628,6 +1633,8 @@
 	  mViewPoint = sray.mOrigin;
 	  mViewDirection = sray.mDirection;
-	  
-	  if (1)//mPvsErrorBuffer[i].mError > 0.0f) 
+
+	  // skip all frames which have already 0 pixel error
+	  // $$ Reverted back by JB for efficiency
+	  if (mPvsErrorBuffer[i].mError > 0.0f) 
 	  {
 		  int pvsSize;
@@ -1639,10 +1646,13 @@
 		  mPvsErrorBuffer[i].mPvsSize = pvsSize;
 
-		  cout << "(vc: " << i << ", er: " << mPvsErrorBuffer[i].mError <<")" << endl;
+		  cout << "(" << i << "," << mViewPoint << "," << mViewDirection << mPvsErrorBuffer[i].mError <<")";
+		  //		  cout << "(vc: " << i << ", er: " << mPvsErrorBuffer[i].mError <<")" << endl;
 	  }
 
 	  const float err = mPvsErrorBuffer[i].mError;
 
-	  if (err < 0.99999f)//err >= 0.0f) 
+	  // do not account for the case that no PVS is rendered - hack for 08 rebuttal GVS evaluation
+	  // (correct would be >=0.0f)
+	  if (err >= 0.0f && err < 0.99999f) 
 	  {
 		  if (err > mPvsStat.maxError)
@@ -1657,7 +1667,10 @@
 		  if (err == 0.0f)
 			  ++ mPvsStat.errorFreeFrames;
+
+		  // $$ JB
+		  // moved it back here not to count frames with negative err (backfacing triangle)
+		  ++ mPvsStat.frames;
 	  }
-
-	  ++ mPvsStat.frames;
+	  
 	}
   
Index: GTP/trunk/Lib/Vis/Preprocessing/src/SG08/run_test_pixel_rebuttal
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/SG08/run_test_pixel_rebuttal	(revision 2646)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/SG08/run_test_pixel_rebuttal	(revision 2653)
@@ -4,5 +4,5 @@
 #COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+"
 #COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=500000 -samples_per_evaluation=10000000 -total_samples=500000000 -preprocessor_pvs_rendererror_samples=10000 -preprocessor_evaluatePixelError+"
-COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -samples_per_evaluation=10000000 -total_samples=250000000 -preprocessor_pvs_rendererror_samples=100000 -preprocessor_evaluatePixelError+ -preprocessor_detect_empty_viewspace+ -kd_pvs_area=1e-5 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ -view_cells_import_random_viewcells+ -view_cells_export_random_viewcells-"
+COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -samples_per_evaluation=10000000 -total_samples=250000000 -preprocessor_pvs_rendererror_samples=100000 -preprocessor_evaluatePixelError+ -preprocessor_detect_empty_viewspace+ -kd_pvs_area=1e-4 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ -view_cells_import_random_viewcells+ -view_cells_export_random_viewcells-"
  
 #SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d"
@@ -35,5 +35,5 @@
 #VIEWCELLS=../data/vienna/vienna-seq-viewcells-20000.xml.gz
 
-PREFIX=../work/plots/osp-vienna-SG08e-PIXELRb
+PREFIX=../work/plots/osp-vienna-SG08e-PIXELRd-1e4
 
 #SCENE=../data/atlanta/atlanta2.x3d
@@ -41,17 +41,15 @@
 
 
-
-# $COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
-# -preprocessor_visibility_file=$PREFIX-r-reference.xml \
-# -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \
-# -preprocessor_histogram_file=$PREFIX-r-reference.hlog
+#$COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
+#-preprocessor_visibility_file=$PREFIX-r-reference.xml \
+#-view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \
+#-preprocessor_histogram_file=$PREFIX-r-reference.hlog
 
 
-
-# $COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
-#  -rss_distributions=direction -view_cells_filter_max_size=1 \
-#  -preprocessor_visibility_file=$PREFIX-r-reference-global.xml \
-#  -preprocessor_stats=$PREFIX-r-reference-global.log \
-#  -preprocessor_histogram_file=$PREFIX-r-reference-global.hlog
+#$COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
+# -rss_distributions=direction -view_cells_filter_max_size=1 \
+# -preprocessor_visibility_file=$PREFIX-r-reference-global.xml \
+# -preprocessor_stats=$PREFIX-r-reference-global.log \
+# -preprocessor_histogram_file=$PREFIX-r-reference-global.hlog
 
 
@@ -62,4 +60,12 @@
 # -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4l.hlog
 
+
+$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
+-rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \
+-preprocessor_evaluate_filter- \
+-preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4l.xml \
+-preprocessor_stats=$PREFIX-i-mixed-b1-n4l-nofilter.log \
+-preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4f.hlog
+
 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
 -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \
@@ -68,5 +74,4 @@
 -preprocessor_stats=$PREFIX-i-mixed-b1-n4l.log \
 -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4f.hlog
-
 
 # $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
