Changeset 2716 for GTP/trunk/Lib/Vis/Preprocessing
- Timestamp:
- 05/27/08 11:12:02 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vps.sh
r2702 r2716 14 14 #VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz 15 15 #SCENE=../data/vienna/vienna_cropped.obj 16 SCENE=../data/roofs_new.obj17 #SCENE=../data/vienna/city_full_hp.obj16 #SCENE=../data/roofs_new.obj 17 SCENE=../data/vienna/city_full_hp.obj 18 18 #SCENE=../data/vienna/vienna_rep.obj 19 19 … … 23 23 24 24 #LOG_PREFIX=../src/SG08/rebut-arena-pixel2 25 LOG_PREFIX=../src/SG08/try_100_real26 #LOG_PREFIX=../src/SG08/city_full_100 25 #LOG_PREFIX=../src/SG08/full 26 LOG_PREFIX=../src/SG08/city_full 27 27 28 28 ENVIRONMENT=gvs.env … … 41 41 -gvs_samples_per_pass=1000000 \ 42 42 -gvs_initial_samples=16 \ 43 -gvs_max_viewcells= 2000 \44 -gvs_min_contribution=50 \43 -gvs_max_viewcells=5000 \ 44 -gvs_min_contribution=500 \ 45 45 -gvs_per_viewcell=true \ 46 -preprocessor_detect_empty_viewspace+ -kd_pvs_area=1e-5 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 46 -preprocessor_detect_empty_viewspace+ \ 47 -kd_pvs_area=1e-4 \ 48 -view_cells_use_kd_pvs+ \ 49 -af_use_kd_pvs+ \ 47 50 -gvs_stats=$LOG_PREFIX-gvsStats.log \ 48 51 -view_cells_filename=$VIEWCELLS \ -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r2715 r2716 1755 1755 { 1756 1756 1757 1758 1759 1757 // delete ALL dynamic stuff and rebuild using the new trafos 1758 preprocessor->mRayCaster->DeleteDynamicObjects(); 1759 1760 1760 #define MULTIPLE_OBJECTS 1 1761 1761 1762 1762 #if MULTIPLE_OBJECTS 1763 static ObjectContainer objects; 1764 1765 CLEAR_CONTAINER(objects); 1766 1767 for (size_t i = 0; i < mDynamicObjects.size(); ++ i) { 1768 SceneGraphLeaf *l = mDynamicObjects[i]; 1769 for (int j=0; j < l->mGeometry.size(); j++) { 1770 if (l->mGeometry[j]->Type() == Intersectable::TRIANGLE_INTERSECTABLE) { 1771 Triangle3 t(((TriangleIntersectable *)l->mGeometry[j])->GetItem()); 1772 t.ApplyTransformation(l->GetTransformation()); 1773 TriangleIntersectable *to = new TriangleIntersectable(t); 1774 to->SetId(l->GetIntersectable()->GetId()); 1775 1776 objects.push_back(to); 1777 } 1778 } 1779 } 1780 mRayCaster->AddDynamicObjecs(objects, IdentityMatrix()); 1763 static ObjectContainer objects; 1764 1765 CLEAR_CONTAINER(objects); 1766 1767 for (size_t i = 0; i < mDynamicObjects.size(); ++ i) 1768 { 1769 SceneGraphLeaf *l = mDynamicObjects[i]; 1770 1771 for (size_t j=0; j < l->mGeometry.size(); j++) 1772 { 1773 if (l->mGeometry[j]->Type() == Intersectable::TRIANGLE_INTERSECTABLE) 1774 { 1775 Triangle3 t(((TriangleIntersectable *)l->mGeometry[j])->GetItem()); 1776 t.ApplyTransformation(l->GetTransformation()); 1777 TriangleIntersectable *to = new TriangleIntersectable(t); 1778 to->SetId(l->GetIntersectable()->GetId()); 1779 objects.push_back(to); 1780 } 1781 } 1782 } 1783 1784 mRayCaster->AddDynamicObjecs(objects, IdentityMatrix()); 1781 1785 #endif 1782 1786 1783 1784 1785 1786 1787 1787 SceneGraphLeaf *toUpdate = NULL; 1788 1789 for (size_t i = 0; i < mDynamicObjects.size(); ++ i) 1790 { 1791 SceneGraphLeaf *l = mDynamicObjects[i]; 1788 1792 1789 1793 #if !MULTIPLE_OBJECTS 1790 1794 PrepareObjectsForRayCaster(l); 1791 1795 #endif 1792 1796 1793 if (l->HasChanged()) 1794 { 1795 cout<<"Updating affected PVSs..."<<endl; 1796 preprocessor->ObjectMoved(l); 1797 cout<<"done."<<endl; 1798 l->SetHasChanged(false); 1799 } 1800 } 1801 1802 mUpdateDynamicObjects = false; 1803 1797 if (l->HasChanged()) 1798 { 1799 cout<<"Updating affected PVSs..."<<endl; 1800 preprocessor->ObjectMoved(l); 1801 cout<<"done."<<endl; 1802 l->SetHasChanged(false); 1803 } 1804 } 1805 1806 mUpdateDynamicObjects = false; 1804 1807 } 1805 1808 } -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2715 r2716 246 246 247 247 // mat_specular and mat_shininess are NOT default values 248 GLfloat mat_ambient[] = {0.5f, 0.5f, 0.5f, 1.0f};249 GLfloat mat_diffuse[] = {1.0f, 1.0f, 1.0f, 1.0f};250 GLfloat mat_specular[] = {0.3f, 0.3f, 0.3f, 1.0f};251 GLfloat mat_shininess[] = {1.0f};252 253 glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient);254 glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);255 glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);256 glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);248 GLfloat mat_ambient[] = {0.5f, 0.5f, 0.5f, 1.0f}; 249 GLfloat mat_diffuse[] = {1.0f, 1.0f, 1.0f, 1.0f}; 250 GLfloat mat_specular[] = {0.3f, 0.3f, 0.3f, 1.0f}; 251 GLfloat mat_shininess[] = {1.0f}; 252 253 glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); 254 glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse); 255 glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); 256 glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); 257 257 258 258 GLfloat light_ambient[] = {0.3, 0.3, 0.3, 1.0}; … … 288 288 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); 289 289 290 glColor3f(0.6f, 0.6f, 0.6f);291 //glColor3f(0, 1, 0);290 //glColor3f(0.6f, 0.6f, 0.6f); 291 glColor3f(0, 1, 0); 292 292 293 293 glDepthFunc(GL_LESS); … … 342 342 343 343 // some error happened 344 if ( 1) //pixelCount > pixelThres)344 if (pixelCount > pixelThres) 345 345 { 346 346 cout << "f " << mFrame << " id " << viewcell->GetId() << " pvs " << pvsSize 347 347 << " e " << pixelCount << " vp " << mViewPoint << " vd " << mViewDirection << endl; 348 348 349 format().setSampleBuffers(true);350 cout << "here3 " << format().sampleBuffers() << endl;351 349 if (mSnapErrorFrames) 352 350 { … … 358 356 359 357 char filename[256]; 360 sprintf(filename, "error-frame-%04d-%05d.bmp", pass, mFrame);358 //sprintf(filename, "error-frame-%04d-%05d.bmp", pass, mFrame); 361 359 //sprintf(filename, "error-frame-%05d-%0.5f.png", mFrame, pErrorPixels); 362 //sprintf_s(filename, "error-frame-%05d-%04d-%08d.png", mFrame, viewcell->GetId(), pixelCount);360 sprintf_s(filename, "error-frame-%05d-%04d-%08d.png", mFrame, viewcell->GetId(), pixelCount); 363 361 364 362 QImage im = toImage(); … … 366 364 QString qstr(str.c_str()); 367 365 368 //im.save(qstr, "PNG"); 369 // use bmp for lossless storage (for video) 370 im.save(qstr, "BMP"); 366 im.save(qstr, "PNG"); 371 367 372 368 if (0)
Note: See TracChangeset
for help on using the changeset viewer.