Changeset 433 for trunk/VUT/GtpVisibilityPreprocessor
- Timestamp:
- 11/25/05 14:29:09 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
r431 r433 19 19 20 20 Preprocessor { 21 #type sampling21 #type sampling 22 22 type vss 23 23 } 24 24 25 25 VssPreprocessor { 26 samplesPerPass 10000 027 initialSamples 200000 028 vssSamples 100000 029 vssSamplesPerPass 10000 026 samplesPerPass 10000 27 initialSamples 200000 28 vssSamples 100000 29 vssSamplesPerPass 10000 30 30 useImportanceSampling true 31 31 } … … 38 38 minRays 100 39 39 minSize 0.001 40 maxCostRatio 0.9840 maxCostRatio 0.98 41 41 maxRayContribution 0.05 42 42 … … 164 164 #splitPlaneStrategy 130 165 165 166 splitPlaneStrategy 1 2166 splitPlaneStrategy 1 167 167 168 168 maxPolyCandidates 70 … … 186 186 minRays 200 187 187 minPolygons -1 188 maxDepth 40189 minPvs 35188 maxDepth 20 189 minPvs 100 190 190 minArea 0.01 191 191 maxRayContribution 0.005 … … 255 255 256 256 Termination { 257 maxDepth 10258 minPvs 50 0257 maxDepth 30 258 minPvs 50 259 259 minRays 1 260 260 minSize 0.1 -
trunk/VUT/GtpVisibilityPreprocessor/src/Ray.cpp
r430 r433 222 222 Ray::Ray(const VssRay &vssRay): 223 223 loc(vssRay.mOrigin), 224 sourceObject(0, vssRay.mOriginObject, 0), 225 dir(Normalize(vssRay.GetDir())) 226 { 227 intersections.push_back(Intersection(vssRay.mT, vssRay.mTerminationObject, 0)); 228 } 224 sourceObject(0, vssRay.mOriginObject, 0) 225 { 226 const float dist = Distance(vssRay.mTermination, vssRay.mOrigin); 227 228 if (dist) 229 dir = vssRay.GetDir() / dist; 230 231 if (!vssRay.mTerminationObject) 232 Debug << "error!" << endl; 233 234 intersections.push_back(Intersection(dist, vssRay.mTerminationObject, 0)); 235 236 Precompute(); 237 } -
trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp
r430 r433 821 821 if ((int)mVspSampleRays.size() < mVspConstructionSamples) 822 822 { 823 if ( object ||!ray.intersections.empty())823 if (!ray.intersections.empty()) 824 824 { 825 825 ray.sourceObject = Ray::Intersection(0.0, object, faceIndex); -
trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
r430 r433 1452 1452 float pFront = 0; 1453 1453 float pBack = 0; 1454 1454 Debug << "here" << endl; 1455 1455 if (mSplitPlaneStrategy & PVS) 1456 1456 { … … 1583 1583 << " backpvs: " << backPvs << " pBack: " << pBack << endl << endl; 1584 1584 #endif 1585 Debug << "here2" << endl; 1585 1586 return val; 1586 1587 } -
trunk/VUT/GtpVisibilityPreprocessor/src/VspKdTree.cpp
r428 r433 1324 1324 int side = in->ComputeRayIntersection(data.mRayData, data.mRayData.mRay->mT); 1325 1325 1326 1327 1328 if (data.mRayData.mRay->HasPosDir(in->mAxis))1329 {1330 tstack.push(RayTraversalData(in->GetBack(),1331 RayInfo(data.mRayData.mRay, data.mRayData.mMinT, data.mRayData.mRay->mT)));1326 if (side == 0) 1327 { 1328 if (data.mRayData.mRay->HasPosDir(in->mAxis)) 1329 { 1330 tstack.push(RayTraversalData(in->GetBack(), 1331 RayInfo(data.mRayData.mRay, data.mRayData.mMinT, data.mRayData.mRay->mT))); 1332 1332 1333 tstack.push(RayTraversalData(in->GetFront(),1334 RayInfo(data.mRayData.mRay, data.mRayData.mRay->mT, data.mRayData.mMaxT)));1335 1336 }1337 else1338 {1339 tstack.push(RayTraversalData(in->GetBack(),1340 1341 1342 1343 tstack.push(RayTraversalData(in->GetFront(),1344 1345 1346 1347 }1348 }1349 1350 1351 1352 1353 1333 tstack.push(RayTraversalData(in->GetFront(), 1334 RayInfo(data.mRayData.mRay, data.mRayData.mRay->mT, data.mRayData.mMaxT))); 1335 1336 } 1337 else 1338 { 1339 tstack.push(RayTraversalData(in->GetBack(), 1340 RayInfo(data.mRayData.mRay, 1341 data.mRayData.mRay->mT, 1342 data.mRayData.mMaxT))); 1343 tstack.push(RayTraversalData(in->GetFront(), 1344 RayInfo(data.mRayData.mRay, 1345 data.mRayData.mMinT, 1346 data.mRayData.mRay->mT))); 1347 } 1348 } 1349 else 1350 if (side == 1) 1351 tstack.push(RayTraversalData(in->GetFront(), data.mRayData)); 1352 else 1353 tstack.push(RayTraversalData(in->GetBack(), data.mRayData)); 1354 1354 } 1355 1355 else -
trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.cpp
r430 r433 11 11 12 12 13 bool useViewSpaceBox = true;13 bool useViewSpaceBox = false;//true; 14 14 bool use2dSampling = false; 15 bool useViewspacePlane = false; 15 bool useViewspacePlane = false;//true; 16 16 17 17 VssPreprocessor::VssPreprocessor(): … … 413 413 414 414 415 // int numExportRays = 10000; 416 417 int numExportRays = 0; 415 int numExportRays = 10000; 416 //int numExportRays = 0; 418 417 419 418 if (numExportRays) { … … 498 497 for (int i = 0; i < (int)vssRays.size(); ++ i) 499 498 { 500 CastRay(*mBspTree, * mVssRays[i]);499 CastRay(*mBspTree, *vssRays[i]); 501 500 } 502 501 } … … 539 538 Ray ray(vssRay); 540 539 541 /*Debug << ray << endl;540 Debug << ray << endl; 542 541 if (ray.intersections.empty()) 543 542 Debug << "empty ray" << endl; 544 543 else 545 544 Debug << "intersection: " << ray.intersections[0].mT << " " << ray.intersections[0].mObject << endl; 546 */ 545 547 546 mBspTree->CastRay(ray); 548 547 549 if (ray.sourceObject.mObject)548 //if (0 && ray.sourceObject.mObject) 550 549 //sampleContributions += 551 AddObjectSamples(ray.sourceObject.mObject, ray);550 //AddObjectSamples(ray.sourceObject.mObject, ray); 552 551 553 552 if (!ray.intersections.empty()) // second intersection found -
trunk/VUT/GtpVisibilityPreprocessor/src/VssTree.cpp
r431 r433 538 538 Intersectable::NewMail(3); 539 539 540 Debug << "evaluating cost ratio: " << leaf->rays.size() << endl;541 540 if (axis <= VssTreeNode::SPLIT_Z) { 542 541 // this is the main ray classification loop! … … 545 544 ri++) 546 545 if ((*ri).mRay->IsActive()) { 547 //Debug << "new t: " << (*ri).mRay->mT << endl;546 548 547 // determine the side of this ray with respect to the plane 549 548 int side = (*ri).ComputeRayIntersection(axis, position, (*ri).mRay->mT);
Note: See TracChangeset
for help on using the changeset viewer.