Changeset 2676


Ignore:
Timestamp:
05/08/08 19:08:48 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/demo1.env

    r2660 r2676  
    170170 
    171171KdTree { 
    172         pvsArea   1e-5 
     172        pvsArea   1e-3 
    173173        sahUseFaces false 
    174174        Termination { 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_arena

    r2625 r2676  
    11#!sh 
     2 
     3# add bin to path 
     4export PATH=../bin:$PATH 
     5 
     6#TARGET=debug 
     7TARGET=release 
    28 
    39 
     
    511COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=5000000 -samples_per_pass=500000 -total_samples=100000000" 
    612 
    7 SCENE=../data/Arena/arena-high-lods.obj 
    8 VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz 
    9 VIEWCELLS=../data/Arena/arena-high-lods-10000-viewcells.xml.gz 
     13#SCENE=../data/Arena/arena-high-lods.obj 
     14SCENE=../data/Arena/arena_trees.obj 
     15 
     16#VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz 
     17#VIEWCELLS=../data/Arena/arena-high-lods-10000-viewcells.xml.gz 
    1018VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz 
    1119 
    12  
    13 #-rss_distributions=mutation+object_direction+spatial \ 
    14 #-preprocessor_stats=$PREFIX-i-mixed-b1-n4a.log \ 
     20# SCENE=../data/Pompeii/PompeiiTen.obj 
     21# VIEWCELLS=../data/Pompeii/pompeii_big-seq-viewcells.xml.gz 
    1522 
    1623PREFIX=../work/plots/osp-TEST 
     24 
     25#SCENE=../data/atlanta/atlanta2.x3d 
     26#PREFIX=../work/plots/atlanta2-rss9 
     27 
    1728DISTRIBUTIONS=mutation+object_direction+spatial 
    1829 
    19 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
     30$COMMAND -preprocessor=combined \ 
     31-scene_filename=$SCENE \ 
     32-view_cells_filename=$VIEWCELLS \ 
    2033-rss_distributions=$DISTRIBUTIONS \ 
    2134-view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 
    2235-preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \ 
    23 -preprocessor_ray_cast_method=2 \ 
    24 -preprocessor_stats=$PREFIX-i-spatial-b1-n4a.log \ 
     36-preprocessor_stats=$PREFIX-i-mixed-b1-n4a.log \ 
    2537-preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4a.hlog \ 
    2638demo1.env 
     39 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_vienna

    r2672 r2676  
    11#!sh 
     2 
     3# add bin to path 
     4export PATH=../bin:$PATH 
     5 
     6#TARGET=debug 
     7TARGET=release 
    28 
    39 
     
    713 
    814SCENE=../data/vienna/vienna_cropped.obj 
    9 SCENE=../data/vienna/city_full.obj 
    10 #VIEWCELLS=../data/vienna/vienna_cropped-seq-3000-false-20-viewcells.xml.gz 
    11 VIEWCELLS=../data/vienna/vienna_cropped-57000-viewcells.xml.gz 
     15#SCENE=../data/vienna/city_full.obj 
     16VIEWCELLS=../data/vienna/vienna_cropped-seq-3000-false-20-viewcells.xml.gz 
     17#VIEWCELLS=../data/vienna/vienna_cropped-57000-viewcells.xml.gz 
     18 
     19 
     20#SCENE=../data/Arena/arena-high-lods.obj 
     21SCENE=../data/Arena/arena_trees.obj 
     22#VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz 
     23#VIEWCELLS=../data/Arena/arena-high-lods-10000-viewcells.xml.gz 
     24VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz 
     25 
    1226 
    1327 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/run_gvs_vps.sh

    r2673 r2676  
    2727-preprocessor=gvs \ 
    2828-gvs_epsilon=0.0001 \ 
    29 -gvs_total_samples=1000000 \ 
    30 -gvs_samples_per_pass=1000000 \ 
     29-gvs_total_samples=100000 \ 
     30-gvs_samples_per_pass=100000 \ 
    3131-gvs_initial_samples=16 \ 
    32 -gvs_max_viewcells=200 \ 
     32-gvs_max_viewcells=1 \ 
    3333-gvs_min_contribution=50 \ 
    3434-gvs_per_viewcell=true \ 
  • GTP/trunk/Lib/Vis/Preprocessing/src/GtpVisibility05.vcproj

    r2660 r2676  
    115115                        <Tool 
    116116                                Name="VCCLCompilerTool" 
    117                                 AdditionalIncludeDirectories="..\src;Timer;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0-x86-windows-vc_8_0\include&quot;;..\..\..\..\..\..\NonGTP\Boost;..\src\havran;..\MultiLevelRayTracing;&quot;$(CG_INC_PATH)&quot;" 
     117                                AdditionalIncludeDirectories="..\src;Timer;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0\include&quot;;..\..\..\..\..\..\NonGTP\Boost;..\src\havran;..\MultiLevelRayTracing;&quot;$(CG_INC_PATH)&quot;" 
    118118                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_VERBOSE_PVS;USE_QT;GTP_INTERNAL;USE_CG" 
    119119                                RuntimeLibrary="2" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp

    r2671 r2676  
    6969#endif 
    7070 
    71 void 
    72 QtGlRendererBuffer::MakeCurrent() 
    73 { 
    74         makeCurrent(); 
    75 } 
    76  
    77 void 
    78 QtGlRendererBuffer::DoneCurrent() 
    79 { 
    80         doneCurrent(); 
     71 
     72void QtGlRendererBuffer::MakeCurrent() 
     73{ 
     74        QGLPixelBuffer::makeCurrent(); 
     75        //makeCurrent(); 
     76} 
     77 
     78 
     79void QtGlRendererBuffer::DoneCurrent() 
     80{ 
     81        QGLPixelBuffer::doneCurrent(); 
     82        //doneCurrent(); 
    8183} 
    8284   
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtInterface05.vcproj

    r2660 r2676  
    104104                                Name="VCCLCompilerTool" 
    105105                                WholeProgramOptimization="true" 
    106                                 AdditionalIncludeDirectories="..\src;..\..\src\;..\..\..\..\..\..\..\NonGTP\Zlib\include;&quot;$(QTDIR)\include\QtOpenGL&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(CG_INC_PATH)&quot;;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0-x86-windows-vc_8_0\include&quot;" 
     106                                AdditionalIncludeDirectories="..\src;..\..\src\;..\..\..\..\..\..\..\NonGTP\Zlib\include;&quot;$(QTDIR)\include\QtOpenGL&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(CG_INC_PATH)&quot;;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0\include&quot;" 
    107107                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_VERBOSE_PVS;USE_CG" 
    108108                                RuntimeLibrary="2" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor05.vcproj

    r2662 r2676  
    129129                                EnableFiberSafeOptimizations="false" 
    130130                                WholeProgramOptimization="true" 
    131                                 AdditionalIncludeDirectories="..\src;..\include;..\..\..\..\..\..\NonGTP\Boost;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;QtInterface;..\src\sparsehash\src\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0-x86-windows-vc_8_0\include&quot;;$(NOINHERIT)" 
     131                                AdditionalIncludeDirectories="..\src;..\include;..\..\..\..\..\..\NonGTP\Boost;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;QtInterface;..\src\sparsehash\src\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;$(NOINHERIT)" 
    132132                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_VERBOSE_PVS" 
    133133                                StringPooling="true" 
     
    156156                                OutputFile="../bin/$(ConfigurationName)/Preprocessor.exe" 
    157157                                LinkIncremental="1" 
    158                                 AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;..\src\GL;&quot;..\lib05\$(ConfigurationName)&quot;;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;&quot;..\MultiLevelRayTracing\RTScene\$(ConfigurationName)&quot;;&quot;..\MultiLevelRayTracing\RTWorld\$(ConfigurationName)&quot;;&quot;QtInterface\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0-x86-windows-vc_8_0\lib&quot;;&quot;$(CG_LIB_PATH)&quot;" 
     158                                AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;..\src\GL;&quot;..\lib05\$(ConfigurationName)&quot;;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;&quot;..\MultiLevelRayTracing\RTScene\$(ConfigurationName)&quot;;&quot;..\MultiLevelRayTracing\RTWorld\$(ConfigurationName)&quot;;&quot;QtInterface\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0\lib&quot;;&quot;$(CG_LIB_PATH)&quot;" 
    159159                                GenerateDebugInformation="true" 
    160160                                SubSystem="1" 
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r2667 r2676  
    131131main(int argc, char **argv) 
    132132{ 
    133 #if 0 
    134   // Test code by VH 
    135   TestRTcamera(argc, argv); 
    136   //TestRTfromFile(argc, argv); 
    137   //TestRTfromFilePackets(argc, argv); 
    138   //TestRT_4_fromFile(argc, argv); 
    139   return 0; 
     133        int returnCode = 0; 
     134 
     135#ifdef _CRT_SET 
     136 
     137        //Now just call this function at the start of your program and if you're 
     138        //compiling in debug mode (F5), any leaks will be displayed in the Output 
     139        //window when the program shuts down. If you're not in debug mode this will 
     140        //be ignored. Use it as you will! 
     141        //note: from GDNet Direct [3.8.04 - 3.14.04] void detectMemoryLeaks() { 
     142 
     143        _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF|_CRTDBG_ALLOC_MEM_DF); 
     144        _CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_FILE); 
     145        _CrtSetReportFile(_CRT_ASSERT,_CRTDBG_FILE_STDERR);  
    140146#endif 
    141 cout<<"hello world"<<endl; 
    142  
    143   int returnCode = 0; 
    144  
    145   //Now just call this function at the start of your program and if you're 
    146   //compiling in debug mode (F5), any leaks will be displayed in the Output 
    147   //window when the program shuts down. If you're not in debug mode this will 
    148   //be ignored. Use it as you will! 
    149   //note: from GDNet Direct [3.8.04 - 3.14.04] void detectMemoryLeaks() { 
    150  
    151 //#define _CRT_SET 
    152  
    153 #ifdef _CRT_SET 
    154   _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF|_CRTDBG_ALLOC_MEM_DF); 
    155   _CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_FILE); 
    156   _CrtSetReportFile(_CRT_ASSERT,_CRTDBG_FILE_STDERR);  
    157 #endif 
    158  
    159   InitTiming(); 
    160   Debug.open("debug.log"); 
    161  
    162   Environment::GetSingleton()->Parse(argc, argv, USE_EXE_PATH); 
    163   MeshKdTree::ParseEnvironment(); 
    164    
    165   char buff[128]; 
    166   Environment::GetSingleton()->GetStringValue("Preprocessor.type", buff); 
    167   string preprocessorType(buff); 
    168    
    169   if (!(preprocessor = PreprocessorFactory::CreatePreprocessor(preprocessorType))) 
     147 
     148        InitTiming(); 
     149        Debug.open("debug.log"); 
     150 
     151        Environment::GetSingleton()->Parse(argc, argv, USE_EXE_PATH); 
     152        MeshKdTree::ParseEnvironment(); 
     153 
     154        char buff[128]; 
     155        Environment::GetSingleton()->GetStringValue("Preprocessor.type", buff); 
     156        string preprocessorType(buff); 
     157 
     158        if (!(preprocessor = PreprocessorFactory::CreatePreprocessor(preprocessorType))) 
    170159        { 
    171160                Environment::DelSingleton(); 
     
    174163        } 
    175164 
    176          
     165 
    177166        Environment::GetSingleton()->GetStringValue("Scene.filename", buff); 
    178167        string filename(buff); 
    179          
     168 
    180169        const string externKdTree = ReplaceSuffix(filename, ".obj", ".kdf"); 
    181170        const string internKdTree = GetInternFilename(filename, preprocessor->mLoadMeshes ? 
    182                                                                                                   ".kdm" : ".kdt"); 
     171                ".kdm" : ".kdt"); 
    183172 
    184173        if (preprocessor->InitRayCast(externKdTree, internKdTree)) 
     
    193182        } 
    194183 
    195          
    196         //Debug << "using pvs type " << PVS_TYPE << endl; 
    197  
    198184        ///////////// 
    199185        //-- load scene  
     
    205191                exit(1); 
    206192        } 
    207          
     193 
    208194 
    209195        //////////// 
     
    220206                exit(1); 
    221207        } 
    222          
     208 
    223209        // export objects as obj 
    224210        if (preprocessor->mExportObj) 
     
    231217                else 
    232218                { 
    233                    
     219 
    234220                        const string objname = GetInternFilename(filename, ".obj"); 
    235221 
     
    237223                        bool success = preprocessor->ExportObj(objname, preprocessor->mObjects); 
    238224 
    239                          
    240225                        if (success) 
    241226                                cout << "finished exporting obj" << endl; 
     
    267252        bool importRandomViewCells; 
    268253        Environment::GetSingleton()->GetBoolValue("ViewCells.importRandomViewCells", 
    269                                                                                            importRandomViewCells); 
     254                importRandomViewCells); 
    270255 
    271256        if (importRandomViewCells) 
     
    279264        bool useHwGlobalLines; 
    280265        Environment::GetSingleton()->GetBoolValue("Preprocessor.useHwGlobalLines", 
    281                                                                                            useHwGlobalLines); 
     266                useHwGlobalLines); 
    282267 
    283268        if (useHwGlobalLines) 
     
    286271        // create a preprocessor thread (note: capsulates calls to boost fuctions!) 
    287272        PreprocessorThread *pt = NULL; 
    288          
     273 
    289274        //preprocessor->PrepareHwGlobalLines(); 
    290275        //globalLinesRenderer->Run(); 
     
    306291        QApplication *app = new QApplication(argc, NULL); 
    307292        pt = new QtPreprocessorThread(preprocessor);     
    308          
     293 
    309294        if (evalPixelError && (importRandomViewCells || frames)) 
    310295        { 
     
    328313                // $$matt 
    329314                preprocessor->renderer =  
    330                   new QtGlRendererBuffer(1024, 1024, 
    331                                                                  preprocessor->mSceneGraph, 
    332                                                                  preprocessor->mViewCellsManager, 
    333                                                                  preprocessor->mKdTree); 
    334                  
     315                        new QtGlRendererBuffer(1024, 1024, 
     316                        preprocessor->mSceneGraph, 
     317                        preprocessor->mViewCellsManager, 
     318                        preprocessor->mKdTree); 
     319 
    335320        } 
    336321 
    337322        bool exportRandomViewCells; 
    338323        Environment::GetSingleton()->GetBoolValue("ViewCells.exportRandomViewCells", 
    339                                                                                           exportRandomViewCells); 
    340          
     324                exportRandomViewCells); 
     325 
    341326        if (exportRandomViewCells) 
    342327        { 
     
    372357                        rendererWidget =  
    373358                                new QtGlRendererWidget(preprocessor->mSceneGraph, 
    374                                                                            preprocessor->mViewCellsManager, 
    375                                                                            preprocessor->mKdTree); 
     359                                preprocessor->mViewCellsManager, 
     360                                preprocessor->mKdTree); 
    376361 
    377362                        rendererWidget->Show(); 
     
    397382 
    398383        /*#if USE_THREADS 
    399                 pt = new BoostPreprocessorThread(preprocessor); 
     384        pt = new BoostPreprocessorThread(preprocessor); 
    400385        #else 
    401                 // use a dummy thread 
    402                 pt = new DummyPreprocessorThread(preprocessor); 
     386        // use a dummy thread 
     387        pt = new DummyPreprocessorThread(preprocessor); 
    403388        #endif 
    404389        */ 
Note: See TracChangeset for help on using the changeset viewer.