Changeset 2574 for GTP/trunk/Lib/Vis


Ignore:
Timestamp:
01/03/08 15:13:40 (17 years ago)
Author:
bittner
Message:

minor updates of mutation

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

Legend:

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

    r2066 r2574  
    6767 
    6868  int lastEvaluation = 0; 
    69   int totalVssRays = 0; 
     69  //  int totalVssRays = 0; 
    7070  mPass = 0; 
    7171   
     
    8686         
    8787        mMixtureDistribution->GenerateSamples(mSamplesPerPass, rays); 
    88          
     88 
     89        cerr<<"Casting rays..."<<endl; 
     90        //      bool doubleRays = true; 
    8991        bool doubleRays = true; 
    9092        CastRays(rays, vssRays, doubleRays, pruneInvalidRays); 
    91         totalVssRays += (int)vssRays.size(); 
     93        mTotalRaysCast += (int)vssRays.size(); 
     94        cerr<<"Done..."<<endl; 
    9295 
     96        cerr<<"Computing ray contributions..."<<endl; 
    9397        mMixtureDistribution->ComputeContributions(vssRays); 
     98        cerr<<"Done..."<<endl; 
    9499 
    95100 
     
    114119          Debug<<"done."<<endl<<flush; 
    115120        } 
    116  
    117  
     121         
    118122        mMixtureDistribution->UpdateDistributions(vssRays); 
    119123         
     
    125129                "#Time\n" << time <<endl<< 
    126130                "#TotalSamples\n" <<i<<endl<< 
    127                 "#RssSamples\n" <<totalVssRays<<endl; 
     131                "#RssSamples\n" <<mTotalRaysCast<<endl; 
    128132 
    129133          float last = 0.0f; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/IntelRayCaster.cpp

    r2572 r2574  
    1515FILE *fileOut = 0; 
    1616bool saveRays = true; 
     17  const int saveRaysStart = 3000000; 
    1718int cntSavedRaysFLUSH = 0; 
    1819unsigned long int cntSavedRays = 0; 
    19 const intSavedLIMIT = 1024; 
     20const int intSavedLIMIT = 1024; 
    2021void 
    2122InitSaving() 
     
    125126  } 
    126127 
    127   if (saveRays) {     
     128  if (saveRays && preprocessor->mTotalRaysCast > saveRaysStart) {     
    128129    if (castDoubleRay) 
    129130        { 
     
    257258#endif 
    258259 
    259   if (saveRays) { 
     260  if (saveRays && preprocessor->mTotalRaysCast > saveRaysStart) { 
    260261    if (castDoubleRay) 
    261262      fprintf(fileOut, "G\n"); 
     
    305306 
    306307 
    307     if (saveRays) { 
     308    if (saveRays && preprocessor->mTotalRaysCast > saveRaysStart) { 
    308309      if (castDoubleRay)      
    309310        fprintf(fileOut, "%d %4.7f %4.7f %4.7f %4.7f %4.7f %4.7f %d %4.7f %d %4.7f\n", 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Makefile

    r2521 r2574  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (2.00a) (Qt 4.1.2) on: út 3. VII 21:32:32 2007 
     3# Generated by qmake (2.00a) (Qt 4.1.2) on: so 22. XII 21:22:31 2007 
    44# Project:  preprocessor.pro 
    55# Template: app 
     
    6363        $(MAKE) -f $(MAKEFILE).Debug uninstall 
    6464 
    65 Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc.net\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 
     65Makefile: preprocessor.pro  C:/Qt/4.1.2/mkspecs/win32-msvc2005\qmake.conf C:/Qt/4.1.2/mkspecs/qconfig.pri \ 
    6666                C:\Qt\4.1.2\mkspecs\features\qt_config.prf \ 
    6767                C:\Qt\4.1.2\mkspecs\features\exclusive_builds.prf \ 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.cpp

    r2353 r2574  
    447447 
    448448#else 
    449 cerr << "warning: reverse mutation not supported!" << endl; 
     449  cerr << "warning: reverse mutation not supported!" << endl; 
    450450#endif 
    451451   
     
    633633        mRays[index].mMutations++; 
    634634        mRays[index].mUnsuccessfulMutations++; 
    635  
     635         
    636636        return true; 
    637637  } 
    638    
     638 
    639639  return GenerateMutation(index, sray); 
    640640} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r2572 r2574  
    5454mThread(NULL), 
    5555mGlobalLinesRenderer(NULL), 
    56 mUseHwGlobalLines(false) 
     56mUseHwGlobalLines(false), 
     57mTotalRaysCast(0) 
    5758{ 
    5859        Environment::GetSingleton()->GetBoolValue("Preprocessor.useGlRenderer", mUseGlRenderer); 
     
    12321233#endif 
    12331234        } 
    1234  
     1235        cerr<<"Deternmining PVS objects"<<endl; 
    12351236        DeterminePvsObjects(vssRays); 
    12361237} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h

    r2342 r2574  
    261261        int mSamplesPerPass; 
    262262        int mSamplesPerEvaluation; 
     263   
     264  int mTotalRaysCast; 
    263265 
    264266        RayCaster *mRayCaster; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r2571 r2574  
    575575                                                                         const float filterSize, 
    576576                                                                         ObjectPvs &pvs, 
    577                                                                          vector<AxisAlignedBox3> *filteredBoxes = NULL); 
     577                                                                         vector<AxisAlignedBox3> *filteredBoxes = NULL, 
     578                                                                         const bool onlyNewObjects = false); 
    578579 
    579580        void ApplySpatialFilter(KdTree *kdTree, 
  • GTP/trunk/Lib/Vis/Preprocessing/src/default.env

    r2060 r2574  
    106106#       distributions rss+spatial+object_direction 
    107107#       distributions rss+object_direction+spatial+object+direction 
    108         distributions mutation+spatial+object_direction 
     108        distributions mutation+spatial+object_direction+filter_based 
    109109#       distributions rss+object_direction 
    110110#       distributions object_direction 
     
    182182#       splitMethod SAH 
    183183        splitBorder 0.01 
     184        pvsArea 1e-3 
    184185} 
    185186 
  • GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro

    r2148 r2574  
    116116RenderTexture.cpp Mutation.cpp Timer/RDTSCTimer.cpp \ 
    117117Timer/BenchTimer.cpp Timer/merror.cpp \ 
    118 Intersectable.cpp TraversalTree.cpp ObjectPvs.cpp ObjectsParser.cpp 
     118Intersectable.cpp TraversalTree.cpp ObjectPvs.cpp ObjectsParser.cpp \ 
     119FilterBasedDistribution.cpp DifferenceSampling.cpp 
    119120 
    120121 
  • GTP/trunk/Lib/Vis/Preprocessing/src/run_test2

    r2515 r2574  
    33 
    44#COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 
    5 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=5000000 -samples_per_pass=1000000 -total_samples=100000000" 
     5COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_evaluation=5000000 -samples_per_pass=500000 -total_samples=6000000" 
    66 
    77 
     
    2929#VIEWCELLS=../data/test1/test-viewcells.xml 
    3030 
     31SCENE=../data/Arena/arena-high-lods.obj 
     32VIEWCELLS=../data/Arena/viewcells-5000.xml.gz 
    3133 
    32 SCENE=../data/vienna/vienna_cropped.obj 
    33 VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz 
    34 #VIEWCELLS=../data/vienna/vienna-seq-viewcells-20000.xml.gz 
     34 
     35#SCENE=../data/vienna/vienna_cropped.obj 
     36#VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz 
     37#VIEWCELLS=../data/vienna/vienna-sequential-30000-single-viewcell.xml 
    3538 
    3639 
     
    4548 
    4649$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
    47 -rss_distributions=mutation+object_direction+spatial \ 
    48 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 
     50-rss_distributions=direction+spatial+mutation \ 
     51-view_cells_use_kd_pvs+ -af_use_kd_pvs+ -view_cells_filter_width=1.0 \ 
    4952-preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \ 
    5053-preprocessor_stats=$PREFIX-i-mixed-b1-n4a.log \ 
    5154-preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4a.hlog 
    5255 
     56#-rss_distributions=mutation+object_direction+spatial \ 
Note: See TracChangeset for help on using the changeset viewer.