Changeset 370 for trunk/VUT/GtpVisibilityPreprocessor
- Timestamp:
- 11/02/05 17:57:29 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/scripts/Preprocessor.vcproj
r361 r370 347 347 </File> 348 348 </Filter> 349 <File 350 RelativePath=".\VTune\Preprocessor.vpj"> 351 </File> 349 352 </Files> 350 353 <Globals> -
trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
r367 r370 56 56 57 57 Sampling { 58 totalSamples 30000058 totalSamples 1000000 59 59 samplesPerPass 3 60 60 } … … 82 82 # input fromViewCells 83 83 # input fromSceneGeometry 84 samples 1000084 samples 200000 85 85 sideTolerance 0.005 86 86 } … … 120 120 #splitPlaneStrategy 130 121 121 122 splitPlaneStrategy 1 024122 splitPlaneStrategy 130 123 123 124 124 maxCandidates 80 … … 128 128 maxRays 200 129 129 maxPolygons 5 130 maxDepth 100130 maxDepth 50 131 131 132 132 # axis aligned splits 133 133 AxisAligned { 134 134 maxPolys 5000 135 maxRays 5000136 maxObjects 20 00135 maxRays 600 136 maxObjects 20 137 137 maxCostRatio 0.9 138 138 ct_div_ci 0.5 … … 145 145 146 146 PostProcessing { 147 samples 100000147 samples 200000 148 148 } 149 149 -
trunk/VUT/GtpVisibilityPreprocessor/src/Camera.cpp
r362 r370 132 132 ray.kdLeaves.clear(); 133 133 ray.meshes.clear(); 134 ray.bsp Leaves.clear();134 ray.bspIntersections.clear(); 135 135 136 136 ray.Init(mPosition, target, Ray::LOCAL_RAY); -
trunk/VUT/GtpVisibilityPreprocessor/src/Ray.h
r369 r370 56 56 }; 57 57 58 struct BspIntersection { 59 // the point of intersection 60 float mT; 61 62 BspLeaf *mLeaf; 63 64 BspIntersection(const float t, BspLeaf *l): 65 mT(t), mLeaf(l) {} 66 67 BspIntersection() {} 68 69 bool operator<(const BspIntersection &b) const { 70 return mT <b.mT; } 71 }; 58 72 59 73 // I should have some abstract cell data type !!! here … … 63 77 64 78 vector<Intersection> intersections; 65 vector<Bsp Leaf *> bspLeaves;79 vector<BspIntersection> bspIntersections; 66 80 vector<KdLeaf *> kdLeaves; 67 81 vector<MeshInstance *> meshes; -
trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp
r369 r370 34 34 ray.kdLeaves.clear(); 35 35 ray.meshes.clear(); 36 ray.bsp Leaves.clear();36 ray.bspIntersections.clear(); 37 37 38 38 // cout<<point<<" "<<direction<<endl; … … 124 124 125 125 // object can be seen from the view cell => add to view cell pvs 126 for (j=0; j < ray.bspLeaves.size(); ++ j) 127 { // if ray not in unbounded space 128 if (ray.bspLeaves[j]->GetViewCell() != &mUnbounded) 126 for (j=0; j < ray.bspIntersections.size(); ++ j) 127 { 128 BspLeaf *leaf = ray.bspIntersections[j].mLeaf; 129 // if ray not in unbounded space 130 if (leaf->GetViewCell() != &mUnbounded) 129 131 contributingSamples += 130 ray.bspLeaves[j]->GetViewCell()->GetPvs().AddSample(obj);132 leaf->GetViewCell()->GetPvs().AddSample(obj); 131 133 } 132 134 133 135 // rays passing through this viewcell 134 136 if (mPass > 1) 135 for (j=1; j < ((int)ray.bsp Leaves.size() - 1); ++ j)136 { 137 BspLeaf *leaf = ray.bsp Leaves[j];137 for (j=1; j < ((int)ray.bspIntersections.size() - 1); ++ j) 138 { 139 BspLeaf *leaf = ray.bspIntersections[j].mLeaf; 138 140 139 141 if (leaf->GetViewCell() != &mUnbounded) … … 679 681 int merged = 0; 680 682 RayContainer::const_iterator rit, rit_end = rays.end(); 681 vector< BspLeaf *>::const_iterator lit;683 vector<Ray::BspIntersection>::const_iterator iit; 682 684 683 685 for (rit = rays.begin(); rit != rays.end(); ++ rit) … … 685 687 // traverse leaves stored in the rays and compare and merge consecutive 686 688 // leaves (i.e., the neighbors in the tree) 687 if ((*rit)->bsp Leaves.empty())689 if ((*rit)->bspIntersections.empty()) 688 690 continue; 689 691 690 lit = (*rit)->bspLeaves.begin();691 692 BspLeaf *previousLeaf = *lit;693 ++ lit;694 695 for (; lit != (*rit)->bspLeaves.end(); ++ lit)696 { 697 BspLeaf *leaf = *lit;692 iit = (*rit)->bspIntersections.begin(); 693 694 BspLeaf *previousLeaf = (*iit).mLeaf; 695 ++ iit; 696 697 for (; iit != (*rit)->bspIntersections.end(); ++ iit) 698 { 699 BspLeaf *leaf = (*iit).mLeaf; 698 700 699 701 if (mBspTree->ShouldMerge(leaf, previousLeaf)) … … 784 786 Ray *ray = mSampleRays[k]; 785 787 786 for (int j = 0; j < (int)ray->bspLeaves.size(); ++ j) 787 { 788 for (int j = 0; j < (int)ray->bspIntersections.size(); ++ j) 789 { 790 BspLeaf *leaf = ray->bspIntersections[j].mLeaf; 791 788 792 for (int i = 0; i < (int)bspLeaves.size(); ++ i) 789 793 { 790 if (bspLeaves[i]->GetViewCell() == ray->bspLeaves[j]->GetViewCell())794 if (bspLeaves[i]->GetViewCell() == leaf->GetViewCell()) 791 795 { 792 796 vcRays[i].push_back(*ray); -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r367 r370 321 321 } 322 322 323 ray->bspLeaves.push_back(this); 323 // warning: not ordered 324 ray->bspIntersections.push_back(Ray::BspIntersection((*it)->mMinT, this)); 324 325 } 325 326 } … … 1621 1622 if (!leaf->mViewCell->Mailed()) 1622 1623 { 1623 ray.bsp Leaves.push_back(leaf);1624 ray.bspIntersections.push_back(Ray::BspIntersection(maxt, leaf)); 1624 1625 leaf->mViewCell->Mail(); 1625 1626 ++ hits; … … 2299 2300 2300 2301 BoundedRayContainer::const_iterator rit, rit_end = rays.end(); 2301 vector< BspLeaf *>::const_iterator lit;2302 vector<Ray::BspIntersection>::const_iterator iit; 2302 2303 2303 2304 ViewCell::NewMail(); … … 2307 2308 Ray *ray = (*rit)->mRay; 2308 2309 2309 for (lit = ray->bspLeaves.begin(); lit != ray->bspLeaves.end(); ++ lit) 2310 { 2311 if ((*lit)->mViewCell->Mailed()) 2310 for (iit = ray->bspIntersections.begin(); iit != ray->bspIntersections.end(); ++ iit) 2311 { 2312 BspViewCell *vc = (*iit).mLeaf->mViewCell; 2313 2314 if (vc->Mailed()) 2312 2315 { 2313 pvsSize += (*lit)->mViewCell->GetPvs().GetSize();2316 pvsSize += vc->GetPvs().GetSize(); 2314 2317 } 2315 2318 } -
trunk/VUT/GtpVisibilityPreprocessor/src/default.env
r369 r370 61 61 62 62 ViewCells { 63 hierarchy kdTree64 #hierarchy bspTree63 #hierarchy kdTree 64 hierarchy bspTree 65 65 # hierarchy sceneDependent 66 66 67 67 height 5.0 68 68 maxViewCells 0 69 70 minPvsDif 100 71 # maxPvsSize 200 69 72 70 73 # filename ../data/atlanta/atlanta_viewcells_large.x3d … … 74 77 } 75 78 76 77 78 79 79 BspTree { 80 80 Construction { … … 82 82 # input fromViewCells 83 83 # input fromSceneGeometry 84 samples 10000 084 samples 10000 85 85 sideTolerance 0.005 86 86 } … … 97 97 # least ray splits = 256 98 98 # balanced rays = 512 99 # pvs = 1024 99 100 100 101 # least splits + balanced polygons … … 119 120 #splitPlaneStrategy 130 120 121 121 splitPlaneStrategy 1 30122 splitPlaneStrategy 1024 122 123 123 124 maxCandidates 80 124 125 125 126 Termination { 126 # autopartition127 maxRays 80128 maxPolygons 0127 # autopartition 128 maxRays 200 129 maxPolygons 5 129 130 maxDepth 100 130 131 131 132 # axis aligned splits 132 133 AxisAligned { 133 maxPolys 500 134 maxRays 300135 maxObjects 20 134 maxPolys 5000 135 maxRays 5000 136 maxObjects 2000 136 137 maxCostRatio 0.9 137 138 ct_div_ci 0.5 … … 142 143 splitBorder 0.01 143 144 } 145 146 PostProcessing { 147 samples 100000 148 } 144 149 145 150 # if split polys are stored for visualization
Note: See TracChangeset
for help on using the changeset viewer.