Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh	(revision 1667)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/vsposp_typical.sh	(revision 1673)
@@ -12,6 +12,6 @@
 
 #SCENE=vsposp_typical
-SCENE=soda5_vsposp
-#SCENE=soda_vsposp
+#SCENE=soda5_vsposp
+SCENE=soda_vsposp
 #SCENE=vienna_vsposp
 #SCENE=arena_vsposp
@@ -71,5 +71,7 @@
   -hierarchy_subdivision_stats=$LOG_PREFIX-$METHOD-hierarchy-subdivisionStats.log \
   -hierarchy_construction_type=2 \
-  -hierarchy_construction_consider_memory=false \
+  -hierarchy_construction_consider_memory2=true \
+ -bvh_construction_render_cost_decrease_weight=0.99 \
+ -vsp_construction_render_cost_decrease_weight=0.99 \
   -hierarchy_construction_multilevel=false \
   -hierarchy_term_memory_const=0.9 \
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 1666)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp	(revision 1673)
@@ -2522,4 +2522,9 @@
 					"false");
 
+	RegisterOption("Hierarchy.Construction.considerMemory2",
+					optBool,
+					"hierarchy_construction_consider_memory2=",
+					"false");
+
 	RegisterOption("Hierarchy.Construction.repairQueue",
 					optBool,
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h	(revision 1667)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h	(revision 1673)
@@ -535,6 +535,8 @@
 	bool mConsiderMemory;
 
+	/// constant value for driving the heuristics
 	float mMemoryConst;
-
+	
+	bool mConsiderMemory2;
 
 	friend VspTree;
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h	(revision 1667)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h	(revision 1673)
@@ -864,9 +864,5 @@
 	int PrepareHeuristics(KdLeaf *leaf);
 
-	/** Reevaluates the priority of this split candidate
-		@returns priority
-	*/
-	//float EvalPriority(const VspSubdivisionCandidate &splitCandidate) const;
-
+	
 	/////////////////////////////////////////////////////////////////////////////
 
@@ -1073,5 +1069,5 @@
 	bool mOutOfMemory;
 
-
+	////////////
 	//-- split heuristics based parameters
 	
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp	(revision 1667)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp	(revision 1673)
@@ -548,5 +548,5 @@
 		priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost;
 
-		if (1)//0 && mHierarchyManager->mConsiderMemory)
+		if (mHierarchyManager->mConsiderMemory2)
 		{
 			priority /= ((float)splitCandidate.GetPvsEntriesIncr() + mHierarchyManager->mMemoryConst);
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h	(revision 1667)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.h	(revision 1673)
@@ -441,4 +441,5 @@
 		{
 			HierarchyManager *hm = sBvHierarchy->mHierarchyManager;
+		
 			if (hm->ConsiderMemory())
 			{
@@ -446,5 +447,5 @@
 				const float mc = hm->GetHierarchyStats().mMemory +
 								 (float)mPvsEntriesIncr * ObjectPvs::GetEntrySizeByte();
-				//cout << "x";
+				
 				return - (rc * mc) / float(1024 * 1024);
 			}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h	(revision 1667)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h	(revision 1673)
@@ -497,5 +497,5 @@
 float Pvs<T, S>::GetEntrySize()
 {
-	return (float)sizeof(T) + sizeof(S) / float(1024 * 1024);
+	return (float)(sizeof(T) + sizeof(S)) / float(1024 * 1024);
 }
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp	(revision 1668)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.cpp	(revision 1673)
@@ -786,5 +786,6 @@
 
 
-void VspTree::EvalSubdivisionCandidate(VspSubdivisionCandidate &splitCandidate, bool computeSplitPlane)
+void VspTree::EvalSubdivisionCandidate(VspSubdivisionCandidate &splitCandidate, 
+									   bool computeSplitPlane)
 {
 	if (computeSplitPlane)
@@ -825,5 +826,5 @@
 	float priority = factor * renderCostDecr + (1.0f - factor) * oldRenderCost;
 
-	if (1)//0 && mHierarchyManager->mConsiderMemory)
+	if (mHierarchyManager->mConsiderMemory2)
 	{
 		priority /= ((float)splitCandidate.GetPvsEntriesIncr() + mHierarchyManager->mMemoryConst);
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp	(revision 1667)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp	(revision 1673)
@@ -122,4 +122,7 @@
 		"Hierarchy.Construction.considerMemory", mConsiderMemory);
 
+	Environment::GetSingleton()->GetBoolValue(
+		"Hierarchy.Construction.considerMemory2", mConsiderMemory2);
+
 	Environment::GetSingleton()->GetFloatValue(
 		"Hierarchy.Termination.maxMemory", mTermMaxMemory);
@@ -141,5 +144,6 @@
 	Debug << "minimal number of steps from same type: " << mMinStepsOfSameType << endl;
 	Debug << "maximal allowed memory: " << mTermMaxMemory << endl;
-	Debug << "consider mem: " << mConsiderMemory << endl;
+	Debug << "consider memory: " << mConsiderMemory << endl;
+	Debug << "consider memory2: " << mConsiderMemory << endl;
 	Debug << "mem const: " << mMemoryConst << endl;
 
@@ -422,5 +426,5 @@
 		// decide upon next split type
 		const float vspPriority =  viewSpaceQueue.Top() ? viewSpaceQueue.Top()->GetPriority() : -1e20;
-		const float ospPriority =  viewSpaceQueue.Top() ? objectSpaceQueue.Top()->GetPriority() : -1e20;
+		const float ospPriority =  objectSpaceQueue.Top() ? objectSpaceQueue.Top()->GetPriority() : -1e20;
 		
 		cout << "new decicion, vsp: " << vspPriority << ", osp: " << ospPriority << endl;
@@ -429,7 +433,5 @@
 		if (ospPriority >= vspPriority)
 		{
-			// use splits of one kind until rendercost decrease of other domain is reached
-			renderCostDecr = vspPriority;
-			cout << "comparing with this render cost: " << renderCostDecr << endl;
+			cout << "osp" << endl;
 			// dirtied view space candidates
 			SubdivisionCandidateContainer dirtyVspList;
@@ -450,8 +452,6 @@
 		else
 		{
-			// use splits of one kind until rendercost slope is reached
-			renderCostDecr = ospPriority;
-			cout << "comparing with this render cost: " << renderCostDecr << endl;
-
+			cout << "vsp" << endl;
+			
 			/////////////////
 			// subdivide view space with respect to the objects
