- Timestamp:
- 06/09/08 16:35:30 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/gvs.env
r2695 r2745 36 36 37 37 # internal: 0 intel: 1 2: havran 3: havran dyn 38 rayCastMethod 138 rayCastMethod 3 39 39 40 40 exportVisibility false -
GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vps.sh
r2743 r2745 18 18 SCENE=../data/vienna/city_full_hp.obj 19 19 #SCENE=../data/vienna/vienna_rep.obj 20 #SCENE=../data/vienna/vienna_cropped.obj20 SCENE=../data/vienna/vienna_cropped.obj 21 21 22 22 VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz … … 38 38 -preprocessor=gvs \ 39 39 -preprocessor_use_vbos- \ 40 -gvs_epsilon=0.00 1 \40 -gvs_epsilon=0.0001 \ 41 41 -gvs_total_samples=1000000 \ 42 42 -gvs_samples_per_pass=1000000 \ 43 -gvs_initial_samples=1 28\43 -gvs_initial_samples=10000 \ 44 44 -gvs_max_viewcells=1 \ 45 -gvs_min_contribution= 200 \45 -gvs_min_contribution=50 \ 46 46 -gvs_per_viewcell=true \ 47 -gvs_threshold=0. 5 \47 -gvs_threshold=0.05 \ 48 48 -gvs_radius_of_influence=5.0 \ 49 -gvs_use_deterministic_gvs -\49 -gvs_use_deterministic_gvs+ \ 50 50 -gvs_initial_jitter=0.1 \ 51 51 -preprocessor_detect_empty_viewspace+ \ -
GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.cpp
r2743 r2745 34 34 static VizStruct currentViz; 35 35 36 static int successfullReverseRays = 0; 37 36 38 37 39 /////////// … … 200 202 201 203 mGvsStats.mReverseSamples += (int)reverseRays.size(); 202 EnqueueRays(reverseRays);204 successfullReverseRays = EnqueueRays(reverseRays); 203 205 204 206 return (int)reverseRays.size(); … … 477 479 478 480 // cast reverse rays if necessary 479 if (USE_REVERSE_SAMPLING) castRays += CheckDiscontinuity(*newRay, hitTriangle, oldRay); 480 481 if (USE_REVERSE_SAMPLING) 482 { 483 castRays += CheckDiscontinuity(*newRay, hitTriangle, oldRay); 484 485 // also test reverse direction 486 if (newRay->mTerminationObject) 487 { 488 TriangleIntersectable *tObj = static_cast<TriangleIntersectable *>(newRay->mTerminationObject); 489 castRays += CheckDiscontinuity(oldRay, tObj->GetItem(), *newRay); 490 } 491 } 492 481 493 if (GVS_DEBUG) 482 494 currentViz.enlargedTriangle.push_back(p); … … 604 616 { 605 617 if (USE_REVERSE_SAMPLING) 618 { 606 619 castRays += CheckDiscontinuity(*vssRays[i], hitTriangle, currentRay); 620 621 // also test reverse direction 622 if (vssRays[i]->mTerminationObject) 623 { 624 TriangleIntersectable *tObj = static_cast<TriangleIntersectable *>(vssRays[i]->mTerminationObject); 625 castRays += CheckDiscontinuity(currentRay, tObj->GetItem(), *vssRays[i]); 626 } 627 } 607 628 608 629 castRays += SubdivideEdge(hitTriangle, … … 946 967 947 968 948 void GvsPreprocessor::EnqueueRays(const VssRayContainer &samples) 949 { 969 int GvsPreprocessor::EnqueueRays(const VssRayContainer &samples) 970 { 971 int success = 0; 950 972 rayTimer.Entry(); 951 973 … … 955 977 { 956 978 VssRay *ray = *vit; 957 HandleRay(ray);979 if (HandleRay(ray)) ++ success; 958 980 } 959 981 960 982 rayTimer.Exit(); 983 984 return success; 961 985 } 962 986 … … 1609 1633 cout << "contribution=" << mGvsStats.mPassContribution << " (of " << mMinContribution << ")" << endl; 1610 1634 cout << "obj contri=" << mCurrentViewCell->GetPvs().GetSize() - oldPvsSize << " (of " << mMinContribution << ")" << endl; 1635 cout << "successful reverse rays=" << successfullReverseRays << endl; 1636 cout << "cast reverse rays=" << mGvsStats.mReverseSamples << endl; 1611 1637 1612 1638 // termination criterium … … 1618 1644 mGvsStats.mPassContribution = 0; 1619 1645 passSamples = 0; 1646 successfullReverseRays = 0; 1620 1647 1648 1621 1649 // compute the pixel error of this visibility solution 1622 1650 if (1 && mEvaluatePixelError) -
GTP/trunk/Lib/Vis/Preprocessing/src/GvsPreprocessor.h
r2743 r2745 179 179 with respect to the previous ray. 180 180 */ 181 voidEnqueueRays(const VssRayContainer &samples);181 int EnqueueRays(const VssRayContainer &samples); 182 182 /** Hepler function for adaptive border sampling. It finds 183 183 new sample points around a triangle in a eps environment -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp
r2744 r2745 815 815 direction = UniformRandomVector(r[0], r[1]); 816 816 817 ##if 0 818 origin = mViewCell->GetBox().GetRandomPoint(); 819 #else 820 origin = mViewCell->GetBox().GetUniformRandomSurfacePoint(); 821 822 //origin = mViewCell->GetBox().GetRandomSurfacePoint(); 823 //mViewCell->GetRandomEdgePoint(origin, normal); 824 //origin = Vector3(680.682, 189.552, -278.177); 825 826 // move a little bit back to avoid piercing through walls 827 // that bound the view cell 828 origin -= 0.01f * normal; 829 #endif 830 817 818 if (1) 819 { 820 origin = mViewCell->GetBox().GetRandomPoint(); 821 } 822 else 823 { 824 origin = mViewCell->GetBox().GetUniformRandomSurfacePoint(); 825 826 //origin = mViewCell->GetBox().GetRandomSurfacePoint(); 827 //mViewCell->GetRandomEdgePoint(origin, normal); 828 //origin = Vector3(680.682, 189.552, -278.177); 829 830 // move a little bit back to avoid piercing through walls 831 // that bound the view cell 832 origin -= 1e-4f * normal; 833 } 831 834 832 835 static const float pdf = 1.0f;
Note: See TracChangeset
for help on using the changeset viewer.