Changeset 578 for trunk/VUT/GtpVisibilityPreprocessor
- Timestamp:
- 01/25/06 18:28:09 (19 years ago)
- Location:
- trunk/VUT/GtpVisibilityPreprocessor
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
r577 r578 23 23 useGlRenderer false 24 24 # type sampling 25 #type vss26 type rss25 type vss 26 # type rss 27 27 detectEmptyViewSpace false 28 28 } … … 176 176 # samples used for view cell construction 177 177 Construction { 178 samples 500000179 samplesPerPass 50000178 samples 1500000 179 samplesPerPass 40000 180 180 } 181 181 182 182 exportToFile false 183 loadFromFile true183 loadFromFile false 184 184 185 185 #type kdTree … … 271 271 VspBspTree { 272 272 Construction { 273 samples 90000 273 samples 900000 274 274 epsilon 0.005 275 275 randomize false … … 315 315 #maxAccRayLength 100 316 316 317 maxViewCells 500 317 maxViewCells 5000 318 318 319 319 # used for pvs criterium … … 336 336 PostProcess { 337 337 maxCostRatio 0.1 338 minViewCells 5000338 minViewCells 110 339 339 useRaysForMerge false 340 340 exportMergeStats false -
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp
r576 r578 38 38 float BspMergeCandidate::sOverallCost = 0; 39 39 bool BspMergeCandidate::sUseArea = false; 40 41 42 int BspMergeCandidate::sUpperPvsLimit = 120; 43 int BspMergeCandidate::sLowerPvsLimit = 5; 44 40 45 41 46 … … 400 405 geom); 401 406 402 // first node is kd node 403 tData.mIsKdNode = true; 407 // first node is kd node, i.e. an axis aligned box 408 if (1) 409 tData.mIsKdNode = true; 410 else 411 tData.mIsKdNode = false; 404 412 405 413 tStack.push(tData); … … 1386 1394 { 1387 1395 // try to equalize render differences 1388 const float oldCost = pOverall * (float)totalPvs + Limits::Small; 1389 float newCost = fabs(pvsFront * pFront - pvsBack * pBack); 1396 //const float oldCost = pOverall * (float)totalPvs + Limits::Small; 1397 //float newCost = fabs(pvsFront * pFront - pvsBack * pBack); 1398 const float oldCost = pOverall + Limits::Small; 1399 float newCost = (float)abs(pvsFront - pvsBack); 1390 1400 1391 1401 cost += mPvsFactor * newCost / oldCost; … … 3523 3533 3524 3534 3535 inline float BspMergeCandidate::EvalPvsPenalty(int pvs) const 3536 { 3537 // clamp to minmax values 3538 if (pvs > sUpperPvsLimit) 3539 return (float)sUpperPvsLimit; 3540 if (pvs < sLowerPvsLimit) 3541 return (float)sLowerPvsLimit; 3542 3543 return (float)pvs; 3544 } 3545 3546 3525 3547 void BspMergeCandidate::EvalMergeCost() 3526 3548 { … … 3532 3554 //const int newPvs = diff1 + vc1->GetPvs().GetSize(); 3533 3555 const int newPvs = ComputeMergedPvsSize(vc1->GetPvs(), vc2->GetPvs()); 3556 const float f = EvalPvsPenalty(newPvs); 3534 3557 3535 3558 //-- compute ratio of old cost -
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.h
r574 r578 763 763 class BspMergeCandidate 764 764 { 765 friend class VspBspTree; 766 765 767 public: 766 768 … … 807 809 static bool sUseArea; 808 810 811 static int sUpperPvsLimit; 812 static int sLowerPvsLimit; 813 814 protected: 815 816 809 817 /** Evaluates the merge costs of the leaves. 810 818 */ 811 819 void EvalMergeCost(); 812 820 813 protected: 821 /** penalty for a given pvs size. 822 */ 823 inline float EvalPvsPenalty(int pvs) const; 814 824 815 825 /** Cost of a view cell.
Note: See TracChangeset
for help on using the changeset viewer.