Changeset 1052 for GTP/trunk/Lib/Vis
- Timestamp:
- 06/25/06 06:54:53 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/vienna.env
r942 r1052 112 112 113 113 maxDepth 40 114 115 114 116 minPvs 3 115 117 minRays 30 … … 222 224 refine false 223 225 compress false 224 merge true 225 emptyViewCellsMerge false 226 merge false 226 227 } 227 228 … … 251 252 samplingType box 252 253 histogram true 253 histo Passes5000254 histoStepSize 5000 254 255 } 255 256 … … 270 271 } 271 272 272 273 VspKdTree {274 epsilon 1e-6275 276 Construction {277 samples 500000278 }279 280 Termination {281 maxDepth 40282 minPvs 0283 minRays 1284 minSize 0.001285 maxCostRatio 5.9286 maxViewCells 169287 missTolerance 4288 maxRayContribution 2.5289 }290 291 maxTotalMemory 100292 maxStaticMemory 40293 294 splitType regular295 #splitType heuristics296 splitUseOnlyDrivingAxis true297 ct_div_ci 0.0298 299 PostProcess {300 maxCostRatio 0.005301 minViewCells 10000302 maxPvsSize 5000303 }304 305 306 Visualization {307 }308 }309 273 310 274 VspBspTree { -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1047 r1052 4159 4159 { 4160 4160 // hack pvs 4161 const int savedColorCode = mColorCode;4162 mColorCode = 1;4161 //const int savedColorCode = mColorCode; 4162 //mColorCode = 1; 4163 4163 4164 4164 Exporter *exporter = Exporter::GetExporter("final_view_cells.wrl"); … … 4176 4176 } 4177 4177 4178 if (mExportGeometry) 4178 Material m; 4179 4180 m.mDiffuseColor.r = 0.0f; 4181 m.mDiffuseColor.g = 0.5f; 4182 m.mDiffuseColor.b = 0.5f; 4183 4184 exporter->SetForcedMaterial(m); 4185 4186 if (0 && mExportGeometry) 4179 4187 { 4180 4188 exporter->ExportGeometry(objects); … … 4184 4192 if (0 && mExportRays) 4185 4193 { 4186 exporter->ExportRays(visRays, RgbColor( 0, 1, 0));4194 exporter->ExportRays(visRays, RgbColor(1, 0, 0)); 4187 4195 } 4188 4196 … … 4191 4199 // HACK: export without clip plane 4192 4200 const bool b = mUseClipPlaneForViz; 4193 mUseClipPlaneForViz = false;4201 //mUseClipPlaneForViz = false; 4194 4202 4195 4203 ExportViewCellsForViz(exporter); … … 4201 4209 } 4202 4210 4203 mColorCode = savedColorCode;4211 //mColorCode = savedColorCode; 4204 4212 } 4205 4213 … … 4398 4406 } 4399 4407 4400 Debug << "here233" << (int)vcRays.size() << endl;4408 //Debug << "#rays: " << (int)vcRays.size() << endl; 4401 4409 4402 4410 //-- export rays piercing this view cell … … 4606 4614 mVspBspTree->ConstructGeometry(leaf, geom); 4607 4615 4608 const float eps = 0.000 00001f;4616 const float eps = 0.0001f; 4609 4617 const int cf = geom.Side(plane, eps); 4610 4618 … … 5245 5253 5246 5254 // export rays 5247 if ( 0&& mExportRays)5255 if (1 && mExportRays) 5248 5256 { 5249 5257 exporter->ExportRays(visRays, RgbColor(0, 1, 0)); … … 5253 5261 5254 5262 // HACK: export without clip plane 5255 //const bool b = mUseClipPlaneForViz;5256 //mUseClipPlaneForViz = false;5263 const bool b = mUseClipPlaneForViz; 5264 mUseClipPlaneForViz = false; 5257 5265 5258 5266 ExportViewCellsForViz(exporter); 5259 5267 5260 //mUseClipPlaneForViz = b;5268 mUseClipPlaneForViz = b; 5261 5269 delete exporter; 5262 5270 -
GTP/trunk/Lib/Vis/Preprocessing/src/VrmlExporter.cpp
r1047 r1052 1238 1238 SetForcedMaterial(RandomMaterial()); 1239 1239 } 1240 1241 1240 ExportIntersectable(*oit); 1242 1241 } 1243 1244 1242 return; 1245 1243 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp
r1047 r1052 777 777 ++ contributingSamples; 778 778 779 if ( 1) leaf->mVssRays.push_back(new VssRay(*ray));779 if (0) leaf->mVssRays.push_back(new VssRay(*ray)); 780 780 } 781 781 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VssPreprocessor.cpp
r1027 r1052 564 564 box.SetMax(1, box.Min(1)); 565 565 566 cout <<"mUseViewSpaceBox="<<mUseViewSpaceBox<<endl;566 cout << "use view space box=" << mUseViewSpaceBox<<endl; 567 567 568 568 … … 575 575 else 576 576 { 577 // HACK: enlarge in y directon578 577 mViewSpaceBox = new AxisAlignedBox3(mKdTree->GetBox()); 579 578 580 if ( 1)579 if (0) 581 580 { 582 // Vector3 pmin = mViewSpaceBox->Min();581 // HACK: enlarge in y directon 583 582 Vector3 size = mViewSpaceBox->Size(); 584 //size[1] *= 1.25; 585 //Vector3 enlarge(size[0] * 0.25f, size[1] * 0.0f, size[2] * 0.25f); 586 Vector3 enlarge(size[0] * 4.0f, 0.0f, 0.0f); 587 588 //mViewSpaceBox->Enlarge(enlarge); 583 584 size[1] *= 1.25; 585 Vector3 enlarge(size[0] * 0.25f, size[1] * 0.0f, size[2] * 0.25f); 586 //Vector3 enlarge(size[0] * 4.0f, 0.0f, 0.0f); 587 588 mViewSpaceBox->Enlarge(enlarge); 589 589 mViewSpaceBox->SetMax(mViewSpaceBox->Max() + enlarge); 590 590 } 591 591 else 592 592 { 593 AxisAlignedBox3 tbox(*mViewSpaceBox); 594 595 Vector3 size = mViewSpaceBox->Size(); 596 tbox.SetMax(0, mViewSpaceBox->Max(0) + size[0] * 0.5); 597 tbox.SetMin(0, mViewSpaceBox->Min(0) + size[0]); 598 *mViewSpaceBox = tbox; 599 593 600 // $$ JB temporary 594 AxisAlignedBox3 tempbox = *mViewSpaceBox;601 /*AxisAlignedBox3 tempbox = *mViewSpaceBox; 595 602 596 603 float s = tempbox.Size(0); … … 599 606 tempbox.SetMax(0, box.Max(0) + s*0.8f); 600 607 tempbox.SetMin(0, box.Min(0) + s*0.8f); 601 *mViewSpaceBox = tempbox; 608 *mViewSpaceBox = tempbox;*/ 602 609 } 603 610 }
Note: See TracChangeset
for help on using the changeset viewer.