Changeset 667


Ignore:
Timestamp:
03/01/06 10:31:49 (18 years ago)
Author:
mattausch
Message:

test version
build script for testing. code is set uo for testing also

Location:
GTP/trunk/Lib/Vis
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r666 r667  
    12801280 
    12811281        RegisterOption("ViewCells.maxViewCells", 
    1282                         optInt, 
    1283                         "view_cells_max_view_cells=", 
    1284                         "0"); 
     1282                                        optInt, 
     1283                                        "view_cells_max_view_cells=", 
     1284                                        "0"); 
    12851285 
    12861286        RegisterOption("ViewCells.maxPvsRatio", 
     
    12901290 
    12911291        RegisterOption("ViewCells.filename", 
    1292                         optString, 
    1293                         "view_cells_filename=", 
    1294                         "atlanta_viewcells_large.x3d"); 
     1292                                        optString, 
     1293                                        "view_cells_filename=", 
     1294                                        "atlanta_viewcells_large.x3d"); 
    12951295 
    12961296        RegisterOption("ViewCells.height", 
    1297                         optFloat, 
    1298                         "view_cells_height=", 
    1299                         "5.0"); 
     1297                                        optFloat, 
     1298                                        "view_cells_height=", 
     1299                                        "5.0"); 
    13001300 
    13011301        RegisterOption("ViewCells.Visualization.colorCode", 
    1302                 optString, 
    1303                 "-view_cells_visualization_color_code", 
    1304                 "PVS"); 
     1302                                        optString, 
     1303                                        "view_cells_visualization_color_code", 
     1304                                        "PVS"); 
     1305 
     1306        RegisterOption("ViewCells.Visualization.clipPlanePos", 
     1307                                        optFloat, 
     1308                                        "view_cells_visualization_clip_plane_pos", 
     1309                                        "0.35"); 
     1310         
     1311        RegisterOption("ViewCells.Visualization.exportGeometry", 
     1312                                        optBool, 
     1313                                        "view_cells_visualization_export_geometry", 
     1314                                        "false"); 
    13051315 
    13061316        RegisterOption("ViewCells.Visualization.exportRays", 
    1307                 optBool, 
    1308                 "-view_cells_delayed_construction", 
    1309                 "false"); 
    1310          
    1311  
    1312         RegisterOption("ViewCells.Visualization.exportGeometry", 
    1313                 optBool, 
    1314                 "-view_cells_visualization_export_geometry", 
    1315                 "false"); 
     1317                                        optBool, 
     1318                                        "view_cells_visualization_export_rays", 
     1319                                        "false"); 
    13161320 
    13171321        RegisterOption("ViewCells.pruneEmptyViewCells", 
    1318                 optBool, 
    1319                 "-view_cells_prune_empty_view_cells", 
    1320                 "false"); 
     1322                                        optBool, 
     1323                                        "view_cells_prune_empty_view_cells", 
     1324                                        "false"); 
    13211325 
    13221326        RegisterOption("ViewCells.processOnlyValidViewCells", 
    1323                 optBool, 
    1324                 "-view_cells_process_only_valid_view_cells", 
    1325                 "false"); 
     1327                                        optBool, 
     1328                                        "view_cells_process_only_valid_view_cells", 
     1329                                        "false"); 
    13261330 
    13271331         
    13281332        RegisterOption("ViewCells.PostProcess.maxCostRatio", 
    13291333                        optFloat, 
    1330                         "-view_cells_post_process_max_cost_ratio=", 
     1334                        "view_cells_post_process_max_cost_ratio=", 
    13311335                        "0.9"); 
    13321336         
    13331337        RegisterOption("ViewCells.PostProcess.renderCostWeight", 
    13341338                        optFloat, 
    1335                         "-view_cells_post_process_render_cost_weight", 
     1339                        "view_cells_post_process_render_cost_weight", 
    13361340                        "0.5"); 
    13371341         
    13381342        RegisterOption("ViewCells.PostProcess.avgCostMaxDeviation", 
    13391343                        optFloat, 
    1340                         "-vsp_bsp_avgcost_max_deviations", 
     1344                        "vsp_bsp_avgcost_max_deviations", 
    13411345                        "0.5"); 
    13421346 
    13431347        RegisterOption("ViewCells.PostProcess.maxMergesPerPass",  
    13441348                optInt,  
    1345                 "vsp_bsp_term_max_merges_per_pass=",  
     1349                "view_cells_post_process_max_merges_per_pass=",  
    13461350                "500"); 
    13471351 
    13481352        RegisterOption("ViewCells.PostProcess.minViewCells",  
    13491353                optInt,  
    1350                 "vsp_bsp_term_post_process_min_view_cells=",  
     1354                "view_cells_post_process_min_view_cells=",  
    13511355                "1000"); 
    13521356 
     
    18571861        RegisterOption("VspBspTree.useSplitCostQueue", 
    18581862                optBool, 
    1859                 "-vsp_bsp_use_split_cost_queue=", 
     1863                "vsp_bsp_use_split_cost_queue=", 
    18601864                "true"); 
    18611865 
     
    19701974        RegisterOption("VspBspTree.splitUseOnlyDrivingAxis",  
    19711975                                        optBool,  
    1972                                         "vsp_bsp_splitdriving=",  
     1976                                        "vsp_bsp_split_only_driving_axis=",  
    19731977                                        "false"); 
    19741978 
     
    20092013        RegisterOption("VspBspTree.useBreathFirstSplits", 
    20102014                optBool, 
    2011                 "-vsp_bsp_breath_first_splits=", 
     2015                "vsp_bsp_breath_first_splits=", 
    20122016                "false"); 
    20132017 
  • GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp

    r580 r667  
    297297  app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n"; 
    298298 
    299   app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz \n"; 
     299  app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz)\n"; 
    300300  for (int i=0; i<7; i++) 
    301301    app << splits[i] <<" "; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp

    r579 r667  
    196196  app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n"; 
    197197 
    198   app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz \n"; 
     198  app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz)\n"; 
    199199  for (int i=0; i<7; i++) 
    200200    app << splits[i] <<" "; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp

    r666 r667  
    403403        app << "#AXIS_ALIGNED_SPLITS (number of axis aligned splits)\n" << splits[0] + splits[1] + splits[2] << endl; 
    404404 
    405         app << "#N_SPLITS ( Number of splits in axes x y z\n"; 
     405        app << "#N_SPLITS ( Number of splits in axes x y z)\n"; 
    406406 
    407407        for (int i = 0; i < 3; ++ i) 
     
    915915 
    916916        mStat.Start(); 
    917         cout << "Contructing bsp tree ...\n"; 
     917        cout << "Constructing bsp tree ...\n"; 
    918918        long startTime = GetTime(); 
    919919        while (!tStack.empty())  
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r666 r667  
    1616#include "RssPreprocessor.h" 
    1717 
    18 #define SAMPLE_AFTER_SUBDIVISION 0 
     18#define SAMPLE_AFTER_SUBDIVISION 1 
    1919 
    2020 
     
    210210 
    211211        // rays can be passed or deleted 
    212         if (0) // remove!! 
    213212        disposeRays(initialSamples, outRays); 
    214213         
     
    216215        // -- stats after contruction 
    217216        ResetViewCells(); 
    218         Debug << "\nView cells after initial sampling: " << mCurrentViewCellsStats << endl; 
     217 
     218        Debug << "\nView cells after initial sampling:\n" << mCurrentViewCellsStats << endl; 
    219219 
    220220        if (0) // export initial view cells 
     
    247247                VssRayContainer constructionSamples; 
    248248 
    249                 const int samplingType = mSamplingType; 
    250 /*                      dirSamples ?  
     249                const int samplingType = 
     250                        dirSamples ?  
    251251                                                Preprocessor::DIRECTION_BASED_DISTRIBUTION : 
    252252                                                Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION; 
    253 */ 
     253 
    254254                if (0) 
    255255                        dirSamples = !dirSamples; // toggle sampling method 
     256 
    256257                numSamples += CastPassSamples(mSamplesPerPass,  
    257258                                                                          samplingType, 
     
    333334        } 
    334335         
    335         ViewCellContainer leaves; 
    336         mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves); 
    337         mViewCellsTree->ResetPvs(); 
    338         VssRayContainer dummyRays; 
    339         CastPassSamples(mInitialSamples, mSamplingType, dummyRays); 
    340          
    341         //ComputeSampleContributions(initialSamples, true, false); 
    342         ComputeSampleContributions(dummyRays, true, false); 
    343  
    344         ViewCellContainer::const_iterator it, it_end = leaves.end(); 
    345  
    346         for (it = leaves.begin(); it != it_end; ++ it) 
    347         { 
    348                 mViewCellsTree->PropagatePvs(*it); 
    349         } 
    350  
    351         mViewCellsTree->ExportStats("dummy.log"); 
     336        if (0) 
     337        { 
     338                ViewCellContainer leaves; 
     339                mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves); 
     340                mViewCellsTree->ResetPvs(); 
     341                VssRayContainer dummyRays; 
     342                CastPassSamples(mInitialSamples, mSamplingType, dummyRays); 
     343         
     344                //ComputeSampleContributions(initialSamples, true, false); 
     345                ComputeSampleContributions(dummyRays, true, false); 
     346 
     347                ViewCellContainer::const_iterator it, it_end = leaves.end(); 
     348 
     349                for (it = leaves.begin(); it != it_end; ++ it) 
     350                { 
     351                        mViewCellsTree->PropagatePvs(*it); 
     352                } 
     353 
     354                mViewCellsTree->ExportStats("dummy.log"); 
     355        } 
    352356 
    353357        return numSamples; 
     
    428432 
    429433                // output stats 
    430                 sprintf(s, "Stats-%09d-eval.log", castSamples); 
     434                sprintf(s, "-%09d-eval.log", castSamples); 
    431435                string fileName = string(statsPrefix) + string(s); 
    432436 
     
    899903{ 
    900904        int axis = 0; 
    901  
    902         const float factor = 0.65f; 
    903         Vector3 point = mViewSpaceBox.Min() +  mViewSpaceBox.Size() * factor; 
     905        float pos; 
     906 
     907        environment->GetFloatValue("ViewCells.Visualization.clipPlanePos", pos); 
     908 
     909        Vector3 point = mViewSpaceBox.Min() +  mViewSpaceBox.Size() * pos; 
    904910 
    905911        if (mUseClipPlaneForViz) 
     
    26632669 
    26642670        //TODO: remove 
    2665         if(0) 
    2666         mVspBspTree->Construct(constructionRays, &mViewSpaceBox); 
     2671        if (1) 
     2672                mVspBspTree->Construct(constructionRays, &mViewSpaceBox); 
    26672673        else 
    2668 mVspBspTree->Construct(rays, &mViewSpaceBox); 
     2674                mVspBspTree->Construct(rays, &mViewSpaceBox); 
     2675 
    26692676        // collapse invalid regions 
    26702677        cout << "collapsing invalid tree regions ... "; 
     
    27472754 
    27482755        //BspLeaf::NewMail(); 
    2749         if (0) // export merged view cells 
     2756        if (1) // export merged view cells 
    27502757        { 
    27512758                mColorCode = 0; 
     
    27782785        } 
    27792786 
    2780         if (0) // export merged view cells using pvs coding 
     2787        if (1) // export merged view cells using pvs coding 
    27812788        { 
    27822789                mColorCode = 1; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp

    r666 r667  
    152152        Debug << "use random axis: " << mUseRandomAxis << endl; 
    153153        Debug << "breath first splits: " << mBreathFirstSplits << endl; 
    154         Debug << "only driving axis: " << mOnlyDrivingAxis << endl; 
     154         
    155155        Debug << "octree: " << mSimulateOctree << endl; 
    156156 
     
    482482         
    483483        mBspStats.Start(); 
    484         cout << "Contructing vsp bsp tree ... \n"; 
     484        cout << "Constructing vsp bsp tree ... \n"; 
    485485 
    486486        long startTime = GetTime();      
     
    588588         
    589589        mBspStats.Start(); 
    590         cout << "Contructing vsp bsp tree ... \n"; 
     590        cout << "Constructing vsp bsp tree ... \n"; 
    591591 
    592592        long startTime = GetTime();      
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspKdTree.cpp

    r598 r667  
    495495        app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n"; 
    496496 
    497         app << "#N_SPLITS ( Number of splits in axes x y z\n"; 
     497        app << "#N_SPLITS ( Number of splits in axes x y z)\n"; 
    498498 
    499499        for (int i = 0; i < 3; ++ i) 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VssTree.cpp

    r551 r667  
    154154  app << "#N_LEAVES ( Number of leaves )\n" << Leaves() << "\n"; 
    155155 
    156   app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz \n"; 
     156  app << "#N_SPLITS ( Number of splits in axes x y z dx dy dz)\n"; 
    157157  for (int i=0; i<7; i++) 
    158158    app << splits[i] <<" "; 
  • GTP/trunk/Lib/Vis/shared/EvalStats/EvalStats.cpp

    r656 r667  
    1212using namespace std; 
    1313 
     14/** This is a small function which takes two log files and computes the 
     15        difference in percent of the weighted render cost. 
     16*/ 
    1417bool extractRenderCost(ifstream &file, vector<float> &renderCosts) 
    1518{ 
     
    4952        vector<float> renderCosts2; 
    5053         
     54        if (argc < 4) 
     55        { 
     56                cerr << "arguments missing" << endl; 
     57                exit(1); 
     58        } 
     59 
     60 
     61        // read two files and the output file 
     62 
     63        // read file 1 
    5164        ifstream file1(argv[1]); 
    52         ifstream file2(argv[2]); 
     65 
     66        // extract the render cost 
     67        cout << "extracting render cost of file " << argv[1] << endl; 
     68        cout.flush(); 
     69        extractRenderCost(file1, renderCosts1); 
     70 
     71        // read file 2 
     72    ifstream file2(argv[2]); 
     73        cout << "extracting render cost of file " << argv[2] << endl; 
     74        cout.flush(); 
     75        extractRenderCost(file2, renderCosts2); 
     76 
     77 
     78        cout << "writing output to file " << argv[3] << endl; 
    5379 
    5480        ofstream statsOut(argv[3]); 
    55  
    56         extractRenderCost(file1, renderCosts1); 
    57         extractRenderCost(file2, renderCosts2); 
    5881 
    5982        //statsOut << "rc1 size: " << (int)renderCosts1.size() << " " << (int)renderCosts2.size() << endl << endl; 
Note: See TracChangeset for help on using the changeset viewer.