Changeset 1989


Ignore:
Timestamp:
01/18/07 10:25:29 (17 years ago)
Author:
bittner
Message:

mutation updates

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp

    r1984 r1989  
    99 
    1010 
     11// $$JB HACK 
     12#define KD_PVS_AREA (1e-5f) 
    1113 
    1214namespace GtpVisibilityPreprocessor { 
     
    106108  delete splitCandidates; 
    107109 
     110  float area = GetBox().SurfaceArea()*KD_PVS_AREA; 
     111 
     112  SetPvsTerminationNodes(area); 
     113   
    108114  return true; 
    109115} 
     
    828834void 
    829835KdTree::CollectKdObjects(const AxisAlignedBox3 &box, 
    830                                                  ObjectContainer &objects, 
    831                                                  const float maxArea 
     836                                                 ObjectContainer &objects 
    832837                                                 ) 
    833838{ 
     
    839844    KdNode *node = nodeStack.top(); 
    840845    nodeStack.pop(); 
    841         if (node->IsLeaf() || (GetSurfaceArea(node) <= maxArea) ) { 
     846        if (node->IsLeaf() || node->mPvsTermination == 1) { 
    842847          Intersectable *object = GetOrCreateKdIntersectable(node); 
    843848          if (!object->Mailed()) { 
     
    14251430        } 
    14261431 
     1432        float area = GetBox().SurfaceArea()*KD_PVS_AREA; 
     1433         
     1434        SetPvsTerminationNodes(area); 
     1435 
    14271436        Debug << mStat << endl; 
    14281437 
     
    14441453 
    14451454  return node->mIntersectable; 
     1455} 
     1456 
     1457 
     1458void 
     1459KdTree::SetPvsTerminationNodes( 
     1460                                                           const float maxArea) 
     1461{ 
     1462  stack<KdNode *> nodeStack; 
     1463   
     1464  nodeStack.push(mRoot); 
     1465 
     1466  while (!nodeStack.empty()) { 
     1467    KdNode *node = nodeStack.top(); 
     1468        nodeStack.pop(); 
     1469 
     1470        node->mPvsTermination = 0; 
     1471        if (node->IsLeaf() || (GetSurfaceArea(node) <= maxArea) ) { 
     1472          node->mPvsTermination = 1; 
     1473          // create dummy kd intersectable 
     1474          Intersectable *object = GetOrCreateKdIntersectable(node); 
     1475        } else { 
     1476          KdInterior *interior = (KdInterior *)node; 
     1477          nodeStack.push(interior->mFront); 
     1478          nodeStack.push(interior->mBack); 
     1479    } 
     1480  } 
     1481} 
     1482 
     1483KdNode * 
     1484KdTree::GetPvsNode(const Vector3 &point) const 
     1485{ 
     1486  KdNode *node = mRoot; 
     1487   
     1488  while (node->mPvsTermination == 0 ) { 
     1489        KdInterior *inter = (KdInterior *)node; 
     1490        if (point[inter->mAxis] < inter->mPosition) 
     1491          node = inter->mBack; 
     1492        else 
     1493          node = inter->mFront; 
     1494  } 
     1495   
     1496  return node; 
    14461497} 
    14471498 
  • GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.h

    r1974 r1989  
    133133      but allows various optimizations of tree traversal algorithms */ 
    134134  KdInterior *mParent; 
    135   int mDepth; 
     135  short mDepth; 
     136  short mPvsTermination; 
    136137}; 
    137138 
     
    344345  KdIntersectable *GetOrCreateKdIntersectable(KdNode *node); 
    345346 
     347 
     348  void 
     349  SetPvsTerminationNodes( 
     350                                                 const float maxArea); 
     351   
     352  KdNode * 
     353  GetPvsNode(const Vector3 &point) const; 
     354   
     355 
    346356  void 
    347357  CollectKdObjects(const AxisAlignedBox3 &box, 
    348                                    ObjectContainer &objects, 
    349                                    const float maxArea 
     358                                   ObjectContainer &objects 
    350359                                   ); 
    351360 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Makefile

    r1984 r1989  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (2.00a) (Qt 4.1.2) on: po 15. I 21:59:19 2007 
     3# Generated by qmake (2.00a) (Qt 4.1.2) on: st 17. I 15:41:45 2007 
    44# Project:  preprocessor.pro 
    55# Template: app 
     
    6363        $(MAKE) -f $(MAKEFILE).Debug uninstall 
    6464 
    65 Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc.net\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 
     65Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc2005\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 
    6666                C:\Qt\4.1.2\mkspecs\features\qt_config.prf \ 
    6767                C:\Qt\4.1.2\mkspecs\features\exclusive_builds.prf \ 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Ray.h

    r1974 r1989  
    321321  short mType; 
    322322  short mDistribution; 
     323  // generator Id -> relative to the generating distribution! 
     324  int mGeneratorId; 
    323325  float mPdf; 
    324326   
  • GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.cpp

    r1984 r1989  
    282282                                                                        hitA.mObject, 
    283283                                                                        mPreprocessor.mPass, 
    284                                                                         simpleRay.mPdf); 
     284                                                                        simpleRay.mPdf 
     285                                                                        ); 
    285286 
    286287                if (validA) 
     
    288289 
    289290                vssRay->mDistribution = simpleRay.mDistribution; 
     291                vssRay->mGeneratorId = simpleRay.mGeneratorId; 
     292 
    290293                vssRays.push_back(vssRay); 
    291294                ++ hits; 
     
    311314 
    312315                vssRay->mDistribution = simpleRay.mDistribution; 
     316                vssRay->mGeneratorId = simpleRay.mGeneratorId; 
    313317                vssRays.push_back(vssRay); 
    314318                ++ hits; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp

    r1986 r1989  
    66#include "AxisAlignedBox3.h" 
    77#include "RssTree.h" 
    8 #include "Vector2.h" 
    9 #include "RndGauss.h" 
     8#include "Mutation.h" 
    109 
    1110namespace GtpVisibilityPreprocessor { 
    12  
    13 #define MUTATION_USE_CDF 0 
    14  
    1511 
    1612//HaltonSequence SamplingStrategy::sHalton; 
     
    4844        // tmp changed matt. Q: should one rejected sample  
    4945        // terminate the whole method? 
    50         if (0) 
    51         { 
    52                 for (; i < number; i++) { 
    53                         if (!GenerateSample(ray)) 
    54                                 return i; 
    55                         rays.push_back(ray); 
    56                 } 
    57         } 
    58         else 
    59         { 
    60                 for (; i < number; i++)  
    61                 { 
    62                         int j = 0; 
    63                         bool sampleGenerated = false; 
    64  
    65                         for (j = 0; !sampleGenerated && (j < maxTries); ++ j) 
    66                         { 
    67                                 sampleGenerated = GenerateSample(ray); 
    68  
    69                                 if (sampleGenerated) 
    70                                 {                
    71                                         ++ samples; 
    72                                         rays.push_back(ray); 
    73                                 } 
    74                         } 
    75                 } 
    76         } 
    77          
     46        for (; i < number; i++)  
     47          { 
     48                int j = 0; 
     49                bool sampleGenerated = false; 
     50                 
     51                for (j = 0; !sampleGenerated && (j < maxTries); ++ j) 
     52                  { 
     53                        sampleGenerated = GenerateSample(ray); 
     54                         
     55                        if (sampleGenerated) 
     56                          {              
     57                                ++ samples; 
     58                                rays.push_back(ray); 
     59                          } 
     60                  } 
     61          } 
     62 
     63 
    7864        return samples; 
    7965} 
     
    686672} 
    687673 
    688 void 
    689 MutationBasedDistribution::Update(VssRayContainer &vssRays) 
    690 { 
    691   //  for (int i=0; i < mRays.size(); i++) 
    692   //    cout<<mRays[i].mSamples<<" "; 
    693   //  cout<<endl; 
    694   cerr<<"Muattion update..."<<endl; 
    695   cerr<<"rays = "<<mRays.size()<<endl; 
    696   if (mRays.size()) { 
    697         cerr<<"Oversampling factors = "<< 
    698           GetEntry(0).mSamples<<" "<< 
    699           GetEntry(1).mSamples<<" "<< 
    700           GetEntry(2).mSamples<<" "<< 
    701           GetEntry(3).mSamples<<" "<< 
    702           GetEntry(4).mSamples<<" "<< 
    703           GetEntry(5).mSamples<<" ... "<< 
    704           GetEntry(mRays.size()-6).mSamples<<" "<< 
    705           GetEntry(mRays.size()-5).mSamples<<" "<< 
    706           GetEntry(mRays.size()-4).mSamples<<" "<< 
    707           GetEntry(mRays.size()-3).mSamples<<" "<< 
    708           GetEntry(mRays.size()-2).mSamples<<" "<< 
    709           GetEntry(mRays.size()-1).mSamples<<endl; 
    710   } 
    711   int contributingRays = 0; 
    712   for (int i=0; i < vssRays.size(); i++) { 
    713         if (vssRays[i]->mPvsContribution) { 
    714           contributingRays++; 
    715           if (mRays.size() < mMaxRays) { 
    716                 VssRay *newRay = new VssRay(*vssRays[i]); 
    717                 // add this ray 
    718                 newRay->Ref(); 
    719                 mRays.push_back(RayEntry(newRay)); 
    720           } else { 
    721                 // unref the old ray 
    722                 *mRays[mBufferStart].mRay = *vssRays[i]; 
    723                 mRays[mBufferStart].mSamples = 0; 
    724                 //              mRays[mBufferStart] = RayEntry(newRay); 
    725                 mBufferStart++; 
    726                 if (mBufferStart >= mMaxRays) 
    727                   mBufferStart = 0; 
    728           } 
    729         } 
    730   } 
    731    
    732   float pContributingRays = contributingRays/(float)vssRays.size(); 
    733   float importance = 1.0f; //sqr(1.0f/(pContributingRays + 1e-5)); 
    734   // set this values for last contributingRays 
    735   int index = mBufferStart - 1; 
    736    
    737   for (int i=0; i < contributingRays; i++, index--) { 
    738         if (index < 0) 
    739           index = mRays.size()-1; 
    740         mRays[index].mImportance = importance; 
    741   } 
    742  
    743 #if MUTATION_USE_CDF 
    744   // compute cdf 
    745   mRays[0].mCdf = mRays[0].mImportance/(mRays[0].mSamples+1); 
    746   for (int i=1; i < mRays.size(); i++)  
    747         mRays[i].mCdf = mRays[i-1].mCdf + mRays[i].mImportance/(mRays[i].mSamples+1); 
    748    
    749   float scale = 1.0f/mRays[i-1].mCdf; 
    750   for (i=0; i < mRays.size(); i++) { 
    751         mRays[i].mCdf *= scale; 
    752   } 
    753 #endif 
    754    
    755   cout<<"Importance = "<< 
    756         GetEntry(0).mImportance<<" "<< 
    757         GetEntry(mRays.size()-1).mImportance<<endl; 
    758    
    759   cerr<<"Mutation update done."<<endl; 
    760 } 
    761  
    762  
    763 Vector3 
    764 MutationBasedDistribution::ComputeOriginMutation(const VssRay &ray, 
    765                                                                                                  const Vector3 &U, 
    766                                                                                                  const Vector3 &V, 
    767                                                                                                  const Vector2 vr2, 
    768                                                                                                  const float radius 
    769                                                                                                  ) 
    770 { 
    771 #if 0 
    772   Vector3 v; 
    773   if (d.DrivingAxis() == 0) 
    774         v = Vector3(0, r[0]-0.5f, r[1]-0.5f); 
    775   else 
    776         if (d.DrivingAxis() == 1) 
    777           v = Vector3(r[0]-0.5f, 0, r[1]-0.5f); 
    778         else 
    779           v = Vector3(r[0]-0.5f, r[1]-0.5f, 0); 
    780   return v*(2*radius); 
    781 #endif 
    782 #if 0 
    783   return (U*(r[0] - 0.5f) + V*(r[1] - 0.5f))*(2*radius); 
    784 #endif 
    785  
    786  
    787   // Output random variable 
    788   Vector2 gaussvec2;  
    789    
    790   // Here we apply transform to gaussian, so 2D bivariate 
    791   // normal distribution 
    792   //  float sigma = ComputeSigmaFromRadius(radius); 
    793   float sigma = radius; 
    794   GaussianOn2D(vr2, 
    795                            sigma, // input 
    796                            gaussvec2);  // output 
    797  
    798          
    799     // Here we tranform the point correctly to 3D space using base 
    800     // vectors of the 3D space defined by the direction 
    801     Vector3 shift = gaussvec2.xx * U + gaussvec2.yy * V; 
    802          
    803         //      cout<<shift<<endl; 
    804         return shift; 
    805 } 
    806  
    807 Vector3 
    808 MutationBasedDistribution::ComputeTerminationMutation(const VssRay &ray, 
    809                                                                                                           const Vector3 &U, 
    810                                                                                                           const Vector3 &V, 
    811                                                                                                           const Vector2 vr2, 
    812                                                                                                           const float radius 
    813                                                                                                           ) 
    814 { 
    815 #if 0 
    816   Vector3 v; 
    817   // mutate the termination 
    818   if (d.DrivingAxis() == 0) 
    819         v = Vector3(0, r[2]-0.5f, r[3]-0.5f); 
    820   else 
    821         if (d.DrivingAxis() == 1) 
    822           v = Vector3(r[2]-0.5f, 0, r[3]-0.5f); 
    823         else 
    824           v = Vector3(r[2]-0.5f, r[3]-0.5f, 0); 
    825    
    826   //   Vector3 nv; 
    827    
    828   //   if (Magnitude(v) > Limits::Small) 
    829   //    nv = Normalize(v); 
    830   //   else 
    831   //    nv = v; 
    832    
    833   //  v = nv*size + v*size; 
    834  
    835   return v*(4.0f*radius); 
    836 #endif 
    837 #if 0 
    838   return (U*(vr2.xx - 0.5f) + V*(vr2.yy - 0.5f))*(4.0f*radius); 
    839 #endif 
    840   Vector2 gaussvec2;  
    841 #if 1 
    842   float sigma = radius; 
    843   GaussianOn2D(vr2, 
    844                            sigma, // input 
    845                            gaussvec2);  // output 
    846   Vector3 shift = gaussvec2.xx * U + gaussvec2.yy * V; 
    847   //    cout<<shift<<endl; 
    848   return shift; 
    849 #endif 
    850 #if 0 
    851   // Here we estimate standard deviation (sigma) from radius 
    852   float sigma = 1.1f*ComputeSigmaFromRadius(radius); 
    853   Vector3 vr3(vr2.xx, vr2.yy, RandomValue(0,1)); 
    854   PolarGaussianOnDisk(vr3, 
    855                                           sigma, 
    856                                           radius, // input 
    857                                           gaussvec2); // output 
    858    
    859   // Here we tranform the point correctly to 3D space using base 
    860   // vectors of the 3D space defined by the direction 
    861   Vector3 shift = gaussvec2.xx * U + gaussvec2.yy * V; 
    862    
    863   //    cout<<shift<<endl; 
    864   return shift; 
    865 #endif 
    866 } 
    867  
    868  
    869 bool 
    870 MutationBasedDistribution::GenerateSample(SimpleRay &sray) 
    871 { 
    872   float rr[5]; 
    873  
    874   if (mRays.size() == 0) { 
    875         // use direction based distribution 
    876         Vector3 origin, direction; 
    877         static HaltonSequence halton; 
    878          
    879         halton.GetNext(5, rr); 
    880         mPreprocessor.mViewCellsManager->GetViewPoint(origin, 
    881                                                                                                   Vector3(rr[0], rr[1], rr[2])); 
    882          
    883  
    884         direction = UniformRandomVector(rr[3], rr[4]); 
    885          
    886         const float pdf = 1.0f; 
    887         sray = SimpleRay(origin, direction, MUTATION_BASED_DISTRIBUTION, pdf); 
    888  
    889         return true; 
    890   }  
    891  
    892   int index; 
    893  
    894 #if !MUTATION_USE_CDF 
    895   // get tail of the buffer 
    896   index = (mLastIndex+1)%mRays.size(); 
    897   if (mRays[index].GetSamplingFactor() > 
    898           mRays[mLastIndex].GetSamplingFactor()) { 
    899         // search back for index where this is valid 
    900         index = (mLastIndex - 1 + mRays.size())%mRays.size(); 
    901         for (int i=0; i < mRays.size(); i++) { 
    902            
    903           //      if (mRays[index].mSamples > mRays[mLastIndex].mSamples) 
    904           //            break; 
    905           if (mRays[index].GetSamplingFactor() > 
    906                   mRays[mLastIndex].GetSamplingFactor() ) 
    907                 break; 
    908           index = (index - 1 + mRays.size())%mRays.size(); 
    909         } 
    910         // go one step back 
    911         index = (index+1)%mRays.size(); 
    912   } 
    913 #else 
    914   static HaltonSequence iHalton; 
    915   iHalton.GetNext(1, rr); 
    916   //rr[0] = RandomValue(0,1); 
    917   // use binary search to find index with this cdf 
    918   int l=0, r=mRays.size()-1; 
    919   while(l<r) { 
    920         int i = (l+r)/2; 
    921         if (rr[0] < mRays[i].mCdf ) 
    922           r = i; 
    923         else 
    924           l = i+1; 
    925   } 
    926   index = l; 
    927   //  if (rr[0] >= mRays[r].mCdf) 
    928   //    index = r; 
    929   //  else 
    930   //    index = l; 
    931          
    932          
    933 #endif 
    934   //  cout<<index<<" "<<rr[0]<<" "<<mRays[index].mCdf<<" "<<mRays[(index+1)%mRays.size()].mCdf<<endl; 
    935    
    936   VssRay *ray = mRays[index].mRay; 
    937   mRays[index].mSamples++; 
    938   mLastIndex = index; 
    939  
    940   mRays[index].mHalton.GetNext(4, rr); 
    941  
    942   // mutate the origin 
    943   Vector3 d = ray->GetDir(); 
    944  
    945  
    946   AxisAlignedBox3 box = ray->mTerminationObject->GetBox(); 
    947   float objectRadius = 0.5f*Magnitude(box.Diagonal()); 
    948   //  cout<<objectRadius<<endl; 
    949   if (objectRadius < Limits::Small) 
    950         return false; 
    951    
    952   // Compute right handed coordinate system from direction 
    953   Vector3 U, V; 
    954   Vector3 nd = Normalize(d); 
    955   nd.RightHandedBase(U, V); 
    956  
    957   Vector3 origin = ray->mOrigin; 
    958   Vector3 termination = ray->mTermination; //box.Center(); //ray->mTermination; //box.Center(); 
    959  
    960   float radiusExtension = 1.0f; 
    961   //  + mRays[index].mSamples/50.0f; 
    962    
    963   //  origin += ComputeOriginMutation(*ray, U, V, Vector2(r[0], r[1]), 0.5f*mOriginMutationSize*radiusExtension); 
    964   origin += ComputeOriginMutation(*ray, U, V, 
    965                                                                   Vector2(rr[0], rr[1]), 
    966                                                                   objectRadius*radiusExtension); 
    967   termination += ComputeTerminationMutation(*ray, U, V, 
    968                                                                                         Vector2(rr[2], rr[3]), 
    969                                                                                         objectRadius*radiusExtension); 
    970    
    971   Vector3 direction = termination - origin; 
    972    
    973   if (Magnitude(direction) < Limits::Small) 
    974         return false; 
    975    
    976   // shift the origin a little bit 
    977   origin += direction*0.5f; 
    978    
    979   direction.Normalize(); 
    980    
    981   // $$ jb the pdf is yet not correct for all sampling methods! 
    982   const float pdf = 1.0f; 
    983    
    984   sray = SimpleRay(origin, direction, MUTATION_BASED_DISTRIBUTION, pdf); 
    985   return true; 
    986 } 
    987  
    988 MutationBasedDistribution::MutationBasedDistribution(Preprocessor &preprocessor 
    989                                                                                                          ) : 
    990   SamplingStrategy(preprocessor) 
    991 { 
    992   mType = MUTATION_BASED_DISTRIBUTION; 
    993   mBufferStart = 0; 
    994   mMaxRays = 500000; 
    995   mRays.reserve(mMaxRays); 
    996   mOriginMutationSize = 10.0f; 
    997   mLastIndex = 0; 
    998   //  mOriginMutationSize = Magnitude(preprocessor.mViewCellsManager-> 
    999   //                                                              GetViewSpaceBox().Diagonal())*1e-3; 
    1000    
    1001 } 
    1002674 
    1003675 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.h

    r1983 r1989  
    225225}; 
    226226 
    227 class MutationBasedDistribution: public SamplingStrategy 
    228 { 
    229 public: 
    230   MutationBasedDistribution(Preprocessor &preprocessor); 
    231   virtual void Update(VssRayContainer &vssRays); 
    232  
    233   virtual bool RequiresRays() { return true; } 
    234  
    235 private: 
    236   virtual bool GenerateSample(SimpleRay &ray); 
    237  
    238   struct RayEntry { 
    239         // halton sequence for generatin gmutations of this ray 
    240         VssRay *mRay; 
    241         int mSamples; 
    242         HaltonSequence mHalton; 
    243         float mImportance; 
    244         float mCdf; 
    245  
    246         float GetSamplingFactor() const { return mSamples/mImportance; } 
    247         RayEntry() {} 
    248         RayEntry(VssRay *r):mRay(r), mSamples(0), mHalton(), mImportance(1.0f) {} 
    249   }; 
    250  
    251  
    252   Vector3 
    253   ComputeOriginMutation(const VssRay &ray, 
    254                                                 const Vector3 &U, 
    255                                                 const Vector3 &V, 
    256                                                 const Vector2 vr2, 
    257                                                 const float radius 
    258                                                 ); 
    259  
    260   Vector3 
    261   ComputeTerminationMutation(const VssRay &ray, 
    262                                                          const Vector3 &U, 
    263                                                          const Vector3 &V, 
    264                                                          const Vector2 vr2, 
    265                                                          const float radius 
    266                                                          ); 
    267  
    268   RayEntry &GetEntry(const int index) { 
    269         return mRays[(mBufferStart+index)%mRays.size()]; 
    270   } 
    271    
    272   vector<RayEntry> mRays; 
    273   int mMaxRays; 
    274   float mOriginMutationSize; 
    275   int mBufferStart; 
    276   int mLastIndex; 
    277 }; 
    278227 
    279228class GlobalLinesDistribution: public SamplingStrategy 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r1983 r1989  
    2626 
    2727 
    28 // $$JB HACK 
    29 #define KD_PVS_AREA (1e-5f) 
    3028 
    3129#define USE_RAY_LENGTH_AS_CONTRIBUTION 0 
     
    330328        if (mUseKdPvs) 
    331329        { 
    332                 float area = GetPreprocessor()->mKdTree->GetBox().SurfaceArea()*KD_PVS_AREA; 
    333                 KdNode *node = GetPreprocessor()->mKdTree->GetNode(isTermination ? 
    334                                                                                                                  ray.mTermination : ray.mOrigin, 
    335                                                                                                                  area); 
    336         return GetPreprocessor()->mKdTree->GetOrCreateKdIntersectable(node); 
     330          KdNode *node = GetPreprocessor()->mKdTree->GetPvsNode(isTermination ? 
     331                                                                                                                        ray.mTermination : ray.mOrigin); 
     332          return GetPreprocessor()->mKdTree->GetOrCreateKdIntersectable(node); 
    337333        } 
    338334        else 
    339         { 
     335          { 
    340336                return isTermination ? ray.mTerminationObject : ray.mOriginObject; 
    341         } 
     337          } 
    342338} 
    343339 
     
    30613057          // $$ warning collect objects takes only unmailed ones! 
    30623058          if (mUseKdPvsAfterFiltering) { 
    3063                 float area = GetPreprocessor()->mKdTree->GetBox().SurfaceArea()*KD_PVS_AREA; 
    3064                 GetPreprocessor()->mKdTree->CollectKdObjects(box, objects, area); 
     3059                GetPreprocessor()->mKdTree->CollectKdObjects(box, objects); 
    30653060          } else 
    30663061                CollectObjects(box, objects); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VssRay.h

    r1966 r1989  
    3232 
    3333  // Id of the generating SimpleRay 
    34   int mGeneratingRayId; 
     34  int mGeneratorId; 
    3535   
    3636  static int mailID; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/default.env

    r1983 r1989  
    172172                maxCostRatio 0.98 
    173173                ct_div_ci 0.5 
    174                 maxNodes 200000 
     174                maxNodes 50000 
    175175#500000  
    176176        } 
  • GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro

    r1983 r1989  
    112112Mailable.cpp \ 
    113113CombinedPreprocessor.cpp Vector2.cpp GlobalLinesRenderer.cpp \ 
    114 RenderTexture.cpp 
     114RenderTexture.cpp Mutation.cpp 
    115115 
    116116SOURCES += BoostPreprocessorThread.cpp  
  • GTP/trunk/Lib/Vis/Preprocessing/src/run

    r1986 r1989  
    11#!/bin/sh 
    22 
    3 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -preprocessor_ray_cast_method=0" 
     3COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -preprocessor_ray_cast_method=1" 
    44 
    5 #SCENE=../data/Pompeii/PompeiiTen.obj 
    6 #VIEWCELLS=../data/Pompeii/pompeii_big-seq-viewcells.xml.gz 
     5SCENE=../data/Pompeii/PompeiiTen.obj 
     6VIEWCELLS=../data/Pompeii/pompeii_big-seq-viewcells.xml.gz 
    77 
    88#SCENE=../data/artificial/room_with_sphere.obj 
    99#VIEWCELLS=../data/artificial/simpleHoleViewCell.x3d 
    1010 
    11 SCENE=../data/soda/soda5.dat 
    12 VIEWCELLS=../data/soda/soda5-viewcells.xml 
     11#SCENE=../data/soda/soda5.dat 
     12#VIEWCELLS=../data/soda/soda5-viewcells.xml 
    1313 
    1414$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
Note: See TracChangeset for help on using the changeset viewer.