Index: trunk/VUT/GtpVisibilityPreprocessor/src/Makefile
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/Makefile	(revision 435)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/Makefile	(revision 446)
@@ -1,5 +1,5 @@
 #############################################################################
 # Makefile for building: preprocessor
-# Generated by qmake (1.07a) (Qt 3.3.2) on: Fri Nov 25 16:40:39 2005
+# Generated by qmake (1.07a) (Qt 3.3.2) on: Sun Dec 04 20:05:51 2005
 # Project:  preprocessor.pro
 # Template: app
@@ -13,11 +13,11 @@
 LEX		= flex
 YACC		= byacc
-CFLAGS	=	-nologo -Zm200 -W0 -MD -O2 -G7 -GX  -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -DQT_NO_DEBUG
-CXXFLAGS	=	-nologo -Zm200 -W0 -MD -O2 -G7 -GX  -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT -DQT_NO_DEBUG
+CFLAGS	=	-nologo -Zm200 -W0 -MDd -Zi -Gm -GX  -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT
+CXXFLAGS	=	-nologo -Zm200 -W0 -MDd -Zi -Gm -GX  -DUNICODE -DWIN32 -DQT_DLL -DQT_THREAD_SUPPORT
 LEXFLAGS	=
 YACCFLAGS	=-d
 INCPATH	=	 -I"..\src" -I"..\support\xerces\include" -I"..\support\zlib\include" -I"..\support\boost" -I"..\support\devil\include" -I"$(QTDIR)\include" -I"d:\gametools\svn\trunk\VUT\GtpVisibilityPreprocessor\src" -I"C:\Qt\3.3.2\mkspecs\win32-msvc.net"
 LINK	=	"c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe"
-LFLAGS	=	/NOLOGO /DELAYLOAD:comdlg32.dll /DELAYLOAD:oleaut32.dll /DELAYLOAD:winmm.dll /DELAYLOAD:wsock32.dll /DELAYLOAD:winspool.dll /SUBSYSTEM:CONSOLE /LIBPATH:"../support/xerces/lib" /LIBPATH:"../support/devil/lib" /LIBPATH:"$(QTDIR)\lib"
+LFLAGS	=	/NOLOGO /DEBUG /SUBSYSTEM:CONSOLE /LIBPATH:"../support/xerces/lib" /LIBPATH:"../support/devil/lib" /LIBPATH:"$(QTDIR)\lib"
 LIBS	=	 "qt-mt332.lib" "qtmain.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "imm32.lib" "winmm.lib" "wsock32.lib" "winspool.lib" "delayimp.lib" "xerces-c_2.lib" "devil.lib" "ilu.lib" "ilut.lib" "opengl32.lib" "glu32.lib"
 MOC		=	$(QTDIR)\bin\moc.exe
@@ -41,5 +41,6 @@
 HEADERS =	Halton.h \
 		VssRay.h \
-		VssPreprocessor.h
+		VssPreprocessor.h \
+		RssTree.h
 SOURCES =	Preprocessor.cpp \
 		SamplingPreprocessor.cpp \
@@ -77,5 +78,7 @@
 		RenderSimulator.cpp \
 		VspKdTree.cpp \
-		RayInfo.cpp
+		RayInfo.cpp \
+		RssTree.cpp \
+		RssPreprocessor.cpp
 OBJECTS =	Preprocessor.obj \
 		SamplingPreprocessor.obj \
@@ -113,5 +116,7 @@
 		RenderSimulator.obj \
 		VspKdTree.obj \
-		RayInfo.obj
+		RayInfo.obj \
+		RssTree.obj \
+		RssPreprocessor.obj
 FORMS =	
 UICDECLS =	
@@ -211,4 +216,11 @@
 	-$(DEL_FILE) VspKdTree.obj
 	-$(DEL_FILE) RayInfo.obj
+	-$(DEL_FILE) RssTree.obj
+	-$(DEL_FILE) RssPreprocessor.obj
+	-$(DEL_FILE) preprocessor.pdb
+	-$(DEL_FILE) preprocessor.ilk
+	-$(DEL_FILE) vc*.pdb
+	-$(DEL_FILE) vc*.idb
+
 
 
@@ -370,4 +382,5 @@
 		VspKdTree.h \
 		VssTree.h \
+		RssTree.h \
 		Containers.h \
 		AxisAlignedBox3.h \
@@ -449,4 +462,5 @@
 		SamplingPreprocessor.h \
 		VssPreprocessor.h \
+		RssPreprocessor.h \
 		ExactPreprocessor.h \
 		Parser.h \
@@ -775,7 +789,56 @@
 		Ray.h \
 		VssRay.h \
-		Matrix4x4.h \
-		Vector3.h \
-		common.h \
+		Plane3.h \
+		Matrix4x4.h \
+		Vector3.h \
+		common.h \
+		
+
+RssTree.obj: RssTree.cpp  \
+		RssTree.h \
+		Environment.h \
+		VssRay.h \
+		Intersectable.h \
+		Ray.h \
+		Containers.h \
+		AxisAlignedBox3.h \
+		Statistics.h \
+		Vector3.h \
+		common.h \
+		Matrix4x4.h \
+		Rectangle3.h \
+		Plane3.h \
+		Pvs.h \
+		
+
+RssPreprocessor.obj: RssPreprocessor.cpp  \
+		SceneGraph.h \
+		KdTree.h \
+		RssPreprocessor.h \
+		X3dExporter.h \
+		Environment.h \
+		MutualVisibility.h \
+		Polygon3.h \
+		ViewCell.h \
+		VssRay.h \
+		RssTree.h \
+		Containers.h \
+		AxisAlignedBox3.h \
+		Rectangle3.h \
+		Matrix4x4.h \
+		Vector3.h \
+		Plane3.h \
+		common.h \
+		Ray.h \
+		Pvs.h \
+		Preprocessor.h \
+		Mesh.h \
+		ViewCellBsp.h \
+		VspKdTree.h \
+		Intersectable.h \
+		Material.h \
+		Statistics.h \
+		RayInfo.h \
+		Exporter.h \
 		
 
Index: trunk/VUT/GtpVisibilityPreprocessor/src/VssTree.h
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/VssTree.h	(revision 444)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/VssTree.h	(revision 446)
@@ -107,27 +107,4 @@
 
 
-// --------------------------------------------------------------
-// For sorting rays
-// --------------------------------------------------------------
-struct  SortableEntry
-{
-  enum EType {
-    ERayMin,
-    ERayMax
-  };
-
-  int type;
-  float value;
-  void *data;
-  
-  SortableEntry() {}
-  SortableEntry(const int t, const float v, void *d):type(t),
-													 value(v),
-													 data(d) {}
-	
-  friend bool operator<(const SortableEntry &a, const SortableEntry &b) {
-    return a.value < b.value;
-  }
-};
 
 
@@ -259,4 +236,5 @@
 							   ) const {
 		
+#if 1
 	  // intersect the ray with the plane
 	  float denom = mRay->GetDir(axis);
@@ -275,4 +253,11 @@
 
 	  return 0;
+#else
+	  // subbdivision based only on the origin
+	  t = 0;
+	  float rpos = mRay->GetOrigin(axis);
+	  return (rpos < position) ? -1 : 1;
+
+#endif
 	}
 
Index: trunk/VUT/GtpVisibilityPreprocessor/src/Environment.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/Environment.cpp	(revision 445)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/Environment.cpp	(revision 446)
@@ -1514,4 +1514,120 @@
 
 
+  
+  	RegisterOption("RssPreprocessor.initialSamples",
+
+								 optInt,
+
+								 "-initial_samples=",
+
+								 "100000");
+
+
+
+	RegisterOption("RssPreprocessor.vssSamples",
+
+								 optInt,
+
+								 "-vss_samples=",
+
+								 "1000000");
+
+	
+
+  RegisterOption("RssPreprocessor.vssSamplesPerPass",
+
+								 optInt,
+
+								 "-vss_samples_per_pass=",
+
+								 "1000");
+
+
+
+	  RegisterOption("RssPreprocessor.samplesPerPass",
+
+								 optInt,
+
+								 "-samples_per_pass=",
+
+								 "100000");
+
+
+
+  RegisterOption("RssPreprocessor.useImportanceSampling",
+
+								 optBool,
+
+								 "-vss_use_importance=",
+
+								 "true");
+
+
+  RegisterOption("RssTree.maxDepth", optInt, "kd_depth=", "12");
+
+  RegisterOption("RssTree.minPvs", optInt, "kd_minpvs=", "1");
+
+  RegisterOption("RssTree.minRays", optInt, "kd_minrays=", "10");
+
+  RegisterOption("RssTree.maxCostRatio", optFloat, "maxcost=", "0.95");
+
+  RegisterOption("RssTree.maxRayContribution", optFloat, "maxraycontrib=", "0.5");
+
+
+
+  RegisterOption("RssTree.epsilon", optFloat, "kd_eps=", "1e-6");
+
+  RegisterOption("RssTree.ct_div_ci", optFloat, "kd_ctdivci=", "1.0");
+
+  RegisterOption("RssTree.randomize", optBool, "randomize", "false");
+
+  RegisterOption("RssTree.splitType", optString, "split=", "queries");
+
+  RegisterOption("RssTree.splitUseOnlyDrivingAxis", optBool, "splitdriving=", "false");
+
+
+  RegisterOption("RssTree.useRss", optBool, "rss=", "false");
+
+
+
+  
+  RegisterOption("RssTree.numberOfEndPointDomains", optInt, "endpoints=", "10000");
+
+
+
+  RegisterOption("RssTree.minSize", optFloat, "minsize=", "0.001");
+
+
+
+  RegisterOption("RssTree.maxTotalMemory", optFloat, "mem=", "60.0");
+
+  RegisterOption("RssTree.maxStaticMemory", optFloat, "statmem=", "8.0");
+
+
+
+  RegisterOption("RssTree.queryType", optString, "qtype=", "static");
+
+
+
+  RegisterOption("RssTree.queryPosWeight", optFloat, "qposweight=", "0.0");
+
+  RegisterOption("RssTree.useRefDirSplits", optBool, "refdir", "false");
+
+  RegisterOption("RssTree.refDirAngle", optFloat, "refangle=", "10");
+
+  RegisterOption("RssTree.refDirBoxMaxSize", optFloat, "refboxsize=", "0.1");
+
+  RegisterOption("RssTree.accessTimeThreshold", optInt, "accesstime=", "1000");
+
+  RegisterOption("RssTree.minCollapseDepth", optInt, "colldepth=", "4");
+
+
+  RegisterOption("RssTree.interleaveDirSplits", optBool, "interleavedirsplits", "true");
+
+
+  RegisterOption("RssTree.dirSplitDepth", optInt, "dirsplidepth=", "10");
+
+
+
 
   /************************************************************************************/
Index: trunk/VUT/GtpVisibilityPreprocessor/src/Exporter.h
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/Exporter.h	(revision 440)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/Exporter.h	(revision 446)
@@ -20,4 +20,5 @@
 class Polygon3;
 class VssTree;
+class RssTree;
 
 class Exporter
@@ -43,4 +44,5 @@
   virtual bool ExportScene(SceneGraphNode *node) = 0;
 
+
   virtual bool
   ExportBox(const AxisAlignedBox3 &box) = 0;
@@ -54,4 +56,9 @@
   virtual bool
   ExportVssTree2(const VssTree &tree,
+				 const Vector3 direction
+				 ) = 0;
+
+  virtual bool
+  ExportRssTree2(const RssTree &tree,
 				 const Vector3 direction
 				 ) = 0;
Index: trunk/VUT/GtpVisibilityPreprocessor/src/VssTree.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/VssTree.cpp	(revision 438)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/VssTree.cpp	(revision 446)
@@ -983,6 +983,7 @@
 		   //			 (leaf->GetAvgRayContribution() > termMaxRayContribution ) ||
 		   (leaf->depth >= termMaxDepth) ||
-		   (SqrMagnitude(GetBBox(leaf).Size()) <= termMinSize) ||
-		   (mUseRss && leaf->mPassingRays == leaf->rays.size())
+		   (SqrMagnitude(GetBBox(leaf).Size()) <= termMinSize)
+		   //		   ||
+		   //		   (mUseRss && leaf->mPassingRays == leaf->rays.size())
 		   );
 }
@@ -1709,20 +1710,4 @@
 }
 
-void
-GenerateExtendedConvexCombinationWeights(float &w1,
-										 float &w2,
-										 float &w3,
-										 const float overlap
-										 )
-{
-  w1 = RandomValue(-overlap, 1.0f + overlap);
-  w2 = RandomValue(-overlap, 1.0f + overlap);
-  w3 = RandomValue(-overlap, 1.0f + overlap);
-	
-  float c = 1.0f/(w1 + w2 + w3);
-  w1 *= c;
-  w2 *= c;
-  w3 *= c;
-}
 
 void
@@ -1850,5 +1835,7 @@
 	return GetPvsSize();
   } else {
-	return GetAvgRayContribution()*mEntropyImportance;
+	// return GetAvgRayContribution()*mEntropyImportance;
+	//return GetAvgRayContribution();
+	return mEntropyImportance;
   }
 }
Index: trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.h
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.h	(revision 440)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.h	(revision 446)
@@ -36,4 +36,5 @@
 //  	     const RgbColor &color = RgbColor(1,1,1));
 
+
   bool
   ExportKdTree(const KdTree &tree);
@@ -46,5 +47,10 @@
 				 const Vector3 direction
 				 );
-  
+
+  virtual bool
+  ExportRssTree2(const RssTree &tree,
+				 const Vector3 direction
+				 );
+
   bool 
   ExportVspKdTree(const VspKdTree &tree, const int maxPvs);
Index: trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.h
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.h	(revision 444)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.h	(revision 446)
@@ -214,5 +214,34 @@
 };
 
-
+void
+GenerateExtendedConvexCombinationWeights(float &w1,
+										 float &w2,
+										 float &w3,
+										 const float overlap
+										 );
+
+// --------------------------------------------------------------
+// For sorting rays
+// --------------------------------------------------------------
+struct  SortableEntry
+{
+  enum EType {
+    ERayMin,
+    ERayMax
+  };
+
+  int type;
+  float value;
+  void *data;
+  
+  SortableEntry() {}
+  SortableEntry(const int t, const float v, void *d):type(t),
+													 value(v),
+													 data(d) {}
+	
+  friend bool operator<(const SortableEntry &a, const SortableEntry &b) {
+    return a.value < b.value;
+  }
+};
 
 typedef  vector<VssRay *> VssRayContainer;
Index: trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp	(revision 439)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp	(revision 446)
@@ -359,5 +359,5 @@
 
   if (!useViewspacePlane) {
-	float size = 0.01f;
+	float size = 0.05f;
 	float s = 0.5f - size;
 	float olds = Magnitude(box->Size());
@@ -369,6 +369,6 @@
 		
 	// sample city like heights
-	box->SetMin(1, box->Min(1) + box->Size(1)*0.1);
-	box->SetMax(1, box->Min(1) + box->Size(1)*0.2);
+	box->SetMin(1, box->Min(1) + box->Size(1)*0.2);
+	box->SetMax(1, box->Min(1) + box->Size(1)*0.3);
   }
 
@@ -442,6 +442,6 @@
   cout << "#totalRayStackSize=" << mVssRays.size() << endl <<flush;
 	
-  //int numExportRays = 10000;
-  int numExportRays = 0;
+  int numExportRays = 10000;
+  // int numExportRays = 0;
 
   if (numExportRays) {
@@ -463,5 +463,5 @@
   
   ExportVssTree("vss-tree-100.x3d", vssTree, Vector3(1,0,0));
-  ExportVssTree("vss-tree-001.x3d", vssTree, Vector3(1,0,0));
+  ExportVssTree("vss-tree-001.x3d", vssTree, Vector3(0,0,1));
   ExportVssTree("vss-tree-101.x3d", vssTree, Vector3(1,0,1));
   ExportVssTree("vss-tree-101m.x3d", vssTree, Vector3(-1,0,-1));
Index: trunk/VUT/GtpVisibilityPreprocessor/src/main.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/main.cpp	(revision 439)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/main.cpp	(revision 446)
@@ -1,4 +1,5 @@
 #include "SamplingPreprocessor.h"
 #include "VssPreprocessor.h"
+#include "RssPreprocessor.h"
 #include "ExactPreprocessor.h"
 #include "Parser.h"
@@ -34,26 +35,32 @@
 		p = new VssPreprocessor();
 	else
+	  if (preprocessorType == "rss")
+		p = new RssPreprocessor();
+	  else
 		if (preprocessorType == "exact")
-			p = new ExactPreprocessor();
+		  p = new ExactPreprocessor();
 		else
-			if (preprocessorType == "sampling")
+		  if (preprocessorType == "sampling")
 				p = new SamplingPreprocessor();
-			else {
-				cerr<<"Unknown preprocessor type"<<endl;
-				Debug<<"Unknown preprocessor type"<<endl;
-				exit(1);
-			}
+		  else {
+			cerr<<"Unknown preprocessor type"<<endl;
+			Debug<<"Unknown preprocessor type"<<endl;
+			exit(1);
+		  }
 	
-
-  environment->GetStringValue("Scene.filename", buff);
-  string filename(buff);
-
-  p->LoadScene(filename);
 	
-  p->BuildKdTree();
-  p->KdTreeStatistics(cout);
+	environment->GetStringValue("Scene.filename", buff);
+	string filename(buff);
+	
+	p->LoadScene(filename);
+	
+	p->BuildKdTree();
+	p->KdTreeStatistics(cout);
+	
+	// parse view cell hierarchy options
+	p->ParseViewCellsOptions();
   
-  // parse view cells related options
-  p->PrepareViewCells();
+	// parse view cells related options
+	p->PrepareViewCells();
 
 
Index: trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp	(revision 444)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp	(revision 446)
@@ -11,4 +11,5 @@
 #include "VspKdTree.h"
 #include "VssTree.h"
+#include "RssTree.h"
 
 X3dExporter::X3dExporter(const string filename):Exporter(filename)
@@ -871,4 +872,91 @@
 }
 
+
+bool
+X3dExporter::ExportRssTree2(const RssTree &tree,
+							const Vector3 direction
+							)
+{
+  stack<RssTreeNode *> tStack;
+  
+  
+  mUseForcedMaterial = true;
+
+  Vector3 dirParam;
+
+  dirParam.x = VssRay::GetDirParam(0, Normalize(direction));
+  dirParam.y = VssRay::GetDirParam(1, Normalize(direction));
+
+  float maxImportance = 0.0f;
+  tStack.push(tree.GetRoot());
+  while (!tStack.empty()) {
+	
+	RssTreeNode *node = tStack.top();
+    tStack.pop();
+	
+    if (!node->IsLeaf()) {
+      RssTreeInterior *interior = (RssTreeInterior *)node;
+	  if (interior->axis < 3) {
+		tStack.push(interior->front);
+		tStack.push(interior->back);
+	  } else {
+		if (dirParam[interior->axis-3] < interior->position)
+		  tStack.push(interior->back);
+		else
+		  tStack.push(interior->front);
+	  }
+    } else {
+	  RssTreeLeaf *leaf = (RssTreeLeaf *)node;
+	  if (tree.ValidLeaf(leaf)) {
+		float i = leaf->GetImportance();
+		if (i > maxImportance)
+		  maxImportance = i;
+	  }
+	}
+  }
+
+  tStack.push(tree.GetRoot());
+  while (!tStack.empty()) {
+
+	RssTreeNode *node = tStack.top();
+    tStack.pop();
+	
+			
+    if (!node->IsLeaf()) {
+      RssTreeInterior *interior = (RssTreeInterior *)node;
+	  if (interior->axis < 3) {
+		tStack.push(interior->front);
+		tStack.push(interior->back);
+	  } else {
+		if (dirParam[interior->axis-3] < interior->position)
+		  tStack.push(interior->back);
+		else
+		  tStack.push(interior->front);
+	  }
+    } else {
+	  RssTreeLeaf *leaf = (RssTreeLeaf *)node;
+	  if (tree.ValidLeaf(leaf)) {
+		AxisAlignedBox3 box;
+		box = tree.GetShrankedBBox(leaf);
+		Mesh *mesh = new Mesh;
+		AddBoxToMesh(box, mesh);
+		
+		// get 4 corners of the ray directions
+		
+		mForcedMaterial.mDiffuseColor.b = 1.0f;
+		mForcedMaterial.mDiffuseColor.r = leaf->GetImportance()/maxImportance;
+		mForcedMaterial.mDiffuseColor.g = 1.0f - mForcedMaterial.mDiffuseColor.r;
+		
+		ExportMesh(mesh);
+		delete mesh;
+	  }
+	}
+  }
+
+  mUseForcedMaterial = false;
+
+  return true;
+}
+
 bool
 X3dExporter::ExportBspTreeRayDensity(const BspTree &tree)
@@ -1150,9 +1238,13 @@
 
 
-void X3dExporter::ExportGeometry(const ObjectContainer &objects)
-{
-	for (int j = 0; j < objects.size(); ++ j)
-		ExportIntersectable(objects[j]);
-}
-
-
+void
+X3dExporter::ExportGeometry(const ObjectContainer &objects)
+{
+  
+  ObjectContainer::const_iterator oi = objects.begin();
+  for (; oi != objects.end(); oi++) {
+    // export the transform...
+    ExportIntersectable(*oi);
+  }
+  
+}
Index: trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.cpp	(revision 438)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.cpp	(revision 446)
@@ -155,2 +155,20 @@
   return GetDirParam(axis, dir);
 }
+
+
+void
+GenerateExtendedConvexCombinationWeights(float &w1,
+										 float &w2,
+										 float &w3,
+										 const float overlap
+										 )
+{
+  w1 = RandomValue(-overlap, 1.0f + overlap);
+  w2 = RandomValue(-overlap, 1.0f + overlap);
+  w3 = RandomValue(-overlap, 1.0f + overlap);
+  
+  float c = 1.0f/(w1 + w2 + w3);
+  w1 *= c;
+  w2 *= c;
+  w3 *= c;
+}
Index: trunk/VUT/GtpVisibilityPreprocessor/src/default.env
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/default.env	(revision 438)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/default.env	(revision 446)
@@ -15,10 +15,11 @@
 # filename ../data/atlanta/atlanta2.x3d
 # filename ../data/soda/soda.dat
-filename ../data/soda/soda5.dat
+ filename ../data/soda/soda5.dat
 }
 
 Preprocessor {
 #	type sampling
-	type vss
+#	type vss
+	type rss
 }
 
@@ -31,4 +32,5 @@
 }
 
+
 VssTree {
 	useRss    false
@@ -51,5 +53,42 @@
 
 	interleaveDirSplits	false
-    dirSplitDepth 12
+    dirSplitDepth 40
+
+	numberOfEndPointDomains	10000
+	ct_div_ci	0.0
+	randomize	false
+
+	refDirBoxMaxSize	0.1
+}
+
+RssPreprocessor {
+	samplesPerPass  100000
+	initialSamples 500000
+	vssSamples 5000000
+	vssSamplesPerPass 100000
+	useImportanceSampling true
+}
+
+RssTree {
+	useRss    false
+	epsilon		1e-6
+
+	maxDepth 	40
+	minPvs		5
+	minRays		30
+	minSize		0.001
+ 	maxCostRatio	0.9
+	maxRayContribution 0.1
+	
+	maxTotalMemory	200
+	maxStaticMemory	100
+
+#	splitType regular
+#	splitType heuristic
+	splitType hybrid
+	splitUseOnlyDrivingAxis false
+
+	interleaveDirSplits	true
+    dirSplitDepth 9
 
 	numberOfEndPointDomains	10000
Index: trunk/VUT/GtpVisibilityPreprocessor/src/preprocessor.pro
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/preprocessor.pro	(revision 427)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/preprocessor.pro	(revision 446)
@@ -17,5 +17,5 @@
 
 # debuc config
-CONFIG		+= console warn_off thread release
+CONFIG		+= console warn_off thread debug
 
 # RELEASE CONFIG
@@ -28,5 +28,5 @@
 
 # Input
-HEADERS += Halton.h VssRay.h VssPreprocessor.h
+HEADERS += Halton.h VssRay.h VssPreprocessor.h RssTree.h
 
 
@@ -39,4 +39,4 @@
 MutualVisibility.cpp Triangle3.cpp Rectangle3.cpp Plane3.cpp Polygon3.cpp \
 ViewCell.cpp ViewCellBsp.cpp Halton.cpp VssRay.cpp VssTree.cpp VssPreprocessor.cpp \
-RenderSimulator.cpp VspKdTree.cpp RayInfo.cpp
+RenderSimulator.cpp VspKdTree.cpp RayInfo.cpp RssTree.cpp RssPreprocessor.cpp
 
