Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/egsr_test_script
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/egsr_test_script	(revision 667)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/egsr_test_script	(revision 667)
@@ -0,0 +1,268 @@
+#!/bin/sh
+PROGRAM=../bin/release/Preprocessor.exe
+
+#SCENE=soda5
+SCENE=soda
+#SCENE=atlanta
+#SCENE=vienna
+
+LOG_PREFIX=../scripts/tests/egsr06/$SCENE
+
+ENVIRONMENT=$SCENE.env
+
+
+################################################################
+#                         vspbsptree                           #
+################################################################
+
+#
+# our method with full subdivision
+#
+
+METHOD=vspbsp
+
+$PROGRAM $ENVIRONMENT \
+-view_cells_type=vspBspTree \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+-vsp_bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
+-view_cells_post_process_merge=true \
+-view_cells_filename=$LOG_PREFIX-$METHOD-viewCells.x3d
+
+mv debug.log $LOG_PREFIX-$METHOD-debug.log
+
+
+################################################################
+#                          bsptree                             #
+################################################################
+
+#
+# teller bsp, i.e. largest polygons are prefered
+#
+
+
+METHOD=bsp
+
+$PROGRAM $ENVIRONMENT \
+-view_cells_type=bspTree \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+-bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
+-view_cells_post_process_merge=false \
+-view_cells_construction_samples=0 \
+-view_cells_filename=$LOG_PREFIX-$METHOD-viewCells.x3d
+
+mv debug.log $LOG_PREFIX-$METHOD-debug.log
+
+
+################################################################
+#                          nirenstein                          #
+################################################################
+
+#
+# driving axis kd-splits and termination on max depth and pvs size
+#
+
+METHOD=nirenstein
+
+$PROGRAM $ENVIRONMENT \
+-view_cells_type=vspBspTree \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+-bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
+-view_cells_post_process_merge=false \
+-vsp_bsp_split_only_driving_axis=true \
+-vsp_bsp_use_cost_heuristics=false \
+-vsp_bsp_max_poly_candidates=0 \
+-vsp_bsp_breath_first_splits=true \
+-vsp_bsp_term_min_pvs=15 \
+-view_cells_construction_samples=0 \
+-vsp_bsp_use_split_cost_queue=false \
+-vsp_bsp_term_max_depth=20 \
+-view_cells_filename=$LOG_PREFIX-$METHOD-viewCells.x3d 
+
+#-view_cells_term_max_view_cells=50000
+
+mv debug.log $LOG_PREFIX-$METHOD-debug.log
+
+
+
+################################################################
+#                          kdtree                              #
+################################################################
+
+#
+# only driving axis and breath-first split (similar to grid)
+#
+
+METHOD=kd
+
+$PROGRAM $ENVIRONMENT \
+-view_cells_type=vspBspTree \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+-bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
+-view_cells_construction_samples=0 \
+-view_cells_post_process_merge=false \
+-vsp_bsp_split_only_driving_axis=true \
+-vsp_bsp_use_cost_heuristics=false \
+-vsp_bsp_max_poly_candidates=0 \
+-vsp_bsp_use_split_cost_queue=false \
+-vsp_bsp_breath_first_splits=true \
+-view_cells_filename=$LOG_PREFIX-$METHOD-viewCells.x3d
+
+ mv debug.log $LOG_PREFIX-$METHOD-debug.log
+
+
+
+################################################################
+#                          octree                              #
+################################################################
+
+#
+# octree with breath first subdivison
+#
+
+METHOD=octree
+
+$PROGRAM $ENVIRONMENT \
+-view_cells_type=vspBspTree \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+-bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
+-view_cells_post_process_merge=false \
+-vsp_bsp_split_only_driving_axis=false \
+-vsp_bsp_use_cost_heuristics=false \
+-vsp_bsp_max_poly_candidates=0 \
+-vsp_bsp_breath_first_splits=true \
+-view_cells_construction_samples=0 \
+-vsp_bsp_simulate_octree=true \
+-vsp_bsp_use_split_cost_queue=false \
+-view_cells_filename=$LOG_PREFIX-$METHOD-viewCells.x3d
+
+mv debug.log $LOG_PREFIX-$METHOD-debug.log
+
+
+
+
+#
+#  for internal testing only
+#
+
+
+
+################################################################
+#           vspbsptree (only subdivision)                      #
+################################################################
+
+#
+# only view space subdivision, no merge
+#
+
+
+METHOD=onlysubdiv
+
+$PROGRAM $ENVIRONMENT \
+-view_cells_type=vspBspTree \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+-vsp_bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
+-view_cells_post_process_merge=false \
+-view_cells_filename=$LOG_PREFIX-$METHOD-viewCells.x3d
+
+mv debug.log $LOG_PREFIX-$METHOD-debug.log
+
+
+
+################################################################
+#             vspbsptree - few samples                         #
+################################################################
+
+#
+# use few samples for initial subdivision
+#
+
+METHOD=vsp-many-samples
+
+$PROGRAM $ENVIRONMENT \
+-view_cells_type=vspBspTree \
+-view_cells_term_max_view_cells=1000 \
+-vsp_bsp_construction_samples=100000 \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+-vsp_bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
+-view_cells_post_process_merge=true \
+-view_cells_filename=$LOG_PREFIX-$METHOD-viewCells.x3d
+
+mv debug.log $LOG_PREFIX-$METHOD-debug.log
+
+
+################################################################
+#             vspbsptree - good merge                          #
+################################################################
+
+#
+# use many samples for merge
+#
+
+METHOD=vsp-good-merge
+
+$PROGRAM $ENVIRONMENT \
+-view_cells_type=vspBspTree \
+-view_cells_construction_samples=8000000 \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+-vsp_bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
+-view_cells_post_process_merge=true \
+-view_cells_filename=$LOG_PREFIX-$METHOD-viewCells.x3d
+
+mv debug.log $LOG_PREFIX-$METHOD-debug.log
+
+
+
+
+################################################################
+#             vspbsptree - many samples                        #
+################################################################
+
+#
+# use many samples for initial subdivision
+#
+
+METHOD=vsp-many-samples
+
+$PROGRAM $ENVIRONMENT \
+-view_cells_type=vspBspTree \
+-view_cells_term_max_view_cells=1000 \
+-vsp_bsp_construction_samples=2000000 \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+-vsp_bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
+-view_cells_post_process_merge=true \
+-view_cells_filename=$LOG_PREFIX-$METHOD-viewCells.x3d
+
+mv debug.log $LOG_PREFIX-$METHOD-debug.log
+
+
+################################################################
+#             vspbsptree - many samples                        #
+################################################################
+
+#
+# use many samples for initial subdivision but don't use split cost queue
+#
+
+METHOD=vsp-many-samples-no-split-queue
+
+$PROGRAM $ENVIRONMENT \
+-view_cells_type=vspBspTree \
+-view_cells_term_max_view_cells=1000 \
+-vsp_bsp_construction_samples=2000000 \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+-vsp_bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
+-view_cells_post_process_merge=true \
+-vsp_bsp_use_split_cost_queue=true \
+-view_cells_filename=$LOG_PREFIX-$METHOD-viewCells.x3d
+
+mv debug.log $LOG_PREFIX-$METHOD-debug.log
Index: GTP/trunk/Lib/Vis/Preprocessing/src/VspKdTree.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/VspKdTree.cpp	(revision 598)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/VspKdTree.cpp	(revision 667)
@@ -495,5 +495,5 @@
 	app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n";
 
-	app << "#N_SPLITS ( Number of splits in axes x y z\n";
+	app << "#N_SPLITS ( Number of splits in axes x y z)\n";
 
 	for (int i = 0; i < 3; ++ i)
Index: GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp	(revision 666)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp	(revision 667)
@@ -152,5 +152,5 @@
 	Debug << "use random axis: " << mUseRandomAxis << endl;
 	Debug << "breath first splits: " << mBreathFirstSplits << endl;
-	Debug << "only driving axis: " << mOnlyDrivingAxis << endl;
+	
 	Debug << "octree: " << mSimulateOctree << endl;
 
@@ -482,5 +482,5 @@
 	
 	mBspStats.Start();
-	cout << "Contructing vsp bsp tree ... \n";
+	cout << "Constructing vsp bsp tree ... \n";
 
 	long startTime = GetTime();	
@@ -588,5 +588,5 @@
 	
 	mBspStats.Start();
-	cout << "Contructing vsp bsp tree ... \n";
+	cout << "Constructing vsp bsp tree ... \n";
 
 	long startTime = GetTime();	
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 666)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 667)
@@ -1280,7 +1280,7 @@
 
 	RegisterOption("ViewCells.maxViewCells",
-			optInt,
-			"view_cells_max_view_cells=",
-			"0");
+					optInt,
+					"view_cells_max_view_cells=",
+					"0");
 
 	RegisterOption("ViewCells.maxPvsRatio",
@@ -1290,63 +1290,67 @@
 
 	RegisterOption("ViewCells.filename",
-			optString,
-			"view_cells_filename=",
-			"atlanta_viewcells_large.x3d");
+					optString,
+					"view_cells_filename=",
+					"atlanta_viewcells_large.x3d");
 
 	RegisterOption("ViewCells.height",
-			optFloat,
-			"view_cells_height=",
-			"5.0");
+					optFloat,
+					"view_cells_height=",
+					"5.0");
 
 	RegisterOption("ViewCells.Visualization.colorCode",
-		optString,
-		"-view_cells_visualization_color_code",
-		"PVS");
+					optString,
+					"view_cells_visualization_color_code",
+					"PVS");
+
+	RegisterOption("ViewCells.Visualization.clipPlanePos",
+					optFloat,
+					"view_cells_visualization_clip_plane_pos",
+					"0.35");
+	
+	RegisterOption("ViewCells.Visualization.exportGeometry",
+					optBool,
+					"view_cells_visualization_export_geometry",
+					"false");
 
 	RegisterOption("ViewCells.Visualization.exportRays",
-		optBool,
-		"-view_cells_delayed_construction",
-		"false");
-	
-
-	RegisterOption("ViewCells.Visualization.exportGeometry",
-		optBool,
-		"-view_cells_visualization_export_geometry",
-		"false");
+					optBool,
+					"view_cells_visualization_export_rays",
+					"false");
 
 	RegisterOption("ViewCells.pruneEmptyViewCells",
-		optBool,
-		"-view_cells_prune_empty_view_cells",
-		"false");
+					optBool,
+					"view_cells_prune_empty_view_cells",
+					"false");
 
 	RegisterOption("ViewCells.processOnlyValidViewCells",
-		optBool,
-		"-view_cells_process_only_valid_view_cells",
-		"false");
+					optBool,
+					"view_cells_process_only_valid_view_cells",
+					"false");
 
 	
 	RegisterOption("ViewCells.PostProcess.maxCostRatio",
 			optFloat,
-			"-view_cells_post_process_max_cost_ratio=",
+			"view_cells_post_process_max_cost_ratio=",
 			"0.9");
 	
 	RegisterOption("ViewCells.PostProcess.renderCostWeight",
 			optFloat,
-			"-view_cells_post_process_render_cost_weight",
+			"view_cells_post_process_render_cost_weight",
 			"0.5");
 	
 	RegisterOption("ViewCells.PostProcess.avgCostMaxDeviation",
 			optFloat,
-			"-vsp_bsp_avgcost_max_deviations",
+			"vsp_bsp_avgcost_max_deviations",
 			"0.5");
 
 	RegisterOption("ViewCells.PostProcess.maxMergesPerPass", 
 		optInt, 
-		"vsp_bsp_term_max_merges_per_pass=", 
+		"view_cells_post_process_max_merges_per_pass=", 
 		"500");
 
 	RegisterOption("ViewCells.PostProcess.minViewCells", 
 		optInt, 
-		"vsp_bsp_term_post_process_min_view_cells=", 
+		"view_cells_post_process_min_view_cells=", 
 		"1000");
 
@@ -1857,5 +1861,5 @@
 	RegisterOption("VspBspTree.useSplitCostQueue",
 		optBool,
-		"-vsp_bsp_use_split_cost_queue=",
+		"vsp_bsp_use_split_cost_queue=",
 		"true");
 
@@ -1970,5 +1974,5 @@
 	RegisterOption("VspBspTree.splitUseOnlyDrivingAxis", 
 					optBool, 
-					"vsp_bsp_splitdriving=", 
+					"vsp_bsp_split_only_driving_axis=", 
 					"false");
 
@@ -2009,5 +2013,5 @@
 	RegisterOption("VspBspTree.useBreathFirstSplits",
 		optBool,
-		"-vsp_bsp_breath_first_splits=",
+		"vsp_bsp_breath_first_splits=",
 		"false");
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp	(revision 580)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp	(revision 667)
@@ -297,5 +297,5 @@
   app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n";
 
-  app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz \n";
+  app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz)\n";
   for (int i=0; i<7; i++)
     app << splits[i] <<" ";
Index: GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp	(revision 666)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp	(revision 667)
@@ -403,5 +403,5 @@
 	app << "#AXIS_ALIGNED_SPLITS (number of axis aligned splits)\n" << splits[0] + splits[1] + splits[2] << endl;
 
-	app << "#N_SPLITS ( Number of splits in axes x y z\n";
+	app << "#N_SPLITS ( Number of splits in axes x y z)\n";
 
 	for (int i = 0; i < 3; ++ i)
@@ -915,5 +915,5 @@
 
 	mStat.Start();
-	cout << "Contructing bsp tree ...\n";
+	cout << "Constructing bsp tree ...\n";
 	long startTime = GetTime();
 	while (!tStack.empty()) 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp	(revision 579)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp	(revision 667)
@@ -196,5 +196,5 @@
   app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n";
 
-  app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz \n";
+  app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz)\n";
   for (int i=0; i<7; i++)
     app << splits[i] <<" ";
Index: GTP/trunk/Lib/Vis/Preprocessing/src/VssTree.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/VssTree.cpp	(revision 551)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/VssTree.cpp	(revision 667)
@@ -154,5 +154,5 @@
   app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n";
 
-  app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz \n";
+  app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz)\n";
   for (int i=0; i<7; i++)
     app << splits[i] <<" ";
Index: GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 666)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 667)
@@ -16,5 +16,5 @@
 #include "RssPreprocessor.h"
 
-#define SAMPLE_AFTER_SUBDIVISION 0
+#define SAMPLE_AFTER_SUBDIVISION 1
 
 
@@ -210,5 +210,4 @@
 
 	// rays can be passed or deleted
-	if (0) // remove!!
 	disposeRays(initialSamples, outRays);
 	
@@ -216,5 +215,6 @@
 	// -- stats after contruction
 	ResetViewCells();
-  	Debug << "\nView cells after initial sampling: " << mCurrentViewCellsStats << endl;
+
+  	Debug << "\nView cells after initial sampling:\n" << mCurrentViewCellsStats << endl;
 
 	if (0) // export initial view cells
@@ -247,11 +247,12 @@
 		VssRayContainer constructionSamples;
 
-		const int samplingType = mSamplingType;
-/*			dirSamples ? 
+		const int samplingType =
+			dirSamples ? 
 						Preprocessor::DIRECTION_BASED_DISTRIBUTION :
 				 		Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION;
-*/
+
 		if (0)
 			dirSamples = !dirSamples; // toggle sampling method
+
 		numSamples += CastPassSamples(mSamplesPerPass, 
 									  samplingType,
@@ -333,21 +334,24 @@
 	}
 	
-	ViewCellContainer leaves;
-	mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves);
-	mViewCellsTree->ResetPvs();
-	VssRayContainer dummyRays;
-	CastPassSamples(mInitialSamples, mSamplingType, dummyRays);
-	
-	//ComputeSampleContributions(initialSamples, true, false);
-	ComputeSampleContributions(dummyRays, true, false);
-
-	ViewCellContainer::const_iterator it, it_end = leaves.end();
-
-	for (it = leaves.begin(); it != it_end; ++ it)
-	{
-		mViewCellsTree->PropagatePvs(*it);
-	}
-
-	mViewCellsTree->ExportStats("dummy.log");
+	if (0)
+	{
+		ViewCellContainer leaves;
+		mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves);
+		mViewCellsTree->ResetPvs();
+		VssRayContainer dummyRays;
+		CastPassSamples(mInitialSamples, mSamplingType, dummyRays);
+	
+		//ComputeSampleContributions(initialSamples, true, false);
+		ComputeSampleContributions(dummyRays, true, false);
+
+		ViewCellContainer::const_iterator it, it_end = leaves.end();
+
+		for (it = leaves.begin(); it != it_end; ++ it)
+		{
+			mViewCellsTree->PropagatePvs(*it);
+		}
+
+		mViewCellsTree->ExportStats("dummy.log");
+	}
 
 	return numSamples;
@@ -428,5 +432,5 @@
 
 		// output stats
-		sprintf(s, "Stats-%09d-eval.log", castSamples);
+		sprintf(s, "-%09d-eval.log", castSamples);
 		string fileName = string(statsPrefix) + string(s);
 
@@ -899,7 +903,9 @@
 {
 	int axis = 0;
-
-	const float factor = 0.65f;
-	Vector3 point = mViewSpaceBox.Min() +  mViewSpaceBox.Size() * factor;
+	float pos;
+
+	environment->GetFloatValue("ViewCells.Visualization.clipPlanePos", pos);
+
+	Vector3 point = mViewSpaceBox.Min() +  mViewSpaceBox.Size() * pos;
 
 	if (mUseClipPlaneForViz)
@@ -2663,8 +2669,9 @@
 
 	//TODO: remove
-	if(0)
-	mVspBspTree->Construct(constructionRays, &mViewSpaceBox);
+	if (1)
+		mVspBspTree->Construct(constructionRays, &mViewSpaceBox);
 	else
-mVspBspTree->Construct(rays, &mViewSpaceBox);
+		mVspBspTree->Construct(rays, &mViewSpaceBox);
+
 	// collapse invalid regions
 	cout << "collapsing invalid tree regions ... ";
@@ -2747,5 +2754,5 @@
 
 	//BspLeaf::NewMail();
-	if (0) // export merged view cells
+	if (1) // export merged view cells
 	{
 		mColorCode = 0;
@@ -2778,5 +2785,5 @@
 	}
 
-	if (0) // export merged view cells using pvs coding
+	if (1) // export merged view cells using pvs coding
 	{
 		mColorCode = 1;
Index: GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp
===================================================================
--- GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp	(revision 656)
+++ GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp	(revision 667)
@@ -12,4 +12,7 @@
 using namespace std;
 
+/** This is a small function which takes two log files and computes the
+	difference in percent of the weighted render cost.
+*/
 bool extractRenderCost(ifstream &file, vector<float> &renderCosts)
 {
@@ -49,11 +52,31 @@
 	vector<float> renderCosts2;
 	
+	if (argc < 4)
+	{
+		cerr << "arguments missing" << endl;
+		exit(1);
+	}
+
+
+	// read two files and the output file
+
+	// read file 1
 	ifstream file1(argv[1]);
-	ifstream file2(argv[2]);
+
+	// extract the render cost
+	cout << "extracting render cost of file " << argv[1] << endl;
+	cout.flush();
+	extractRenderCost(file1, renderCosts1);
+
+	// read file 2
+    ifstream file2(argv[2]);
+	cout << "extracting render cost of file " << argv[2] << endl;
+	cout.flush();
+	extractRenderCost(file2, renderCosts2);
+
+
+	cout << "writing output to file " << argv[3] << endl;
 
 	ofstream statsOut(argv[3]);
-
-	extractRenderCost(file1, renderCosts1);
-	extractRenderCost(file2, renderCosts2);
 
 	//statsOut << "rc1 size: " << (int)renderCosts1.size() << " " << (int)renderCosts2.size() << endl << endl;
