Changeset 2076
- Timestamp:
- 02/02/07 13:25:06 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r2069 r2076 1292 1292 RegisterOption("Mutation.reverseSamplesDistance", 1293 1293 optFloat, 1294 "mutation_reverse_samples_distance ",1294 "mutation_reverse_samples_distance=", 1295 1295 "3.0"); 1296 1296 -
GTP/trunk/Lib/Vis/Preprocessing/src/Halton.cpp
r863 r2076 1 2 1 #include "Halton.h" 2 #include "PerfTimer.h" 3 3 4 4 namespace GtpVisibilityPreprocessor { 5 5 6 PerfTimer haltonTimer; 7 6 8 // global halton generator 7 9 8 Halton2 halton2; 9 float Halton2::_invBases[2]; 10 Halton2 halton2; 11 float Halton2::_invBases[2]; 12 13 float Halton<1>::_invBases[1]; 14 float Halton<2>::_invBases[2]; 15 float Halton<3>::_invBases[3]; 16 float Halton<4>::_invBases[4]; 17 float Halton<5>::_invBases[5]; 18 float Halton<6>::_invBases[6]; 19 20 21 Halton<1> dummmyHalton1(true); 22 Halton<2> dummmyHalton2(true); 23 Halton<3> dummmyHalton3(true); 24 Halton<4> dummmyHalton4(true); 25 Halton<5> dummmyHalton5(true); 26 Halton<6> dummmyHalton6(true); 27 28 void 29 HaltonSequence::GetNext(const int dimensions, float *p) 30 { 31 haltonTimer.Entry(); 32 for (int i=0; i < dimensions; i++) 33 p[i] = (float)GetNumber(i+1); 34 GenerateNext(); 35 haltonTimer.Exit(); 36 } 10 37 11 38 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Halton.h
r1894 r2076 10 10 // float r = 1 - prev - 1e-10f; 11 11 float r = 1.0f - prev; 12 //float r = 1.0f - prev; 12 13 if (baseRec < r) 13 14 return prev + baseRec; … … 17 18 hh = h; 18 19 h *= baseRec; 19 } while (h > =r);20 } while (h > r); 20 21 return prev + hh + h - 1.0f; 21 22 } 22 23 23 24 template<int T> 24 classHalton {25 float _invBases[T];25 struct Halton { 26 static float _invBases[T]; 26 27 float _prev[T]; 27 28 … … 32 33 _prev[i] = 0; 33 34 } 34 35 Halton( ) {35 36 Halton(const bool initializeBases) { 36 37 for (int i=0; i < T; i++) { 37 38 int base = FindPrime(i+1); … … 40 41 _invBases[i] = 1.0f/base; 41 42 } 43 } 44 45 Halton() { 42 46 Reset(); 43 47 } … … 53 57 }; 54 58 55 classHalton2 {59 struct Halton2 { 56 60 static float _invBases[2]; 57 61 float _prev[2]; … … 97 101 } 98 102 99 /** 103 104 /** 100 105 * Find the nth prime number. 101 106 * @param index the ordinal position in the sequence … … 133 138 134 139 void 135 GetNext(const int dimensions, float *p) 136 { 137 for (int i=0; i < dimensions; i++) 138 p[i] = (float)GetNumber(i+1); 139 GenerateNext(); 140 } 140 GetNext(const int dimensions, float *p); 141 141 142 142 void GenerateNext() { 143 143 index++; 144 } 145 146 double GetNumber(const int dimension) { 147 int base = FindPrime(dimension); 148 if(base == 1) { 149 base++; //The first dimension uses base 2. 150 } 151 152 int _p1 = base; 153 float _ip1 = 1.0f/base; 154 float p, u=0.0f; 155 int kk, a; 156 157 // the first coordinate 158 for (p = _ip1, kk = index ; kk ; p *= _ip1, kk /= _p1) 159 if ((a = kk % _p1)) 160 u += a * p; 161 162 return u; 144 163 } 145 164 … … 150 169 */ 151 170 152 double GetNumber (const int dimension) {171 double GetNumberOld(const int dimension) { 153 172 int base = FindPrime(dimension); 154 173 if(base == 1) { -
GTP/trunk/Lib/Vis/Preprocessing/src/IntelRayCaster.cpp
r2017 r2076 109 109 110 110 void IntelRayCaster::CastRays16( 111 SimpleRayContainer &rays, 111 SimpleRayContainer &rays, 112 112 VssRayContainer &vssRays, 113 113 const AxisAlignedBox3 &sbox, … … 115 115 const bool pruneInvalidRays) 116 116 { 117 int i; 118 const int num = 16; 119 120 #if DEBUG_RAYCAST 121 Debug<<"C16 "<<flush; 122 static int counter=0; 123 Debug<<counter++<<endl; 124 #endif 125 126 static int forward_hit_triangles[16]; 127 static float forward_dist[16]; 128 129 static int backward_hit_triangles[16]; 130 static float backward_dist[16]; 131 132 133 Vector3 min = mPreprocessor.mSceneGraph->GetBox().Min(); 134 Vector3 max = mPreprocessor.mSceneGraph->GetBox().Max(); 135 136 for (i=0; i < num; i++) { 137 #if DEBUG_RAYCAST 138 if (counter == 43964) { 139 Debug<<rays[i].mOrigin<<" "<<rays[i].mDirection<<endl; 140 } 141 #endif 142 mlrtaStoreRayAS16(&rays[i].mOrigin.x, 143 &rays[i].mDirection.x, 117 CastRays16(rays, 0, vssRays, sbox, castDoubleRay, pruneInvalidRays); 118 } 119 120 void IntelRayCaster::CastRays16( 121 SimpleRayContainer &rays, 122 const int offset, 123 VssRayContainer &vssRays, 124 const AxisAlignedBox3 &sbox, 125 const bool castDoubleRay, 126 const bool pruneInvalidRays) 127 { 128 int i, k; 129 const int num = 16; 130 131 #if DEBUG_RAYCAST 132 Debug<<"C16 "<<flush; 133 static int counter=0; 134 Debug<<counter++<<endl; 135 #endif 136 137 static int forward_hit_triangles[16]; 138 static float forward_dist[16]; 139 140 static int backward_hit_triangles[16]; 141 static float backward_dist[16]; 142 143 144 Vector3 min = mPreprocessor.mSceneGraph->GetBox().Min(); 145 Vector3 max = mPreprocessor.mSceneGraph->GetBox().Max(); 146 147 for (k=offset, i=0; i < num; i++, k++) { 148 #if DEBUG_RAYCAST 149 if (counter == 43964) { 150 Debug<<rays[k].mOrigin<<" "<<rays[k].mDirection<<endl; 151 } 152 #endif 153 mlrtaStoreRayAS16(&rays[k].mOrigin.x, 154 &rays[k].mDirection.x, 155 i); 156 } 157 158 #if DEBUG_RAYCAST 159 Debug<<"TA\n"<<flush; 160 #endif 161 162 mlrtaTraverseGroupAS16(&min.x, 163 &max.x, 164 forward_hit_triangles, 165 forward_dist); 166 167 #if DEBUG_RAYCAST 168 Debug<<"TAB\n"<<flush; 169 #endif 170 171 if (castDoubleRay) { 172 for (k=offset, i=0; i < num; i++, k++) { 173 Vector3 dir = -rays[k].mDirection; 174 mlrtaStoreRayAS16(&rays[k].mOrigin.x, 175 &dir.x, 144 176 i); 145 177 } 146 147 #if DEBUG_RAYCAST 148 Debug<<"TA\n"<<flush; 149 #endif 150 151 mlrtaTraverseGroupAS16(&min.x, 152 &max.x, 153 forward_hit_triangles, 154 forward_dist); 155 156 #if DEBUG_RAYCAST 157 Debug<<"TAB\n"<<flush; 158 #endif 159 160 if (castDoubleRay) { 161 for (i=0; i < num; i++) { 162 Vector3 dir = -rays[i].mDirection; 163 mlrtaStoreRayAS16(&rays[i].mOrigin.x, 164 &dir.x, 165 i); 166 } 167 178 168 179 #if DEBUG_RAYCAST 169 180 Debug<<"TB\n"<<flush; … … 179 190 Debug<<"BBB\n"<<flush; 180 191 #endif 181 182 for (i=0 ; i < num; i++)192 193 for (i=0, k=offset; i < num; i++, k++) 183 194 { 184 Intersection hitA(rays[ i].mOrigin), hitB(rays[i].mOrigin);195 Intersection hitA(rays[k].mOrigin), hitB(rays[k].mOrigin); 185 196 186 197 #if DEBUG_RAYCAST … … 197 208 198 209 //-rays[index+i].mDirection; // $$ temporary 199 hitA.mPoint = rays[ i].Extrap(forward_dist[i]);210 hitA.mPoint = rays[k].Extrap(forward_dist[i]); 200 211 } 201 212 … … 214 225 215 226 // normalB = rays[i].mDirection; // $$ temporary 216 hitB.mPoint = rays[ i].Extrap(-backward_dist[i]);227 hitB.mPoint = rays[k].Extrap(-backward_dist[i]); 217 228 } 218 229 } … … 222 233 #endif 223 234 224 ProcessRay(rays[i], 235 #if 1 236 ProcessRay(rays[k], 225 237 hitA, 226 238 hitB, … … 230 242 pruneInvalidRays 231 243 ); 244 #endif 232 245 } 233 246 … … 237 250 } 238 251 239 } 240 241 #endif 252 253 254 void 255 IntelRayCaster::CastRays( 256 SimpleRayContainer &rays, 257 VssRayContainer &vssRays, 258 const AxisAlignedBox3 &sbox, 259 const bool castDoubleRay, 260 const bool pruneInvalidRays ) 261 { 262 cout<<"INTEL"<<endl; 263 264 int buckets = rays.size()/16; 265 int offset = 0; 266 267 for (int i=0; i < buckets; i++, offset+=16) { 268 CastRays16(rays, offset, vssRays, sbox, castDoubleRay, pruneInvalidRays); 269 270 if ((int)rays.size() > 100000 && i % (100000/16) == 0) 271 cout<<"\r"<<offset<<"/"<<(int)rays.size()<<"\r"; 272 } 273 274 for (; offset < rays.size(); offset++) 275 CastRay(rays[offset], vssRays, sbox, castDoubleRay, pruneInvalidRays); 276 277 } 278 279 } 280 281 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/IntelRayCaster.h
r1996 r2076 51 51 const bool pruneInvalidRays = true); 52 52 53 virtual void CastRays16( 54 SimpleRayContainer &rays, 55 const int offset, 56 VssRayContainer &vssRays, 57 const AxisAlignedBox3 &sbox, 58 const bool castDoubleRay, 59 const bool pruneInvalidRays = true); 60 61 virtual void CastRays( 62 SimpleRayContainer &rays, 63 VssRayContainer &vssRays, 64 const AxisAlignedBox3 &sbox, 65 const bool castDoubleRay, 66 const bool pruneInvalidRays = true); 67 53 68 protected: 54 69 -
GTP/trunk/Lib/Vis/Preprocessing/src/Makefile
r2060 r2076 1 1 ############################################################################# 2 2 # Makefile for building: preprocessor 3 # Generated by qmake (2.00a) (Qt 4.1.2) on: ?t 25. I 14:38:5420073 # Generated by qmake (2.00a) (Qt 4.1.2) on: pá 2. II 13:23:45 2007 4 4 # Project: preprocessor.pro 5 5 # Template: app -
GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.cpp
r2071 r2076 11 11 #include "Exporter.h" 12 12 #include "Environment.h" 13 #include "RayCaster.h" 13 14 14 15 #ifdef GTP_INTERNAL … … 540 541 // use direction based distribution 541 542 Vector3 origin, direction; 542 static HaltonSequence halton; 543 544 halton.GetNext(5, rr); 543 544 for (int i=0; i < 5; i++) 545 rr[i] = RandomValue(0,1); 546 545 547 mPreprocessor.mViewCellsManager->GetViewPoint(origin, 546 548 Vector3(rr[0], rr[1], rr[2])); … … 683 685 } else { 684 686 mRays[index].mHalton.GetNext(4, rr); 687 685 688 // fuzzy random mutation 686 689 origin += ComputeOriginMutation(*ray, U, V, … … 751 754 mMutationRadiusTermination); 752 755 753 Environment::GetSingleton()->GetBoolValue("Mutation.useReverseSamples", 754 mUseReverseSamples); 755 756 Environment::GetSingleton()->GetFloatValue("Mutation.reverseSamplesDistance", 757 mReverseSamplesDistance); 758 756 bool useEnhancedFeatures; 757 758 #ifdef GTP_INTERNAL 759 int rayCaster; 760 Environment::GetSingleton()->GetIntValue("Mutation.radiusTermination", 761 rayCaster); 762 useEnhancedFeatures = (rayCaster == 763 RayCaster::INTEL_RAYCASTER); 764 #else 765 useEnhancedFeatures = false; 766 #endif 767 768 if (useEnhancedFeatures) { 769 Environment::GetSingleton()->GetBoolValue("Mutation.useReverseSamples", 770 mUseReverseSamples); 771 772 Environment::GetSingleton()->GetFloatValue("Mutation.reverseSamplesDistance", 773 774 mReverseSamplesDistance); 775 776 Environment::GetSingleton()->GetFloatValue("Mutation.silhouetteProb", 777 mSilhouetteProb); 778 779 } else { 780 mUseReverseSamples = false; 781 mReverseSamplesDistance = 1e20f; 782 mSilhouetteProb = 0.0f; 783 } 759 784 760 785 Environment::GetSingleton()->GetBoolValue("Mutation.useSilhouetteSamples", … … 764 789 mSilhouetteSearchSteps); 765 790 766 Environment::GetSingleton()->GetFloatValue("Mutation.silhouetteProb", 767 mSilhouetteProb); 768 769 791 770 792 Environment::GetSingleton()->GetBoolValue("Mutation.usePassImportance", 771 793 mUsePassImportance); -
GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.h
r2060 r2076 47 47 short mMutations; 48 48 short mUnsuccessfulMutations; 49 // Halton<4> mHalton; 49 50 HaltonSequence mHalton; 50 51 float mImportance; -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r2072 r2076 135 135 mStopComputation(false), 136 136 mThread(NULL), 137 mGlobalLinesRenderer(NULL) 137 mGlobalLinesRenderer(NULL), 138 mUseHwGlobalLines(false) 138 139 { 139 140 Environment::GetSingleton()->GetBoolValue("Preprocessor.useGlRenderer", mUseGlRenderer); … … 651 652 return false; 652 653 654 653 655 mViewCellsManager->ApplyFilter(mKdTree, 654 mApplyVisibilityFilter ? mVisibilityFilterWidth : -1.0f, 655 mApplyVisibilitySpatialFilter ? mVisibilityFilterWidth : -1.0f); 656 mApplyVisibilityFilter ? 657 mVisibilityFilterWidth : -1.0f, 658 mApplyVisibilitySpatialFilter ? 659 mVisibilityFilterWidth : -1.0f); 656 660 cout << "done." << endl; 657 661 } … … 1280 1284 } 1281 1285 1282 SimpleRayContainer::const_iterator rit, rit_end = rays.end(); 1283 1284 SimpleRayContainer rayBucket; 1285 int i = 0; 1286 1287 for (rit = rays.begin(); rit != rit_end; ++ rit, ++ i) 1288 { 1289 SimpleRay ray = *rit; 1286 1287 if (mUseHwGlobalLines) 1288 CastRaysWithHwGlobalLines( 1289 rays, 1290 vssRays, 1291 castDoubleRays, 1292 pruneInvalidRays 1293 ); 1294 else 1295 mRayCaster->CastRays( 1296 rays, 1297 vssRays, 1298 mViewCellsManager->GetViewSpaceBox(), 1299 castDoubleRays, 1300 pruneInvalidRays); 1301 1302 if ((int)rays.size() > 10000) 1303 { 1304 cout << endl; 1305 long t2 = GetTime(); 1306 1307 #if SHOW_RAYCAST_TIMING 1308 if (castDoubleRays) 1309 cout << 2 * rays.size() / (1e3f * TimeDiff(t1, t2)) << "M rays/s" << endl; 1310 else 1311 cout << rays.size() / (1e3f * TimeDiff(t1, t2)) << "M rays/s" << endl; 1312 #endif 1313 } 1314 1315 DeterminePvsObjects(vssRays); 1316 } 1317 1318 1319 1320 void 1321 Preprocessor::CastRaysWithHwGlobalLines( 1322 SimpleRayContainer &rays, 1323 VssRayContainer &vssRays, 1324 const bool castDoubleRays, 1325 const bool pruneInvalidRays 1326 ) 1327 { 1328 SimpleRayContainer::const_iterator rit, rit_end = rays.end(); 1329 SimpleRayContainer rayBucket; 1330 int i = 0; 1331 for (rit = rays.begin(); rit != rit_end; ++ rit, ++ i) 1332 { 1333 SimpleRay ray = *rit; 1290 1334 #ifdef USE_CG 1291 1335 // HACK: global lines must be treated special 1292 1293 { 1294 1295 1336 if (ray.mDistribution == SamplingStrategy::HW_GLOBAL_LINES_DISTRIBUTION) 1337 { 1338 mGlobalLinesRenderer->CastGlobalLines(ray, vssRays); 1339 continue; 1296 1340 } 1297 1341 #endif 1298 1299 1300 1301 1302 { 1303 1304 1305 1306 1307 1308 1309 1310 1342 rayBucket.push_back(ray); 1343 1344 // 16 rays gathered => do ray casting 1345 if ((int)rayBucket.size() >= 16) 1346 { 1347 mRayCaster->CastRays16( 1348 rayBucket, 1349 vssRays, 1350 mViewCellsManager->GetViewSpaceBox(), 1351 castDoubleRays, 1352 pruneInvalidRays); 1353 1354 rayBucket.clear(); 1311 1355 } 1312 1356 … … 1340 1384 } 1341 1385 1342 int m = 850000;1343 1344 if (0 && (int)rays.size() > m + 50) {1345 VssRayContainer tmpRays;1346 1347 for (int i=m; i < m+20; i++) {1348 if (vssRays[i])1349 {cout<<"e";1350 tmpRays.push_back(vssRays[i]);1351 }1352 else cout <<"d";1353 }1354 ExportRays("sorted_rays2.x3d", tmpRays, 200);1355 }1356 1357 if ((int)rays.size() > 10000)1358 {1359 cout << endl;1360 long t2 = GetTime();1361 1362 #if SHOW_RAYCAST_TIMING1363 if (castDoubleRays)1364 cout << 2 * rays.size() / (1e3f * TimeDiff(t1, t2)) << "M rays/s" << endl;1365 else1366 cout << rays.size() / (1e3f * TimeDiff(t1, t2)) << "M rays/s" << endl;1367 #endif1368 }1369 1370 DeterminePvsObjects(vssRays);1371 1386 } 1372 1387 -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h
r2048 r2076 150 150 const bool pruneInvalidRays = true); 151 151 152 virtual void 153 CastRaysWithHwGlobalLines( 154 SimpleRayContainer &rays, 155 VssRayContainer &vssRays, 156 const bool castDoubleRays, 157 const bool pruneInvalidRays 158 ); 159 152 160 /** Compute pixel error of the current PVS solution by sampling given number of viewpoints . 153 161 */ … … 212 220 bool mUseGlRenderer; 213 221 bool mUseGlDebugger; 214 222 bool mUseHwGlobalLines; 215 223 bool mLoadViewCells; 216 224 … … 248 256 int mSamplesPerEvaluation; 249 257 258 RayCaster *mRayCaster; 259 250 260 protected: 251 261 … … 266 276 GlobalLinesRenderer *mGlobalLinesRenderer; 267 277 268 RayCaster *mRayCaster;269 278 /// samples used for construction of the BSP view cells tree. 270 279 int mBspConstructionSamples; -
GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.cpp
r2070 r2076 356 356 } 357 357 358 } 358 359 void 360 RayCaster::CastRays( 361 SimpleRayContainer &rays, 362 VssRayContainer &vssRays, 363 const AxisAlignedBox3 &sbox, 364 const bool castDoubleRay, 365 const bool pruneInvalidRays ) 366 { 367 SimpleRayContainer::const_iterator rit, rit_end = rays.end(); 368 369 for (rit = rays.begin(); rit != rit_end; ++ rit) { 370 CastRay( 371 *rit, 372 vssRays, 373 sbox, 374 castDoubleRay, 375 pruneInvalidRays); 376 } 377 378 } 379 380 } -
GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.h
r2072 r2076 60 60 const bool pruneInvalidRays = true) = 0; 61 61 62 virtual void CastRays( 63 SimpleRayContainer &rays, 64 VssRayContainer &vssRays, 65 const AxisAlignedBox3 &sbox, 66 const bool castDoubleRay, 67 const bool pruneInvalidRays = true); 62 68 /*virtual void CastRaysEye4(SimpleRayContainer &rays, 63 69 VssRayContainer &vssRays, … … 68 74 virtual void 69 75 SortRays(SimpleRayContainer &rays); 70 71 76 72 77 -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp
r2072 r2076 12 12 namespace GtpVisibilityPreprocessor { 13 13 14 extern PerfTimer haltonTimer; 14 15 extern PerfTimer pvsTimer; 15 16 extern PerfTimer viewCellCastTimer; … … 128 129 sHalton.GetNext(4, r); 129 130 131 // static Halton<4> halton; 132 // halton.GetNext(r); 133 130 134 r[0] *= (float)mPreprocessor.mObjects.size() - 1; 131 135 const int i = (int)r[0]; … … 205 209 bool SpatialBoxBasedDistribution::GenerateSample(SimpleRay &ray) 206 210 { 207 /*208 Vector3 origin, direction;209 210 mPreprocessor.mViewCellsManager->GetViewPoint(origin);211 direction = mPreprocessor.mKdTree->GetBox().GetRandomPoint() - origin;212 //cout << "z";213 const float c = Magnitude(direction);214 215 if (c <= Limits::Small)216 return false;217 218 const float pdf = 1.0f;219 220 direction *= 1.0f / c;221 ray = SimpleRay(origin, direction, SPATIAL_BOX_BASED_DISTRIBUTION, pdf);222 223 return true;224 */225 211 226 212 Vector3 origin, direction; … … 228 214 float r[6]; 229 215 sHalton.GetNext(6, r); 230 mPreprocessor.mViewCellsManager->GetViewPoint(origin, Vector3(r[0], r[1], r[2])); 216 mPreprocessor.mViewCellsManager->GetViewPoint(origin, Vector3(r[0], 217 r[1], 218 r[2])); 231 219 232 220 direction = mPreprocessor.mKdTree->GetBox().GetRandomPoint(Vector3(r[3], … … 519 507 { 520 508 float r; 509 521 510 sHalton.GetNext(1, &r); 511 //static Halton<1> halton; 512 // halton.GetNext(&r); 513 522 514 int i; 523 515 // pickup a distribution … … 579 571 cout<<"view cell cast time:"<<viewCellCastTimer.TotalTime()<<" s"<<endl; 580 572 cout<<"pvs time:"<<pvsTimer.TotalTime()<<" s"<<endl; 573 cout<<"halton time:"<<haltonTimer.TotalTime()<<" s"<<endl; 581 574 // cout<<"obj time:"<<objTimer.TotalTime()<<" s"<<endl; 582 575 #endif … … 710 703 711 704 705 HwGlobalLinesDistribution::HwGlobalLinesDistribution(Preprocessor &preprocessor): 706 SamplingStrategy(preprocessor) 707 { 708 mType = HW_GLOBAL_LINES_DISTRIBUTION; 709 preprocessor.mUseHwGlobalLines = true; 710 } 712 711 713 712 bool HwGlobalLinesDistribution::GenerateSample(SimpleRay &ray) -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.h
r2000 r2076 249 249 public: 250 250 251 HwGlobalLinesDistribution(Preprocessor &preprocessor): 252 SamplingStrategy(preprocessor) { 253 //mType = HW_GLOBAL_LINES_DISTRIBUTION; 254 } 251 HwGlobalLinesDistribution(Preprocessor &preprocessor); 255 252 256 253 private: -
GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
r2049 r2076 114 114 Mailable.cpp \ 115 115 CombinedPreprocessor.cpp Vector2.cpp GlobalLinesRenderer.cpp \ 116 RenderTexture.cpp Mutation.cpp Timer/RDTSCTimer.cpp Timer/BenchTimer.cpp Timer/merror.cpp 116 RenderTexture.cpp Mutation.cpp Timer/RDTSCTimer.cpp \ 117 Timer/BenchTimer.cpp Timer/merror.cpp \ 118 Intersectable.cpp 117 119 118 120 SOURCES += BoostPreprocessorThread.cpp -
GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
r2060 r2076 1 #! /bin/sh1 #!sh 2 2 3 3 4 4 #COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 5 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter +-samples_per_evaluation=5000000 -samples_per_pass=1000000 -total_samples=100000000"5 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_evaluation=5000000 -samples_per_pass=1000000 -total_samples=100000000" 6 6 7 7 … … 31 31 32 32 SCENE=../data/vienna/vienna_cropped.obj 33 #VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz34 VIEWCELLS=../data/vienna/vienna-seq-viewcells-20000.xml.gz33 VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz 34 #VIEWCELLS=../data/vienna/vienna-seq-viewcells-20000.xml.gz 35 35 36 <<<<<<< .mine 37 PREFIX=../work/plots/osp-vienna2-1e5 38 ======= 36 39 37 # SCENE=../data/Pompeii/PompeiiTen.obj 40 38 # VIEWCELLS=../data/Pompeii/pompeii_big-seq-viewcells.xml.gz 41 >>>>>>> .r205142 39 43 PREFIX=../work/plots/osp- FILTER-1e540 PREFIX=../work/plots/osp-TEST-1e5 44 41 45 42 #SCENE=../data/atlanta/atlanta2.x3d … … 49 46 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 50 47 -rss_distributions=mutation+object_direction+spatial \ 51 -view_cells_filter_width=1.0 \52 48 -view_cells_use_kd_pvs+ -af_use_kd_pvs- \ 53 49 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \ … … 55 51 -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4a.hlog 56 52 57 <<<<<<< .mine 58 # $COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 59 # -preprocessor_visibility_file=$PREFIX-r-reference.xml \ 60 # -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \ 61 # -preprocessor_histogram_file=$PREFIX-r-reference.hlog 62 ======= 63 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 64 -rss_distributions=mutation+object_direction+spatial \ 65 -view_cells_filter_width=0.0 \ 66 -view_cells_use_kd_pvs+ -af_use_kd_pvs- \ 67 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4b.xml \ 68 -preprocessor_stats=$PREFIX-i-mixed-b1-n4b.log \ 69 -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4b.hlog 70 >>>>>>> .r2051 53 # # $COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 54 # # -preprocessor_visibility_file=$PREFIX-r-reference.xml \ 55 # # -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \ 56 # # -preprocessor_histogram_file=$PREFIX-r-reference.hlog 71 57 72 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 73 -rss_distributions=mutation+object_direction+spatial \ 74 -view_cells_filter_width=1.0 \ 75 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 76 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4c.xml \ 77 -preprocessor_stats=$PREFIX-i-mixed-b1-n4c.log \ 78 -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4c.hlog 58 # $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 59 # -rss_distributions=mutation+object_direction+spatial \ 60 # -view_cells_filter_width=0.0 \ 61 # -view_cells_use_kd_pvs+ -af_use_kd_pvs- \ 62 # -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4b.xml \ 63 # -preprocessor_stats=$PREFIX-i-mixed-b1-n4b.log \ 64 # -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4b.hlog 65 66 # $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 67 # -rss_distributions=mutation+object_direction+spatial \ 68 # -view_cells_filter_width=1.0 \ 69 # -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 70 # -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4c.xml \ 71 # -preprocessor_stats=$PREFIX-i-mixed-b1-n4c.log \ 72 # -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4c.hlog 73 74 # # $COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 75 # # -preprocessor_visibility_file=$PREFIX-r-reference.xml \ 76 # # -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \ 77 # # -preprocessor_histogram_file=$PREFIX-r-reference.hlog 78 79 # # $COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 80 # # -rss_distributions=direction -view_cells_filter_max_size=1 \ 81 # # -preprocessor_visibility_file=$PREFIX-r-reference-global.xml \ 82 # # -preprocessor_stats=$PREFIX-r-reference-global.log \ 83 # # -preprocessor_histogram_file=$PREFIX-r-reference-global.hlog 84 85 86 # $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 87 # -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 88 # -view_cells_use_kd_pvs- -af_use_kd_pvs- \ 89 # -preprocessor_visibility_file=$PREFIX-i-mixed-bvh-n4k.xml \ 90 # -preprocessor_stats=$PREFIX-i-mixed-bvh-n4k.log \ 91 # -preprocessor_histogram_file=$PREFIX-i-mixed-bvh-n4k.hlog 79 92 80 93 # $COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 81 # -preprocessor_visibility_file=$PREFIX-r-reference.xml \ 82 # -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \ 83 # -preprocessor_histogram_file=$PREFIX-r-reference.hlog 94 # -view_cells_use_kd_pvs- -af_use_kd_pvs- \ 95 # -preprocessor_visibility_file=$PREFIX-r-bvh-reference.xml \ 96 # -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-bvh-reference.log \ 97 # -preprocessor_histogram_file=$PREFIX-r-bvh-reference.hlog 84 98 85 99 # $COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 100 # -view_cells_use_kd_pvs- -af_use_kd_pvs- \ 86 101 # -rss_distributions=direction -view_cells_filter_max_size=1 \ 87 # -preprocessor_visibility_file=$PREFIX-r-reference-global.xml \ 88 # -preprocessor_stats=$PREFIX-r-reference-global.log \ 89 # -preprocessor_histogram_file=$PREFIX-r-reference-global.hlog 90 91 92 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 93 -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 94 -view_cells_use_kd_pvs- -af_use_kd_pvs- \ 95 -preprocessor_visibility_file=$PREFIX-i-mixed-bvh-n4k.xml \ 96 -preprocessor_stats=$PREFIX-i-mixed-bvh-n4k.log \ 97 -preprocessor_histogram_file=$PREFIX-i-mixed-bvh-n4k.hlog 98 99 $COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 100 -view_cells_use_kd_pvs- -af_use_kd_pvs- \ 101 -preprocessor_visibility_file=$PREFIX-r-bvh-reference.xml \ 102 -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-bvh-reference.log \ 103 -preprocessor_histogram_file=$PREFIX-r-bvh-reference.hlog 104 105 $COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 106 -view_cells_use_kd_pvs- -af_use_kd_pvs- \ 107 -rss_distributions=direction -view_cells_filter_max_size=1 \ 108 -preprocessor_visibility_file=$PREFIX-r-bvh-reference-global.xml \ 109 -preprocessor_stats=$PREFIX-r-bvh-reference-global.log \ 110 -preprocessor_histogram_file=$PREFIX-r-bvh-reference-global.hlog 102 # -preprocessor_visibility_file=$PREFIX-r-bvh-reference-global.xml \ 103 # -preprocessor_stats=$PREFIX-r-bvh-reference-global.log \ 104 # -preprocessor_histogram_file=$PREFIX-r-bvh-reference-global.hlog 111 105 112 106 … … 116 110 ############# 117 111 ############# 118 # ############112 # ############# 119 113 120 114 121 115 122 # $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \123 # -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \124 # -view_cells_use_kd_pvs- -af_use_kd_pvs- \125 # -preprocessor_visibility_file=$PREFIX-i-mixed-bvh-n4i.xml \126 # -preprocessor_stats=$PREFIX-i-mixed-bvh-n4i.log \127 # -preprocessor_histogram_file=$PREFIX-i-mixed-bvh-n4i.hlog116 # # $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 117 # # -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 118 # # -view_cells_use_kd_pvs- -af_use_kd_pvs- \ 119 # # -preprocessor_visibility_file=$PREFIX-i-mixed-bvh-n4i.xml \ 120 # # -preprocessor_stats=$PREFIX-i-mixed-bvh-n4i.log \ 121 # # -preprocessor_histogram_file=$PREFIX-i-mixed-bvh-n4i.hlog 128 122 129 123 130 124 131 # $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \132 # -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \133 # -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4i.xml \134 # -preprocessor_stats=$PREFIX-i-mixed-b1-n4i.log \135 # -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4i.hlog125 # #$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 126 # # -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 127 # # -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4i.xml \ 128 # # -preprocessor_stats=$PREFIX-i-mixed-b1-n4i.log \ 129 # # -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4i.hlog 136 130 137 131 138 # e - no origin mutation, silh. tm Q=2, reverse samples139 # f - no origin, q=2, no reverse samples140 # g - gaussian origin, q=2, reverse samples132 # # e - no origin mutation, silh. tm Q=2, reverse samples 133 # # f - no origin, q=2, no reverse samples 134 # # g - gaussian origin, q=2, reverse samples 141 135 142 # g, h contain pvs error estimations...136 # # g, h contain pvs error estimations... 143 137 144 # $COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \145 # -rss_distributions=rss+object_direction+spatial+object+direction -view_cells_filter_max_size=1 \146 # -preprocessor_stats=$PREFIX-i-mixed-b1-n2.log \147 # -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n2.hlog138 # # $COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 139 # # -rss_distributions=rss+object_direction+spatial+object+direction -view_cells_filter_max_size=1 \ 140 # # -preprocessor_stats=$PREFIX-i-mixed-b1-n2.log \ 141 # # -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n2.hlog 148 142 149 143
Note: See TracChangeset
for help on using the changeset viewer.