Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/gvs.env
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/gvs.env	(revision 2596)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/gvs.env	(revision 2596)
@@ -0,0 +1,312 @@
+##############################################################################
+# ERS default configuration file
+# Jiri Bittner 2003
+#############################################################################
+
+Scene {
+
+#	filename glasgow1.x3d
+#	filename vienna.x3d
+#	filename ../data/vienna/vienna-simple.x3d
+#	filename ../data/vienna/vienna-buildings.x3d
+#	filename ../data/vienna/vienna-roofs.x3d
+#	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
+#	filename ../data/atlanta/atlanta2.x3d
+#	filename ../data/soda/soda.dat
+#	filename ../data/soda/soda5.dat
+#	filename ../data/soda/soda5.obj
+#	filename ../data/soda/soda.obj
+	filename ../data/vienna/vienna_cropped.obj
+#	filename ../data/soda/soda5_mod_spheres.obj
+#	filename ../data/artificial/cube_test.x3d
+#	filename ../data/grandcanyon1_RotXmin90.obj
+#	filename ../data/CityModel.obj
+}
+
+
+Preprocessor {
+	samplesFilename rays.out
+#	useGlRenderer true
+	useGlRenderer false
+	type vss
+	detectEmptyViewSpace true
+	loadMeshes false
+	# internal raycaster
+	#rayCastMethod 0
+	# intel raycaster
+	rayCastMethod 1
+	exportVisibility false
+	applyVisibilityFilter false
+	applyVisibilitySpatialFilter false
+#	useViewSpaceBox true
+}
+
+
+VssPreprocessor {
+	useImportanceSampling true
+	loadInitialSamples  false
+	storeInitialSamples false
+}
+
+
+VssTree {
+	useRss    false
+	epsilon		1e-6
+	
+	maxDepth 	2
+	minPvs		30
+	minRays		800
+	minSize		0.001
+ 	maxCostRatio	1.5
+	maxRayContribution 0.5
+		
+	maxTotalMemory	50
+	maxStaticMemory	20
+	
+	splitType regular
+	#	splitType heuristic
+	#	splitType hybrid
+	splitUseOnlyDrivingAxis true
+	
+	interleaveDirSplits	true
+    dirSplitDepth 0
+	
+	numberOfEndPointDomains	10000
+	ct_div_ci	0.0
+	randomize	false
+	
+	refDirBoxMaxSize	0.1
+}
+
+
+Limits {
+       threshold	1e-6
+       small		1e-6
+       infinity		1e9
+}
+
+
+Unigraphics {
+	meshGrouping 1
+}
+
+
+KdTree {
+	sahUseFaces true
+
+	Termination {
+		minCost 0
+		maxDepth 20
+		
+		maxCostRatio 1.5
+		ct_div_ci 0.5
+	}
+
+#	splitMethod spatialMedian
+	splitMethod SAH
+	splitBorder 0.01
+}
+
+MeshKdTree {
+	Termination {
+		minCost 1
+		maxDepth 18
+		maxCostRatio 0.9
+		ct_div_ci 0.5
+	}
+
+#	splitMethod spatialMedian
+	splitMethod SAH
+	splitBorder 0.01
+}
+
+
+ViewCells {
+	
+	# samples used for view cell construction 
+	# (after the sampling used for the hierarchy)
+	Construction {
+		samples 0
+		samplesPerPass 1000000
+	}
+
+	# number of active view cells
+	active 25000
+	maxStaticMemory	40
+
+	exportToFile true
+	loadFromFile false
+
+	exportPvs true
+	type vspOspTree
+	
+	#percentage of total visible objects where pvs is considered invalid
+	maxPvsRatio 1.0
+		
+	processOnlyValidViewCells false
+
+	#stats viewCellStats.log
+	#samplingType directional
+	#samplingType reverse_object
+	samplingType box
+
+	PostProcess {
+		# how much samples are used for post processing
+		samples 0
+		maxMergesPerPass 5000
+		useRaysForMerge false
+		refine false
+		compress true
+		merge false
+	}
+
+	Visualization {
+		# how much samples we use for visualization
+		samples 1000
+		exportRays true
+		exportGeometry true
+		exportMergedViewCells false
+		useClipPlane true
+		clipPlaneAxis 1
+		clipPlanePos 0.3
+		maxOutput 2
+	}
+
+	showVisualization true
+	#evaluateiewCells true
+	#showVisualization false
+	evaluateViewCells true
+	
+	Evaluation {
+		samples         300000
+		samplesForStats 300000
+		samplesPerPass  300000
+
+		stepSize 50
+		
+		#samplingType reverse_object
+		samplingType box
+		statsPrefix ../scripts/viewCells
+	}
+}
+
+
+################################
+#
+# View space partitioning kd tree
+#
+
+VspTree {
+	Construction {
+	}
+
+	Termination {
+		minPvs 0
+		maxViewCells 500000
+	}
+
+	useCostHeuristics false
+	splitUseOnlyDrivingAxis false
+
+	# maximum number of tests per node
+	maxTests 30000
+}
+
+
+##########################
+#
+# The bounding volume hierarchy
+#
+
+BvHierarchy {
+
+	Construction {
+		
+	}
+
+	Termination {
+		maxLeaves 500000
+	}
+
+	useCostHeuristics true
+	useSah true
+	splitUseOnlyDrivingAxis false
+	minRaysForVisibility 3
+
+	maxTests 300
+}
+
+
+###############################################################
+#
+# Manages the construction of view space and object space partition
+#
+
+Hierarchy {
+
+	# the type of object space partition: view space is always vsp (=kd) partition
+	type bvh
+	
+	Construction {
+
+		samples 30000
+
+		# type 0 = sequential computation, 1 = interleaved, 2 = gradient
+		type 0
+
+		# if the object space should be subdivided first (if false, the view space is subdivided first)
+		startWithObjectSpace true
+
+		###############################
+		# only for interleaved method
+
+		# if dirty split candidates are reevaluated 
+		repairQueue true
+
+		# recompute split plane when "repairing" a candidate
+		recomputeSplitPlaneOnRepair true
+
+		###################################################
+
+		# iterative construction of vs partititon and os partition
+		useMultiLevel false
+
+		# number of iteration steps
+		levels 3
+
+		# minimal steps of same type: for interleaved, this is only valid for the first few splits
+		minStepsOfSameType 10
+		maxStepsOfSameType 50
+
+		maxRepairs 10
+	}
+
+	Termination {
+		# maximal number of leaves
+		maxLeaves 4000
+		# maximal memory in MB
+		maxMemory 0.1
+		# minimum ratio of global cost decrease
+		minGlobalCostRatio -1
+	}
+}
+
+
+VspBspTree {
+	Construction {
+		samples 100000
+	}
+
+	Termination {
+		minPvs 0
+		maxViewCells 1000
+	}
+
+	useCostHeuristics true
+	splitUseOnlyDrivingAxis false
+
+	# maximum number of tests per node
+	maxTests 100000
+}
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_vienna
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_vienna	(revision 2572)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_vienna	(revision 2596)
@@ -7,6 +7,6 @@
 
 SCENE=../data/vienna/vienna_cropped.obj
-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
 
 
@@ -19,8 +19,10 @@
 #PREFIX=../work/plots/atlanta2-rss9
 
+DISTRIBUTIONS=mutation+object_direction+spatial
 
-
-$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
--rss_distributions=mutation+object_direction+spatial \ \
+$COMMAND -preprocessor=combined \
+-scene_filename=$SCENE \
+-view_cells_filename=$VIEWCELLS \
+-rss_distributions=$DISTRIBUTIONS \
 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \
 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_pompeii.sh
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_pompeii.sh	(revision 2596)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_pompeii.sh	(revision 2596)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# add bin to path
+export PATH=../bin:$PATH
+
+#TARGET=debug
+TARGET=release
+PROGRAM=../bin/$TARGET/Preprocessor.exe
+
+echo "starting $TARGET version"
+
+SCENE=../data/Arena/pompeii/PompeiiTen.obj
+VIEWCELLS=../data/Arena/pomeiiten-viewcells.xml.gz
+
+LOG_PREFIX=../scripts/tests/sig2008
+ENVIRONMENT=gvs.env
+
+
+METHOD=gvs
+echo "$SCENE $METHOD"
+
+
+$PROGRAM $ENVIRONMENT \
+-scene_filename=$SCENE \
+-preprocessor=gvs \
+-gvs_epsilon=0.0001 \
+-gvs_total_samples=500000 \
+-gvs_samples_per_pass=50000 \
+-gvs_initial_samples=16 \
+-gvs_max_viewcells=10 \
+-gvs_min_contribution=50 \
+-gvs_per_viewcell=true \
+-view_cells_filename=$VIEWCELLS \
+-view_cells_load_from_file=true \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log
+
+sh movefiles.sh $LOG_PREFIX-$METHOD
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vienna.sh
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vienna.sh	(revision 2596)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vienna.sh	(revision 2596)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# add bin to path
+export PATH=../bin:$PATH
+
+#TARGET=debug
+TARGET=release
+PROGRAM=../bin/$TARGET/Preprocessor.exe
+
+echo "starting $TARGET version"
+
+SCENE=../data/vienna/vienna_cropped.obj
+#VIEWCELLS=../data/vienna/vienna_cropped-seq-3000-false-20-viewcells.xml.gz
+VIEWCELLS=../data/vienna/vienna_cropped-57000-viewcells.xml.gz
+
+LOG_PREFIX=../scripts/tests/sig2008
+ENVIRONMENT=gvs.env
+
+
+METHOD=gvs
+echo "$SCENE $METHOD"
+
+
+$PROGRAM $ENVIRONMENT \
+-scene_filename=$SCENE \
+-preprocessor=gvs \
+-gvs_epsilon=0.0001 \
+-gvs_total_samples=500000 \
+-gvs_samples_per_pass=50000 \
+-gvs_initial_samples=16 \
+-gvs_max_viewcells=10 \
+-gvs_min_contribution=50 \
+-gvs_per_viewcell=true \
+-view_cells_filename=$VIEWCELLS \
+-view_cells_load_from_file=true \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log
+
+sh movefiles.sh $LOG_PREFIX-$METHOD
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_arena.sh
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_arena.sh	(revision 2596)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_arena.sh	(revision 2596)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# add bin to path
+export PATH=../bin:$PATH
+
+#TARGET=debug
+TARGET=release
+PROGRAM=../bin/$TARGET/Preprocessor.exe
+
+echo "starting $TARGET version"
+
+SCENE=../data/Arena/arena-high-lods.obj
+VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz
+
+LOG_PREFIX=../scripts/tests/sig2008
+ENVIRONMENT=gvs.env
+
+
+METHOD=gvs
+echo "$SCENE $METHOD"
+
+
+$PROGRAM $ENVIRONMENT \
+-scene_filename=$SCENE \
+-preprocessor=gvs \
+-gvs_epsilon=0.0001 \
+-gvs_total_samples=500000 \
+-gvs_samples_per_pass=50000 \
+-gvs_initial_samples=16 \
+-gvs_max_viewcells=10 \
+-gvs_min_contribution=50 \
+-gvs_per_viewcell=true \
+-view_cells_filename=$VIEWCELLS \
+-view_cells_load_from_file=true \
+-view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+-view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log
+
+sh movefiles.sh $LOG_PREFIX-$METHOD
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_soda
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_soda	(revision 2591)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_soda	(revision 2596)
@@ -11,8 +11,8 @@
 PREFIX=../work/plots/osp-TEST
 
-#-rss_distributions=mutation+object_direction+spatial \
+DISTRIBUTIONS=mutation+object_direction+spatial
 
 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
--rss_distributions=mutation+object_direction+direction \
+-rss_distributions=$DISTRIBUTIONS \
 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \
 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \
Index: GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_arena
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_arena	(revision 2593)
+++ GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_arena	(revision 2596)
@@ -12,7 +12,8 @@
 
 PREFIX=../work/plots/osp-TEST
+DISTRIBUTIONS=mutation+object_direction+spatial
 
 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
--rss_distributions=mutation+object_direction+spatial \
+-rss_distributions=$DISTRIBUTIONS \
 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \
 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \
