Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vps.sh
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vps.sh	(revision 2723)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vps.sh	(revision 2725)
@@ -12,18 +12,19 @@
 
 #SCENE=../data/Arena/arena-high-lods.obj
-#VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz
+SCENE=../data/Arena/arena_trees.obj
+VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz
 #SCENE=../data/vienna/vienna_cropped.obj
 #SCENE=../data/roofs_new.obj
-SCENE=../data/vienna/city_full_hp.obj
+#SCENE=../data/vienna/city_full_hp.obj
 #SCENE=../data/vienna/vienna_rep.obj
 
-
 #SCENE=../data/vienna/vienna_cropped.obj
-VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz
-VIEWPOINTS=../data/vienna/testwalk.vp
+#VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz 
+#VIEWPOINTS=../data/vienna/testwalk.vp
+VIEWPOINTS=../data/arena/arena_key_cropped.vp
 
 #LOG_PREFIX=../src/SG08/rebut-arena-pixel2
 #LOG_PREFIX=../src/SG08/full
-LOG_PREFIX=../src/SG08/city_full
+LOG_PREFIX=../src/SG08/arena_trees
 
 ENVIRONMENT=gvs.env
@@ -39,9 +40,9 @@
 -preprocessor_use_vbos- \
 -gvs_epsilon=0.0001 \
--gvs_total_samples=1000000 \
--gvs_samples_per_pass=1000000 \
+-gvs_total_samples=100000 \
+-gvs_samples_per_pass=100000 \
 -gvs_initial_samples=16 \
--gvs_max_viewcells=5000 \
--gvs_min_contribution=500 \
+-gvs_max_viewcells=200000 \
+-gvs_min_contribution=2000 \
 -gvs_per_viewcell=true \
 -preprocessor_detect_empty_viewspace+ \
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_vienna
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_vienna	(revision 2724)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_vienna	(revision 2725)
@@ -8,12 +8,12 @@
 
 
-SCENE=../data/vienna/vienna_cropped.obj
+#SCENE=../data/vienna/vienna_cropped.obj
 #SCENE=../data/vienna/city_full.obj
-#SCENE=../data/vienna/city_full_hp.obj
+SCENE=../data/vienna/city_full_hp.obj
 #SCENE=../data/vienna/vienna_rep.obj
 
 VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz
-#VIEWCELLS=../data/vienna/vienna_cropped-seq-3000-false-20-viewcells.xml.gz
-VIEWCELLS=../data/vienna/vienna_cropped-57000-viewcells.xml.gz
+VIEWCELLS=../data/vienna/vienna_cropped-seq-3000-false-20-viewcells.xml.gz
+#VIEWCELLS=../data/vienna/vienna_cropped-57000-viewcells.xml.gz
 VIEWPOINTS=../data/vienna/testwalk.vp
 
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_arena
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_arena	(revision 2684)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_arena	(revision 2725)
@@ -9,12 +9,13 @@
 
 #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_evaluation=5000000 -samples_per_pass=500000 -total_samples=100000000"
+COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=5000000 -samples_per_pass=500000 -total_samples=100000000 -view_cells_import_random_viewcells+"
 
-#SCENE=../data/Arena/arena-high-lods.obj
-SCENE=../data/Arena/arena_trees.obj
+SCENE=../data/Arena/arena-high-lods.obj
+#SCENE=../data/Arena/arena_trees.obj
 
 #VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz
 #VIEWCELLS=../data/Arena/arena-high-lods-10000-viewcells.xml.gz
 VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz
+VIEWPOINTS=../data/arena/arena_key_cropped.vp
 
 # SCENE=../data/Pompeii/PompeiiTen.obj
@@ -37,4 +38,5 @@
 -preprocessor_stats=$PREFIX-i-mixed-b1-n4a.log \
 -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4a.hlog \
+ -view_cells_random_viewpoint_list=$VIEWPOINTS \
 demo1.env
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2723)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2725)
@@ -20,6 +20,5 @@
 #include "ObjectPlacer.h"
 
-#define TEASER 1
-
+#define TEASER 0
 #define USE_CG 1
 
@@ -247,5 +246,5 @@
 
 		// mat_specular and mat_shininess are NOT default values
-		/*GLfloat mat_ambient[] = {0.2f, 0.2f, 0.2f, 1.0f};
+		GLfloat mat_ambient[] = {0.5f, 0.5f, 0.5f, 1.0f};
 		GLfloat mat_diffuse[] = {1.0f, 1.0f, 1.0f, 1.0f};
 		GLfloat mat_specular[] = {0.3f, 0.3f, 0.3f, 1.0f};
@@ -256,7 +255,7 @@
 		glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
 		glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
-		*/
-
-		GLfloat light_ambient[] = {0.1, 0.1, 0.1, 1.0};
+		
+		GLfloat light_ambient[] = {0.3, 0.3, 0.3, 1.0};
+		//GLfloat light_diffuse[] = {0.6, 0.6, 0.6, 1.0};
 		GLfloat light_diffuse[] = {0.6, 0.6, 0.6, 1.0};
 		GLfloat light_specular[] = {1.0, 1.0, 1.0, 1.0};
@@ -272,9 +271,10 @@
 		glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
 		glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
+		glLightfv (GL_LIGHT0, GL_POSITION, light_position);
 		
 		glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
 		glEnable(GL_COLOR_MATERIAL);
 
-		GLfloat lmodel_ambient[] = {0.1f, 0.1f, 0.1f, 1.0f};
+		GLfloat lmodel_ambient[] = {0.3f, 0.3f, 0.3f, 1.0f};
 		glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
 
@@ -306,6 +306,4 @@
 	RenderPvs(pvs);
 
-	//cout << "rendered nodes: " << mRenderedNodes << endl;
-
 	//glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE);
 	//glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE);
@@ -340,8 +338,8 @@
 	pErrorPixels = (float)pixelCount / (GetWidth() * GetHeight());
 
-	const int pixelThres = -1;
+	const int pixelThres = 0;
 
 	// some error happened
-	if (pixelCount > pixelThres) 
+	if (1)//pixelCount > pixelThres) 
 	{
 		cout << "f " << mFrame << " id " << viewcell->GetId() << " pvs " << pvsSize 
@@ -468,5 +466,5 @@
 	
 	// mat_specular and mat_shininess are NOT default values
-	GLfloat mat_ambient[] = {0.1f, 0.1f, 0.1f, 1.0f};
+	GLfloat mat_ambient[] = {0.5f, 0.5f, 0.5f, 1.0f};
 	GLfloat mat_diffuse[] = {1.0f, 1.0f, 1.0f, 1.0f};
 	GLfloat mat_specular[] = {0.3f, 0.3f, 0.3f, 1.0f};
@@ -482,8 +480,8 @@
 
 	// a light	
-	GLfloat light_ambient[] = {0.05, 0.05, 0.05, 1.0};
-    GLfloat light_diffuse[] = {0.7, 0.7, 0.7, 1.0};
-    GLfloat light_specular[] = {0.3, 0.3, 0.3, 1.0};
-    //GLfloat light_position[] =  {0.f, .0f, 0.f, 1.0f};
+	GLfloat light_ambient[] = {0.3, 0.3, 0.3, 1.0};
+    GLfloat light_diffuse[] = {0.6, 0.6, 0.6, 1.0};
+    GLfloat light_specular[] = {1.0, 1.0, 1.0, 1.0};
+    GLfloat light_position[] =  {0.f, .0f, 0.f, 1.0f};
     //GLfloat light_position[] =  {600.0f, 250.0f, -500.f, 1.0f};
     //GLfloat light_position[] = {278.0f, 548.8f,279.0f, 1.0f};
@@ -495,11 +493,8 @@
 	glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
 
-	glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 1);
-	glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0);
-	glLightf(GL_LIGHT0, GL_QUADRATIC_ATTENUATION, 0);
-	
-	//	GLfloat light1_position[] =  {-22.076887, 21.070816, 50.272095};
-	
-	// GLfloat light1_position[] =  {0, 0, -100};
+	glLightfv(GL_LIGHT0, GL_POSITION, light_position);
+	
+	//glDisable(GL_LIGHT0);
+	glEnable(GL_LIGHT0);
 
 	glLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient);
@@ -507,20 +502,10 @@
 	glLightfv(GL_LIGHT1, GL_SPECULAR, light_specular);
 
-	glLightf(GL_LIGHT1, GL_CONSTANT_ATTENUATION, 1.0f);
-	glLightf(GL_LIGHT1, GL_LINEAR_ATTENUATION, 0);
-	glLightf(GL_LIGHT1, GL_QUADRATIC_ATTENUATION, 0);
-
-
-	glLightfv(GL_LIGHT2, GL_AMBIENT, light_ambient);
-	glLightfv(GL_LIGHT2, GL_DIFFUSE, light_diffuse);
-	glLightfv(GL_LIGHT2, GL_SPECULAR, light_specular);
-	
-	
-	glEnable(GL_LIGHT0);
-	glEnable(GL_LIGHT1); 
-	glEnable(GL_LIGHT2); 
-
-	
-	GLfloat lmodel_ambient[] = {0.05f, 0.05f, 0.05f, 1.0f};
+	// set position of the light2
+	GLfloat infinite_light2[] = {  -0.3, 1.5, 1.0, 0.0  };
+	glLightfv (GL_LIGHT1, GL_POSITION, infinite_light2);
+	//glEnable(GL_LIGHT1);
+
+	GLfloat lmodel_ambient[] = {0.3f, 0.3f, 0.3f, 1.0f};
 	glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
 	
@@ -605,11 +590,10 @@
 		if (i == mCurrentDynamicObjectIdx)
 			glColor3f(1, 0, 1);
-		else
-			glColor3f(0, 1, 0);
+		else glColor3f(0.6f, 0.6f, 0.6f);
 
 		_RenderDynamicObject(*dit);
 	}
 	
-	glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+	//glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
 }
 
@@ -1007,12 +991,4 @@
 	SetupCameraProjection(width(), height());
 	SetupCamera();
-
-	GLfloat light0_position[] =  {22.495655, 21.070816, -1001.375000};
-	GLfloat light1_position[] =  {-22.076887, 21.070816, -997.272095};
-	GLfloat light2_position[] =  { 0.3, 1.5, -0.3, 0.0  };
-
-	glLightfv (GL_LIGHT0, GL_POSITION, light0_position);
-	glLightfv (GL_LIGHT1, GL_POSITION, light1_position);
-	glLightfv (GL_LIGHT2, GL_POSITION, light2_position);
 
 	if (mRenderErrors) 
@@ -1214,8 +1190,9 @@
 
 	// export frame buffer during walkthrough
-	mExportFrameBuffer = true;
-	//mExportFrameBuffer = false;
-
-	SetSceneCut(1000);
+	//mExportFrameBuffer = true;
+	mExportFrameBuffer = false;
+
+	const int sceneCut = 339;
+	SetSceneCut(sceneCut);
 	mControlWidget = new QtRendererControlWidget(NULL);
 
@@ -1234,4 +1211,5 @@
 	connect(mControlWidget, SIGNAL(SetSceneCut(int)), this, SLOT(SetSceneCut(int)));
 	connect(mControlWidget, SIGNAL(SetTopDistance(int)), this, SLOT(SetTopDistance(int)));
+	connect(mControlWidget, SIGNAL(SetMaxRenderCost(int)), this, SLOT(SetMaxRenderCost(int)));
 	connect(mControlWidget, SIGNAL(SetTransparency(int)), this, SLOT(SetTransparency(int)));
 
@@ -1285,9 +1263,12 @@
 
 	setWindowTitle("PVS Visualization");
+// view cell cut: 300
+	mMaxRenderCost = 500;
+	mMaxRenderCost = 762;
 
 	// setting the main window size here
 	//resize(800, 600);
-	resize(640, 480);
-	
+	//resize(400, 300);
+		resize(512, 320);
 	mControlWidget->show();
 
@@ -1348,13 +1329,9 @@
 	AxisAlignedBox3 sceneBox = mViewCellsManager->GetViewSpaceBox();
 	
-	//float x = 1.0f;
-	//float y = 20.0f;
-	//float z = 80.0f;
-
-	float x = 20.0f;
-	float y = 20.0f;
-	float z = 20.0f;
+	//float x = 20.0f; float y = 20.0f; float z = 80.0f;
+	float x = 20.0f; float y = 20.0f; float z = 20.0f;
 
 	AxisAlignedBox3 box(Vector3(0.5f * x, 0, -0.5f * z), Vector3(-0.5f * x, y, 0.5f * z));
+	//AxisAlignedBox3 box(Vector3(0.5f * x, 0, 0), Vector3(-0.5f * x, y, z));
 
 //	box.Scale(Vector3(0.02f, 0.1f, 0.1f));
@@ -1560,8 +1537,9 @@
 	s.sprintf("PVS TRI: %08d", (int)mCurrentPvsCost);
 	//renderText(290, 70, s, font40);
-	renderText(325, 40, s, font40);
+	renderText(200, 40, s, font40);
+#if 0
 	s.sprintf("error: %3.3f %", mRenderError * 100.0f);
 	renderText(20, 40, s, font40);
-
+#endif
 	//renderText(290, 70, s, font40);
 	glEnable(GL_LIGHTING);
@@ -1619,4 +1597,5 @@
 		mSceneCutPlane.mD = -DotProd(mSceneCutPlane.mNormal, p);
 
+		cout << "cut view cells at " << number << endl;
 		updateGL();
 	}
@@ -1637,4 +1616,13 @@
 }
 
+
+void
+QtGlRendererWidget::SetMaxRenderCost(int number)
+{
+	mMaxRenderCost = number * 1000.0f;
+	cout << "max render cost at " << number << endl;
+	updateGL();
+}
+
 void QtGlRendererWidget::SetTransparency(int number)
 {
@@ -1646,7 +1634,9 @@
 float QtGlRendererWidget::ComputeRenderCost(ViewCell *vc)
 {
-	float renderCost = 0;
-
+	
 #ifdef USE_VERBOSE_PVS
+	// $matt temp
+	return vc->GetPvs().mStats.mWeightedTriangles;
+
 	if (mShowDistanceWeightedPvs)
 	{
@@ -1671,10 +1661,10 @@
 										  int &maxPiercingRays, 
 										  float &maxRelativeRays, 
-										  float &maxRcCost)
+										  float &maxCost)
 {
 	maxPvs = -1;
 	maxPiercingRays = 1; // not zero for savety
 	maxRelativeRays = Limits::Small; // not zero for savety
-	maxRcCost = Limits::Small;
+	maxCost = Limits::Small;
 
 	for (size_t i = 0; i < viewCells.size(); ++ i) 
@@ -1708,9 +1698,9 @@
 		else if (mShowWeightedCost)
 		{
-			const float rcCost = ComputeRenderCost(vc);
-			mViewCellsManager->UpdateScalarPvsCost(vc, rcCost);
-
-			if (rcCost > maxRcCost)
-				maxRcCost = rcCost;
+			const float rCost = ComputeRenderCost(vc);
+			mViewCellsManager->UpdateScalarPvsCost(vc, rCost);
+
+			if (rCost > maxCost)
+				maxCost = rCost;
 		}
 	}
@@ -1742,11 +1732,17 @@
 	
 	int maxPvs, maxPiercingRays;
-	float maxRelativeRays, maxRcCost;
-
-	ComputeMaxValues(viewcells, maxPvs, maxPiercingRays, maxRelativeRays, maxRcCost);
-	//cout << "maxRcCost: " << maxRcCost << endl;
+	float maxRelativeRays, maxCost;
+
+	ComputeMaxValues(viewcells, maxPvs, maxPiercingRays, maxRelativeRays, maxCost);
+	static int currentMaxCost = 0;
+
+	if (maxCost > currentMaxCost + 100000)
+	{
+		currentMaxCost = maxCost;
+		cout << "maxCost: " << maxCost << endl;
+	}
 
 	// set the max render cost to fixed value
-	//maxRcCost = 1000.0f;
+	maxCost = mMaxRenderCost;
 
 	// transparency	
@@ -1800,5 +1796,5 @@
 	{
 		if (!mShowComparison)
-			AssignImportanceByRelativeValue(viewcells, maxPvs, maxPiercingRays, maxRelativeRays, maxRcCost);
+			AssignImportanceByRelativeValue(viewcells, maxPvs, maxPiercingRays, maxRelativeRays, maxCost);
 		else
 		{
@@ -2093,5 +2089,4 @@
 	///////////////////////////
 
-	
 	QGroupBox *groupBox = new QGroupBox("Ray visualization");
 	QVBoxLayout *vbox2 = new QVBoxLayout;
@@ -2125,5 +2120,4 @@
 	connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution4(bool)));
 
-
 	vbox2->addStretch(1);
 	groupBox->setLayout(vbox2);
@@ -2223,5 +2217,5 @@
 	connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetRenderErrors(bool)));
 
-#if REMOVE_TEMPORARY
+#if 0
 	cb = new QCheckBox("Render cost curve", hbox);
 	hlayout->addWidget(cb);
@@ -2233,5 +2227,5 @@
 	cb->setChecked(false);
 	connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowRays(bool)));
-#if REMOVE_TEMPORARY	
+#if 0	
 	cb = new QCheckBox("Show Comparison", hbox);
 	hlayout->addWidget(cb);
@@ -2252,8 +2246,8 @@
 	vh->addWidget(groupBox, 0, 0);
 
-#if REMOVE_TEMPORARY
+
 	QGroupBox *groupBox2 = CreateRenderCostPanel(hbox);
 	vh->addWidget(groupBox2, 0, 0);
-	
+#if 0	
 	QGroupBox *groupBox3 = CreateRayVisualizationPanel(hbox);
 	vh->addWidget(groupBox3, 0, 0);
@@ -2295,5 +2289,5 @@
 	connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetSceneCut(int)));
 
-
+#if 0
 	cb = new QCheckBox("Use spatial filter", vbox);
 	vbox->layout()->addWidget(cb);
@@ -2314,5 +2308,5 @@
 
 	connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetSpatialFilterSize(int)));
-
+#endif
 	////////////////////////////
 
@@ -2336,5 +2330,5 @@
 
 	///////////////////////////////////////////
-
+#if 0
 	cb = new QCheckBox("Top View", vbox);
 	vbox->layout()->addWidget(cb);
@@ -2355,4 +2349,20 @@
 	connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetTopDistance(int)));
 	
+#endif
+	label = new QLabel("Max render cost");
+	vbox->layout()->addWidget(label);
+	
+	slider = new QSlider(Qt::Horizontal, vbox);
+	vbox->layout()->addWidget(slider);
+	slider->show();
+	slider->setRange(1, 1000);
+	slider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+	
+	slider->setValue(500);
+
+
+	connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetMaxRenderCost(int)));
+	
+
 
 	///////////////////////////////////////////
@@ -2495,5 +2505,5 @@
 											GlRendererBuffer::PvsErrorEntry &pvsErrorEntry)
 {
-
+#if 0
 	QListWidgetItem *i = mPvsErrorWidget->item(row);
 	QString s;
@@ -2505,4 +2515,5 @@
 	}
 	mPvsErrorWidget->update();
+#endif
 }
 
@@ -2693,4 +2704,7 @@
 		sViewPointsListIt = sViewPointsList.begin();
 	}
+	else
+		cerr << "view points list empty" << endl;
+		
 }
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h	(revision 2709)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h	(revision 2725)
@@ -126,4 +126,5 @@
   void SetSceneCut(int);
   void SetTopDistance(int);
+  void SetMaxRenderCost(int);
   void SetHidingCost(int);
   void SetVisibilityFilterSize(int);
@@ -251,4 +252,6 @@
 	bool mExportFrameBuffer;
 
+	float mMaxRenderCost;
+
 	DynamicObjectsContainer mDynamicPvsObjects;
 
@@ -405,4 +408,7 @@
 	void
 		SetTopDistance(int dist);
+
+	void
+		SetMaxRenderCost(int dist);
 
 	void
Index: GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp	(revision 2721)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp	(revision 2725)
@@ -104,5 +104,5 @@
 		mViewDirection = Vector3(-0.604798, 0, 0.796379);
 
-		if (0) {
+		if (1) {
 
 		// outside
@@ -1573,4 +1573,7 @@
 	int i = 0;
 
+	// $ tmp matt: somehow this is not properly initialised
+	ClearErrorBuffer();
+	cout << "here4 " << mPvsErrorBuffer.size() << endl;
 	for (sit = viewPoints.begin(); sit != sit_end; ++ sit, ++ i) 
 	{
@@ -1584,13 +1587,15 @@
 		mViewDirection = sray.mDirection;
 
+		cout << "handling vp " << mFrame << " " << mViewPoint << " " << mViewDirection << endl;
 		// skip all frames which have already 0 pixel error
 		// $$ Reverted back by JB for efficiency
-		if (mPvsErrorBuffer[i].mError > 0.0f) 
-		{
+		if (1)//mPvsErrorBuffer[i].mError > 0.0f) 
+		{
+			cout << "here3" << endl;
 			// compute the pixel error
 			mPvsErrorBuffer[i].mError = GetPixelError(pvsSize, mPvsStat.pass);
 			mPvsErrorBuffer[i].mPvsSize = pvsSize;
 
-			if (0 && (mPvsErrorBuffer[i].mError * GetWidth() * GetHeight() > 0) && (pvsSize > 0)) 
+			if ((mPvsErrorBuffer[i].mError * GetWidth() * GetHeight() > 0) && (pvsSize > 0)) 
 			{
 				cout << "error in frame " << i << "," << mViewPoint << "," << mViewDirection << " " 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor05.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor05.vcproj	(revision 2715)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor05.vcproj	(revision 2725)
@@ -157,5 +157,5 @@
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;..\src\GL;&quot;..\lib05\$(ConfigurationName)&quot;;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;&quot;..\MultiLevelRayTracing\RTScene\$(ConfigurationName)&quot;;&quot;..\MultiLevelRayTracing\RTWorld\$(ConfigurationName)&quot;;&quot;QtInterface\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0\lib&quot;;&quot;$(CG_LIB_PATH)&quot;"
-				GenerateDebugInformation="true"
+				GenerateDebugInformation="false"
 				SubSystem="1"
 				LargeAddressAware="2"
Index: GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp	(revision 2717)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp	(revision 2725)
@@ -243,5 +243,5 @@
 			//if (!node) cerr << "e " << obj->GetBox() << " " << ray.mTermination << endl; else 
 			if (!node->Mailed())
-			{//cout<<"o ";
+			{
 				// add to pvs
 				node->Mail();
@@ -442,5 +442,5 @@
 
 	//////////
-	//-- fill up simple rays with random rays so we can cast 16
+	//-- fill up simple rays with random rays so we can cast 16 rays simultaniosly
 
 	//const int numRandomRays = 0;
