Changeset 2394


Ignore:
Timestamp:
05/24/07 18:33:00 (17 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing
Files:
4 edited

Legend:

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

    r2381 r2394  
    266266        Construction { 
    267267 
    268                 samples 5000000 
     268                samples 6000000 
    269269 
    270270                # type 0 = sequential computation, 1 = interleaved, 2 = gradient 
     
    288288        Termination { 
    289289                # maximal number of leaves 
    290                 maxLeaves 100000 
     290                maxLeaves 200000 
    291291                # maximal memory in MB 
    292292#               maxMemory 4 
    293                 maxMemory 20 
     293                maxMemory 35 
    294294                # minimum ratio of global cost decrease 
    295295                minGlobalCostRatio -1 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.cpp

    r2231 r2394  
    153153                SetFilled(); 
    154154                 
    155                 if (1) 
    156                         ExportGeometry(leaf->mObjects, true, box); 
    157                 else 
    158                         ExportBox(leaf->GetBoundingBox()); 
     155                ExportGeometry(leaf->mObjects, true, box); 
    159156        } 
    160157 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r2387 r2394  
    35693569void ViewCellsManager::ExportColor(Exporter *exporter,  
    35703570                                                                   ViewCell *vc,  
    3571                                                                    bool colorCode) const 
     3571                                                                   int colorCode) const 
    35723572{ 
    35733573        const bool vcValid = CheckValidity(vc, mMinPvsSize, mMaxPvsSize); 
     
    35763576        static Material m; 
    35773577        //cout << "color code: " << colorCode << endl; 
    3578         switch (mColorCode) 
     3578                 
     3579        switch (colorCode) 
    35793580        { 
    35803581        case 0: // Random 
     
    36013602                        if (mCurrentViewCellsStats.maxPvs) 
    36023603                        { 
    3603                                 importance = (float)mViewCellsTree->GetTrianglesInPvs(vc) / 700; 
    3604                                                          //(float)mCurrentViewCellsStats.maxPvs; 
     3604                                importance = //(float)mViewCellsTree->GetTrianglesInPvs(vc) / 700; 
     3605                                                         (float)mCurrentViewCellsStats.maxPvs; 
    36053606                        } 
    36063607                } 
     
    39963997        if (1) // export final view cells 
    39973998        { 
    3998                 mColorCode = 1; // hack color code 
     3999                mColorCode = 1; // 0 = pvs, 1 = random 
    39994000                Exporter *exporter = Exporter::GetExporter("final_view_cells.wrl"); 
    40004001         
     
    40734074                                                                                                const bool exportRays, 
    40744075                                                                                                const int maxRays, 
    4075                                                                                                 const string prefix, 
     4076                                                                                                const string &prefix, 
    40764077                                                                                                VssRayContainer *visRays) 
    40774078{ 
     
    45894590                                                                                           const bool exportRays, 
    45904591                                                                                           const int maxRays, 
    4591                                                                                            const string prefix, 
     4592                                                                                           const string &prefix, 
    45924593                                                                                           VssRayContainer *visRays) 
    45934594{ 
     
    53955396                                                                                                   const bool exportRays, 
    53965397                                                                                                   const int maxRays, 
    5397                                                                                                    const string prefix, 
     5398                                                                                                   const string &prefix, 
    53985399                                                                                                   VssRayContainer *visRays) 
    53995400{        
     
    63286329        if (exporter) 
    63296330        { 
     6331                // clamp to a scene boudning box 
    63306332                if (CLAMP_TO_BOX) 
    6331                 {        
    63326333                        exporter->mClampToBox = true;    
    6333                 } 
    6334  
    6335                 EvaluateViewCellsStats(); 
    6336  
     6334                 
    63376335                const long starttime = GetTime(); 
    63386336                cout << "exporting final view cells (after initial construction + post process) ... " << endl; 
     
    63506348                const int savedColorCode = mColorCode; 
    63516349 
    6352                 const float maxRenderCost = UpdateObjectCosts(); 
    6353                 cout << "maxRenderCost: " << maxRenderCost << endl; 
    6354                 mColorCode = 0; // 0 = random, 1 = export pvs 
    6355  
    6356                 if (1) 
    6357                 mHierarchyManager->ExportObjectSpaceHierarchy(exporter, objects,  
    6358                                                                                                           CLAMP_TO_BOX ? &bbox : NULL, maxRenderCost, false); 
    6359                  
    6360  
    6361                 if (1) 
    6362                 { 
    6363                         //ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, mColorCode, GetClipPlane()); 
    6364                         ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 
    6365                 } 
    6366  
    6367                 delete exporter; 
    6368  
    6369                 cout << "finished in " << TimeDiff(starttime, GetTime()) * 1e-3f << " secs" << endl; 
    6370                 mColorCode = savedColorCode; 
    6371         } 
    6372  
    6373         exporter = Exporter::GetExporter("final_object_partition.wrl"); 
    6374  
    6375         if (exporter) 
    6376         { 
    6377                 if (CLAMP_TO_BOX) 
    6378                 {        
    6379                         exporter->mClampToBox = true;    
    6380                 } 
    6381  
    63826350                EvaluateViewCellsStats(); 
    6383  
    6384                 const long starttime = GetTime(); 
    6385                 cout << "exporting final objects (after initial construction + post process) ... "; 
    6386  
    6387                 // matt: hack for clamping scene 
    6388                 AxisAlignedBox3 bbox = mViewSpaceBox; 
    6389                 bbox.Scale(scale); 
    6390  
    6391                 // hack color code (show pvs size) 
    6392                 const int savedColorCode = mColorCode; 
    6393  
    6394                 mColorCode = 1; // 0 = random, 1 = export pvs 
    6395                 // don't visualize render cost 
    6396                 const float maxRenderCost = -1; 
    6397  
     6351                const int colorCode = 0; 
     6352 
     6353                const float maxRenderCost = -1;//UpdateObjectCosts(); 
     6354                const bool exportBounds = false; 
     6355 
     6356                //cout << "maxRenderCost: " << maxRenderCost << endl; 
    63986357                if (1) 
    63996358                mHierarchyManager->ExportObjectSpaceHierarchy(exporter,  
     
    64016360                                                                                                          CLAMP_TO_BOX ? &bbox : NULL,  
    64026361                                                                                                          maxRenderCost,  
    6403                                                                                                           false); 
     6362                                                                                                          exportBounds); 
    64046363                 
    6405  
    6406                 if (1) 
    6407                 { 
    6408                         ExportViewCellsForViz(exporter, NULL, mColorCode, GetClipPlane()); 
    6409                         //ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, mColorCode, GetClipPlane()); 
    6410                 } 
    6411  
     6364                //ExportViewCellsForViz(exporter, CLAMP_TO_BOX ? &bbox : NULL, mColorCode, GetClipPlane()); 
     6365                ExportViewCellsForViz(exporter, NULL, colorCode, GetClipPlane()); 
     6366                 
    64126367                delete exporter; 
    64136368 
    64146369                cout << "finished in " << TimeDiff(starttime, GetTime()) * 1e-3f << " secs" << endl; 
    6415                 mColorCode = savedColorCode; 
    6416         } 
    6417  
    6418         // visualization of the merged view cells 
    6419     if (0)  
    6420         {        
    6421                 ExportMergedViewCells(objects); 
     6370        } 
     6371 
     6372        if (1) 
     6373        { 
     6374                exporter = Exporter::GetExporter("final_object_partition.wrl"); 
     6375 
     6376                if (exporter) 
     6377                { 
     6378                        if (CLAMP_TO_BOX) 
     6379                        {        
     6380                                exporter->mClampToBox = true;    
     6381                        } 
     6382 
     6383                        const long starttime = GetTime(); 
     6384                        cout << "exporting final objects (after initial construction + post process) ... "; 
     6385 
     6386                        // matt: hack for clamping scene 
     6387                        AxisAlignedBox3 bbox = mViewSpaceBox; 
     6388                        bbox.Scale(scale); 
     6389 
     6390                        // hack color code (show pvs size) 
     6391                        const int savedColorCode = mColorCode; 
     6392 
     6393                        EvaluateViewCellsStats(); 
     6394                        mColorCode = 1; // 0 = random, 1 = export pvs 
     6395 
     6396                        // don't visualize render cost 
     6397                        const float maxRenderCost = -1; 
     6398                        //const bool exportBounds = true; 
     6399                        const bool exportBounds = false; 
     6400 
     6401                        if (1) 
     6402                        mHierarchyManager->ExportObjectSpaceHierarchy(exporter,  
     6403                                                                      objects,  
     6404                                                                                                                  CLAMP_TO_BOX ? &bbox : NULL,  
     6405                                                                                                                  maxRenderCost,  
     6406                                                                                                                  exportBounds); 
     6407 
     6408 
     6409                        delete exporter; 
     6410 
     6411                        cout << "finished in " << TimeDiff(starttime, GetTime()) * 1e-3f << " secs" << endl; 
     6412                        mColorCode = savedColorCode; 
     6413                } 
    64226414        } 
    64236415 
     
    64476439                                                                                                   const bool exportRays, 
    64486440                                                                                                   const int maxRays, 
    6449                                                                                                    const string prefix, 
     6441                                                                                                   const string &prefix, 
    64506442                                                                                                   VssRayContainer *visRays) 
    64516443{ 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r2353 r2394  
    655655                                                                           const bool exportRays, 
    656656                                                                           const int maxRays, 
    657                                                                            const string prefix, 
     657                                                                           const string &prefix, 
    658658                                                                           VssRayContainer *visRays = NULL) = NULL; 
    659659 
     
    756756        virtual void ExportColor(Exporter *exporter,  
    757757                                                         ViewCell *vc,  
    758                                                          const bool colorCode) const; 
     758                                                         const int colorCode) const; 
    759759 
    760760        /** Creates meshes from the view cells. 
     
    985985                                                           const bool exportRays, 
    986986                                                           const int maxRays, 
    987                                                            const string prefix, 
     987                                                           const string &prefix, 
    988988                                                           VssRayContainer *visRays = NULL); 
    989989 
     
    10701070                                                           const bool exportRays, 
    10711071                                                           const int maxRays, 
    1072                                                            const string prefix, 
     1072                                                           const string &prefix, 
    10731073                                                           VssRayContainer *visRays = NULL); 
    10741074 
     
    11591159                                                           const bool exportRays,                
    11601160                                                           const int maxRays, 
    1161                                                            const string prefix, 
     1161                                                           const string &prefix, 
    11621162                                                           VssRayContainer *visRays = NULL); 
    11631163 
     
    12921292                                                           const bool exportRays, 
    12931293                                                           const int maxRays, 
    1294                                                            const string prefix, 
     1294                                                           const string &prefix, 
    12951295                                                           VssRayContainer *visRays = NULL); 
    12961296         
Note: See TracChangeset for help on using the changeset viewer.