Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh	(revision 1642)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh	(revision 1643)
@@ -79,5 +79,43 @@
 # mv final_view_cells.wrl $LOG_PREFIX-$METHOD-final_view_cells.wrl
 
- METHOD=multilevel
+#  METHOD=multilevel
+#  echo "$SCENE $METHOD"
+
+#  $PROGRAM $ENVIRONMENT \
+#  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+#  -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+#  -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_multilevel=true \
+#  -hierarchy_construction_samples=20000 \
+#  -hierarchy_term_max_leaves=500 \
+#  -hierarchy_construction_levels=1 \
+#  -hierarchy_construction_recompute_split_on_repair=true
+
+#  mv debug.log $LOG_PREFIX-$METHOD-debug.log
+#  mv view_cells.wrl $LOG_PREFIX-$METHOD-view_cells.wrl
+#  mv final_object_partition.wrl $LOG_PREFIX-$METHOD-final_object_partition.wrl
+#  mv final_view_cells.wrl $LOG_PREFIX-$METHOD-final_view_cells.wrl
+
+#  METHOD=sequential
+#  echo "$SCENE $METHOD"
+
+#  $PROGRAM $ENVIRONMENT \
+#  -view_cells_evaluation_stats_prefix=$LOG_PREFIX-$METHOD \
+#  -view_cells_merge_stats=$LOG_PREFIX-$METHOD-mergeStats.log \
+#  -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 \
+#  -bvh_term_max_leaves=500
+
+#  mv debug.log $LOG_PREFIX-$METHOD-debug.log
+#  mv view_cells.wrl $LOG_PREFIX-$METHOD-view_cells.wrl
+#  mv final_object_partition.wrl $LOG_PREFIX-$METHOD-final_object_partition.wrl
+#  mv final_view_cells.wrl $LOG_PREFIX-$METHOD-final_view_cells.wrl
+
+ METHOD=gradient_simplesplit
  echo "$SCENE $METHOD"
 
@@ -87,10 +125,8 @@
  -vsp_subdivision_stats=$LOG_PREFIX-$METHOD-vsp-subdivisionStats.log \
  -bvh_subdivision_stats=$LOG_PREFIX-$METHOD-bvh-subdivisionStats.log \
+ -bvh_use_sah=true \
+ -vsp_use_cost_heuristics=false \
  -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \
  -hierarchy_construction_type=2 \
- -hierarchy_construction_multilevel=true \
- -hierarchy_construction_samples=20000 \
- -hierarchy_term_max_leaves=500 \
- -hierarchy_construction_levels=1 \
  -hierarchy_construction_recompute_split_on_repair=true
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.env
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.env	(revision 1642)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.env	(revision 1643)
@@ -188,5 +188,5 @@
 	Termination {
 		minPvs 0
-		maxViewCells 1000
+		maxViewCells 500000
 	}
 
@@ -208,5 +208,5 @@
 
 	Termination {
-		maxLeaves 1000
+		maxLeaves 500000
 	}
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 1642)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 1643)
@@ -2445,4 +2445,10 @@
 				   "true");
 
+	
+	RegisterOption("BvHierarchy.useSah",
+				   optBool,
+				   "bvh_use_sah=",
+				   "false");
+
 	RegisterOption("BvHierarchy.subdivisionStats",
 					optString,
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp	(revision 1640)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp	(revision 1643)
@@ -221,6 +221,7 @@
 
 
-	/////////////////////////////////////////////////////////////
+	////////////////////////////////////
 	//-- termination criteria for autopartition
+
 	Environment::GetSingleton()->GetIntValue("BvHierarchy.Termination.maxDepth", mTermMaxDepth);
 	Environment::GetSingleton()->GetIntValue("BvHierarchy.Termination.maxLeaves", mTermMaxLeaves);
@@ -249,5 +250,6 @@
 	Environment::GetSingleton()->GetFloatValue("BvHierarchy.maxStaticMemory", mMaxMemory);
 	Environment::GetSingleton()->GetBoolValue("BvHierarchy.useCostHeuristics", mUseCostHeuristics);
-
+	Environment::GetSingleton()->GetBoolValue("BvHierarchy.useSah", mUseSah);
+	
 	char subdivisionStatsLog[100];
 	Environment::GetSingleton()->GetStringValue("BvHierarchy.subdivisionStats", subdivisionStatsLog);
@@ -1246,6 +1248,7 @@
                 //-- split objects using heuristics
 				
-				if (mHierarchyManager->GetViewSpaceSubdivisionType() == 
-					HierarchyManager::KD_BASED_VIEWSPACE_SUBDIV)
+				if (!mUseSah &&
+					(mHierarchyManager->GetViewSpaceSubdivisionType() == 
+					HierarchyManager::KD_BASED_VIEWSPACE_SUBDIV))
 				{
 					///////////
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h	(revision 1640)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h	(revision 1643)
@@ -870,6 +870,9 @@
 	//-- split heuristics based parameters
 	
-	bool mUseCostHeuristics;
-	/// balancing factor for PVS criterium
+	/// if a heuristics should be used for finding a split plane
+    bool mUseCostHeuristics;
+	/// if sah heuristcs should be used for finding a split plane
+	bool mUseSah;
+    /// balancing factor for PVS criterium
 	float mCtDivCi;	
 	/// if only driving axis should be used for split
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp	(revision 1642)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp	(revision 1643)
@@ -1101,5 +1101,6 @@
 
 		// subdivide object space first
-		SubdivisionCandidate *ospVc = ResetObjectSpaceSubdivision(sampleRays, objects);
+		SubdivisionCandidate *ospVc = 
+			ResetObjectSpaceSubdivision(sampleRays, objects);
 		mTQueue.Push(ospVc);
 
@@ -1120,5 +1121,6 @@
 		// subdivide view space with respect to the objects
 
-		SubdivisionCandidate *vspVc = ResetViewSpaceSubdivision(sampleRays, objects, forcedViewSpace);
+		SubdivisionCandidate *vspVc = 
+			ResetViewSpaceSubdivision(sampleRays, objects, forcedViewSpace);
 		mTQueue.Push(vspVc);
 
