Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.env
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.env	(revision 1927)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.env	(revision 2075)
@@ -5,31 +5,35 @@
 
 Scene {
-
 filename ../data/vienna/vienna_cropped.obj
-#filename ../data/soda/soda.dat
-#filename ../data/soda/soda5.dat
-}
+}
+
 
 Preprocessor {
+	totalSamples 100000000
+#	totalSamples 2000000
+	samplesPerPass 250000
+	samplesPerEvaluation 5000000
+
+#	initialSamples 2000000
+
+	exportObj false
 	delayVisibilityComputation false
 	# stored sample rays
 	samplesFilename rays.out
-	#useGlRenderer true
 	useGlRenderer false
 	useGlDebugger false
-
-	# 0 = INTERNAL	1 = MLRT
+# 0 = INTERNAL 		1 = MLRT
 	rayCastMethod 0
 	
-#	type sampling
-#	type vss
-	type rss
-#	type render
+	type combined
 	detectEmptyViewSpace true
 	pvsRenderErrorSamples 0
 	quitOnFinish true
 	computeVisibility true
+
+	evaluateFilter false
 	applyVisibilityFilter false
 	applyVisibilitySpatialFilter false
+
 	visibilityFilterWidth	0.01
 	exportVisibility true
@@ -38,4 +42,15 @@
 	loadKdTree	false
 	exportKdTree false
+
+	histogram {
+		intervals 20
+		maxValue  600000
+	    file	histogram.log
+	}
+	Export {
+		rays false
+		numRays 5000
+	}
+
 }
 
@@ -44,24 +59,13 @@
 }
 
-RenderSampler {
-	samples 10000
-}
-
-
-SamplingPreprocessor {
-	totalSamples 100000000
-	samplesPerPass 1000000
-}
+
 
 RssPreprocessor {
-	samplesPerPass 1000
-	initialSamples 2000000
-	vssSamples 100000000
-#	vssSamples 1000000
-	vssSamplesPerPass 3000000
+
+	distributions mutation+spatial+object_direction
+#	distributions rss+object_direction
+#	distributions object_direction
+
 	useImportanceSampling true
-
-	directionalSampling false
-	objectBasedSampling false
 
 	Export {
@@ -74,37 +78,9 @@
 	loadInitialSamples false
 	storeInitialSamples false
-}
-
-RssTree {
-	epsilon		1e-6
-	perObjectTree false
-
-	maxDepth 	60
-	minPvs		1
-# before vienna test it was:
-#	minRays	50
-#	splitType heuristic
-
-	minRays		100
-	minSize		0.001
- 	maxCostRatio 1.0
-	maxRayContribution 1.0
-	maxRays		3000000
-	maxTotalMemory	200
-	maxStaticMemory	100
-
-#	splitType regular
-#	splitType heuristic
-	splitType hybrid
-	hybridDepth		10
-	splitUseOnlyDrivingAxis false
-#false
-	importanceBasedCost false
-
-	interleaveDirSplits	true
-    dirSplitDepth 0
-
-	ct_div_ci	0.0
-}
+
+	useRssTree true
+}
+
+
 
 Limits {
@@ -124,7 +100,8 @@
 		minCost 1
 		maxDepth 30
-		maxCostRatio 1.0
+		maxCostRatio 0.98
 		ct_div_ci 0.5
-		maxNodes 500000	
+		maxNodes 100000
+#500000	
 	}
 
@@ -134,7 +111,8 @@
 }
 
+
 MeshKdTree {
 	Termination {
-		minCost 8
+		minCost 150
 		maxDepth 18
 		maxCostRatio 0.9
@@ -147,6 +125,9 @@
 }
 
-
 ViewCells {
+	importRandomViewCells false
+
+	useKdPvs true
+	useKdPvsAfterFiltering true
 	# samples used for view cell construction
 	Construction {
@@ -156,6 +137,6 @@
 
 	#number of active view cells
-	active 20000
-	maxViewCells 20000
+	active 200000
+	maxViewCells 200000
 
 	maxStaticMemory	40
@@ -167,6 +148,6 @@
 	#type vspKdTree
 	#type bspTree
-	#type vspBspTree
-	type vspOspTree
+	type vspBspTree
+	#type vspOspTree
 	#type sceneDependent
 	
@@ -176,5 +157,5 @@
 	maxPvsRatio 1.0
 		
-	processOnlyValidViewCells false
+	processOnlyValidViewCells true
 
 	#stats viewCellStats.log
@@ -224,7 +205,10 @@
 	}
 
+#filename ../data/Arena/viewcells-20000.xml
+
+
 	filename ../data/vienna/vienna_cropped-gradient-viewcells.xml.gz
-}
-
+
+}
 
 
@@ -235,2 +219,3 @@
 	moveSpeed 0.0001
 }
+
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocessor-debug.sh
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocessor-debug.sh	(revision 1747)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocessor-debug.sh	(revision 2075)
@@ -1,3 +1,3 @@
-#!/bin/sh
-export PATH=$PATH:../bin
+#!/bin/bash
+export PATH="../bin:$PATH"
 ../bin/debug/preprocessor.exe $*
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocessor.sh
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocessor.sh	(revision 1455)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocessor.sh	(revision 2075)
@@ -1,3 +1,3 @@
-#!/bin/sh
+#!sh
 export PATH=$PATH:../bin
 ../bin/release/preprocessor.exe $*
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/arena.sh
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/arena.sh	(revision 1919)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/arena.sh	(revision 2075)
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility_internal.sh
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility_internal.sh	(revision 2075)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility_internal.sh	(revision 2075)
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+PREPROCESSOR=../bin/release/preprocessor.exe
+#PREPROCESSOR=../bin/debug/preprocessor.exe
+
+if [ $# -ne 3 ]
+then
+    echo "Usage:"
+	echo "preprocess_visibility scene_file.x3d viewcells_file.xml output_file.xml"
+    exit
+fi
+
+export PATH=$PATH:../bin
+
+NUM_SAMPLE_RAYS=1000000000
+
+$PREPROCESSOR -total_samples=$NUM_SAMPLE_RAYS \
+-scene_filename=$1 -view_cells_filename=$2 -preprocessor_visibility_file=$3 \
+-preprocessor_ray_cast_method=1 \
+-samples_per_pass=1000000 \
+-view_cells_use_kd_pvs- -af_use_kd_pvs- \
+-mutation_silhouette_prob=0.5 \
+-mutation_reverse_samples_distance=1.0 \
+-mutation_radius_origin=0.5 \
+-mutation_radius_termination=0.2 \
+-mutation_use_unsucc_count_importance- \
+-mutation_use_pass_importance+ \
+-mutation_buffer_size=2000000 \
+preprocess_visibility.env 
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.sh
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.sh	(revision 1926)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility.sh	(revision 2075)
@@ -15,4 +15,4 @@
 NUM_SAMPLE_RAYS=5000000
 
-$PREPROCESSOR -rss_vss_samples=$NUM_SAMPLE_RAYS \
+$PREPROCESSOR -total_samples=$NUM_SAMPLE_RAYS \
 -scene_filename=$1 -view_cells_filename=$2 -preprocessor_visibility_file=$3 preprocess_visibility.env 
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/vienna_cropped.sh
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/vienna_cropped.sh	(revision 1922)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/vienna_cropped.sh	(revision 2075)
@@ -1,2 +1,3 @@
+<<<<<<< .mine
 #!/bin/sh
 
@@ -38,4 +39,26 @@
 #######################################################
 
+NODES=50000
+USE_HEUR=true
+
+  METHOD=sequential-$NODES-$USE_HEUR
+  echo "$SCENE $METHOD"
+
+$PROGRAM $ENVIRONMENT \
+  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+ -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+ -view_cells_filename=$LOG_PREFIX-$METHOD-viewcells.xml.gz \
+ -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \
+ -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \
+ -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \
+ -hierarchy_construction_type=0 \
+ -vsp_use_cost_heuristics=$USE_HEUR \
+ -bvh_term_max_leaves=$NODES
+
+sh movefiles.sh $LOG_PREFIX-$METHOD
+
+
+#######################################################
+
 NODES=10000
 USE_HEUR=true
@@ -79,4 +102,85 @@
 
 sh movefiles.sh $LOG_PREFIX-$METHOD
+=======
+#!/bin/sh
+
+# add bin to path
+export PATH=../bin:$PATH
+
+#TARGET=debug
+TARGET=release
+
+PROGRAM=../bin/$TARGET/Preprocessor.exe
+
+SCENE=vienna_cropped_gi
+LOG_PREFIX=../scripts/tests/gi/$SCENE-35MB
+ENVIRONMENT=$SCENE.env
+
+echo "starting $TARGET mode for $SCENE scene"
+
+############################################################################
+
+ METHOD=gradient-full
+ echo "$SCENE $METHOD"
+
+$PROGRAM $ENVIRONMENT \
+  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+  -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+  -view_cells_filename=$LOG_PREFIX-$METHOD-viewcells.xml.gz \
+  -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \
+  -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \
+  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \
+  -hierarchy_construction_type=2 \
+  -hierarchy_construction_consider_memory=true \
+  -hierarchy_construction_multilevel=false \
+  -bvh_use_sah=false \
+  -vsp_use_cost_heuristics=true \
+  -hierarchy_construction_recompute_split_on_repair=true
+
+sh movefiles.sh $LOG_PREFIX-$METHOD
+
+#######################################################
+
+NODES=10000
+USE_HEUR=true
+
+  METHOD=sequential-$NODES-$USE_HEUR
+  echo "$SCENE $METHOD"
+
+$PROGRAM $ENVIRONMENT \
+  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+ -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+ -view_cells_filename=$LOG_PREFIX-$METHOD-viewcells.xml.gz \
+ -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \
+ -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \
+ -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \
+ -hierarchy_construction_type=0 \
+ -vsp_use_cost_heuristics=$USE_HEUR \
+ -bvh_term_max_leaves=$NODES
+
+sh movefiles.sh $LOG_PREFIX-$METHOD
+
+#######################################################
+
+ METHOD=gradient-full-corr
+ echo "$SCENE $METHOD"
+
+$PROGRAM $ENVIRONMENT \
+  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+  -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+  -view_cells_filename=$LOG_PREFIX-$METHOD-viewcells.xml.gz \
+  -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \
+  -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \
+  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \
+  -hierarchy_construction_type=2 \
+  -hierarchy_construction_consider_memory=true \
+  -hierarchy_construction_multilevel=false \
+  -bvh_use_sah=false \
+  -vsp_use_cost_heuristics=true \
+  -hierarchy_construction_min_avg_raycontri=0.01 \
+  -hierarchy_construction_max_avg_raycontri=0.5 \
+  -hierarchy_construction_recompute_split_on_repair=true
+
+sh movefiles.sh $LOG_PREFIX-$METHOD
 
 #######################################################
@@ -102,3 +206,3 @@
 
 
-#######################################################
+#######################################################>>>>>>> .r2034
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells	(revision 1404)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/generate_viewcells	(revision 2075)
@@ -12,5 +12,5 @@
 SCENE=generate_viewcells
 
-LOG_PREFIX=../scripts/vienna
+LOG_PREFIX=../scripts/soda
 
 ENVIRONMENT=$SCENE.env
@@ -23,5 +23,5 @@
 
 $PROGRAM $ENVIRONMENT \
--view_cells_type=vspBspTree \
+-view_cells_type=vspOspTree \
 -view_cells_construction_samples=0 \
 -vsp_bsp_construction_samples=500000 \
@@ -31,6 +31,6 @@
 -vsp_bsp_subdivision_stats=$LOG_PREFIX-$METHOD-subdivisionStats.log \
 -view_cells_post_process_merge=false \
--view_cells_active=1000 \
--view_cells_filename=$LOG_PREFIX-visibility.xml.zip \
+-view_cells_active=5000 \
+-view_cells_filename=$LOG_PREFIX-viewcells.xml.gz \
 -view_cells_export_pvs=true \
 -view_cells_export_bounding_boxes=true \
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/arena.env
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/arena.env	(revision 1919)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/arena.env	(revision 2075)
@@ -13,5 +13,5 @@
 #	filename ../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d
 #	filename ../data/vienna/vienna-buildings_vienna-roofs_vienna-roads_vienna-plane_cropped.obj
-	filename ../data/vienna/vienna_cropped.obj
+#	filename ../data/vienna/vienna_cropped.obj
 #	filename ../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d;../data/vienna/vienna-plane.x3d
 #	filename ../data/vienna/viewcells-25-sel.x3d
@@ -22,5 +22,5 @@
 #	filename ../data/grandcanyon1_RotXmin90.obj
 #	filename ../data/CityModel.obj
-	filename ../data/arena/arena-high-lods.obj
+	filename ../data/Arena/arena-high-lods.obj
 }
 
