Ignore:
Timestamp:
01/18/08 09:28:09 (16 years ago)
Author:
bittner
Message:

evaluation of pvs error still does not work

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
5 edited

Legend:

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

    r2562 r2613  
    9090        Environment::GetSingleton()->GetBoolValue("Preprocessor.detectEmptyViewSpace", 
    9191                                                      mDetectEmptyViewSpace); 
    92         mSnapErrorFrames = true; 
     92        mSnapErrorFrames = false; 
    9393        mSnapPrefix = "snap/"; 
    9494        mUseForcedColors = false; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp

    r2612 r2613  
    2525#endif 
    2626 
     27// if 1 = SAFE RENDERING OF PVS primitives without VBOs for Pvs error estimation 
     28#define EVAL_ERROR 0 
     29 
    2730namespace GtpVisibilityPreprocessor { 
    2831 
     
    97100        Environment::GetSingleton()->GetBoolValue("Preprocessor.detectEmptyViewSpace", 
    98101                                                      mDetectEmptyViewSpace); 
     102 
    99103        mSnapErrorFrames = true; 
    100104        mSnapPrefix = "snap/"; 
     
    135139{ 
    136140        Triangle3 *t = &(object->GetItem()); 
    137  
    138141        glBegin(GL_TRIANGLES); 
    139142        Vector3 normal = t->GetNormal(); 
     
    786789        if (node->IsLeaf())  
    787790        { 
    788 #if 1 
     791#if !EVAL_ERROR 
    789792                RenderKdLeaf(static_cast<KdLeaf *>(node)); 
    790793#else 
     
    14641467          int pvsSize; 
    14651468 
    1466           cerr<<"GPE"<<endl; 
    1467  
    14681469          float error = GetPixelError(pvsSize); 
    1469           cerr<<"GPEd"<<endl; 
    14701470 
    14711471          mPvsErrorBuffer[i].mError = error; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp

    r2612 r2613  
    102102{ 
    103103 
     104  MakeCurrent(); 
     105 
    104106  float pErrorPixels = -1.0f; 
    105107 
     
    113115                return 0.0f; 
    114116 
    115  
    116117        ObjectPvs pvs; 
    117  
     118         
    118119        if (1)  
    119120                pvs = viewcell->GetPvs(); 
     
    121122                mViewCellsManager->ApplyFilter2(viewcell, false, 1.0f, pvs); 
    122123 
     124        mUseForcedColors = true; 
     125 
    123126        SetupCamera(); 
    124127        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); 
    125128        glColorMask(GL_FALSE, GL_TRUE, GL_FALSE, GL_FALSE); 
     129        glColor3f(0,1,0); 
    126130 
    127131 
     
    133137 
    134138        pvsSize = pvs.GetSize(); 
     139        cout<<pvsSize<<endl; 
    135140 
    136141        Intersectable::NewMail(); 
     
    140145          } 
    141146 
    142  
    143147        //glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE); 
    144148        glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 
    145149        glEnable(GL_STENCIL_TEST);  
    146  
    147         mUseFalseColors = true; 
    148  
     150        glColor3f(1,0,0); 
     151 
     152         
    149153        OcclusionQuery *query = mOcclusionQueries[0]; 
    150          
     154 
     155        //      SetupCamera(); 
     156 
     157        Intersectable::NewMail(); 
     158 
    151159        query->BeginQuery(); 
    152160 
    153         SetupCamera(); 
    154  
    155161        RenderScene(); 
    156  
     162         
    157163        query->EndQuery(); 
    158164        glDisable(GL_STENCIL_TEST);  
     
    166172 
    167173        pixelCount = query->GetQueryResult(); 
    168  
     174        //      cout<<"pc="<<pixelCount<<endl; 
     175         
    169176        pErrorPixels = ((float)pixelCount)/(GetWidth()*GetHeight()); 
    170177 
    171178 
    172         if (mSnapErrorFrames && pErrorPixels >= 0.01f) { 
     179        if (mSnapErrorFrames && (0 && pErrorPixels >= 0.01f)) { 
    173180          glReadBuffer(GL_BACK); 
     181          //glReadBuffer(GL_FRONT); 
    174182           
    175183          char filename[256]; 
     
    180188           
    181189          im.save(qstr, "PNG"); 
    182           if (1) { //0 && mFrame == 1543) { 
     190          if (0) { //0 && mFrame == 1543) { 
    183191                int x,y; 
    184192                int lastIndex = -1; 
     
    196204          } 
    197205           
    198            
    199206          mUseFalseColors = false; 
    200207          glPushAttrib(GL_CURRENT_BIT); 
    201208          glColor3f(0,1,0); 
    202209          glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 
    203           SetupCamera(); 
    204210          glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    205211           
     
    207213          Intersectable::NewMail(); 
    208214           
     215           
    209216          ObjectPvsIterator it = pvs.GetIterator(); 
    210217          for (; it.HasMoreEntries(); )  
     
    212219                  RenderIntersectable(it.Next()); 
    213220                } 
     221 
     222          mUseForcedColors = false; 
    214223           
    215224          im = toImage(); 
     
    222231         
    223232        glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 
    224          
     233 
     234        DoneCurrent(); 
     235 
    225236        return pErrorPixels; 
    226237} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SG08/run_test_pixel

    r2612 r2613  
    44#COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 
    55#COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=500000 -samples_per_evaluation=10000000 -total_samples=500000000 -preprocessor_pvs_rendererror_samples=10000 -preprocessor_evaluatePixelError+" 
    6 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -samples_per_evaluation=500000 -total_samples=500000000 -preprocessor_pvs_rendererror_samples=10000 -preprocessor_evaluatePixelError+ -preprocessor_detect_empty_viewspace+" 
     6COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -samples_per_evaluation=10000000 -total_samples=500000000 -preprocessor_pvs_rendererror_samples=10000 -preprocessor_evaluatePixelError+ -preprocessor_detect_empty_viewspace+ -kd_pvs_area=1e-4" 
    77 
    88#SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d" 
     
    4343$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
    4444-rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 
    45 -view_cells_use_kd_pvs+ -af_use_kd_pvs- \ 
     45-view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 
    4646-preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4l.xml \ 
    4747-preprocessor_stats=$PREFIX-i-mixed-b1-n4l.log \ 
  • GTP/trunk/Lib/Vis/Preprocessing/src/default.env

    r2611 r2613  
    176176                maxCostRatio 0.98 
    177177                ct_div_ci 0.5 
    178                 maxNodes 50000 
     178                maxNodes 200000 
    179179#500000  
    180180        } 
     
    196196        } 
    197197 
    198 #       splitMethod spatialMedian 
    199         splitMethod SAH 
     198        splitMethod spatialMedian 
     199#       splitMethod SAH 
    200200        splitBorder 0.01 
    201201} 
Note: See TracChangeset for help on using the changeset viewer.