Changeset 2022


Ignore:
Timestamp:
01/23/07 01:55:10 (17 years ago)
Author:
bittner
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Makefile

    r2021 r2022  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (2.00a) (Qt 4.1.2) on: út 23. I 00:22:45 2007 
     3# Generated by qmake (2.00a) (Qt 4.1.2) on: út 23. I 01:10:24 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

    r2021 r2022  
    2020#define USE_SILHOUETTE_MUTATIONS 0 
    2121 
    22 #define USE_SIL_TERMINATION_MUTATION 1 
    23 #define MUTATE_ORIGIN 0 
     22#define SIL_TERMINATION_MUTATION_PROB 0.9f 
    2423 
    2524#define EVALUATE_MUTATION_STATS 1 
     
    3130// use avg ray contribution as importance 
    3231// if 0 the importance is evaluated from the succ of mutations 
    33 #define USE_AVG_CONTRIBUTION 1 
     32#define USE_AVG_CONTRIBUTION 0 
    3433 
    3534MutationBasedDistribution::RayEntry & 
     
    461460                                                                                                                                const Vector3 &U, 
    462461                                                                                                                                const Vector3 &V, 
    463                                                                                                                                 const Vector2 vr2, 
    464462                                                                                                                                const float radius 
    465463                                                                                                                                ) 
     
    646644  VssRay *ray = mRays[index].mRay; 
    647645 
    648   mRays[index].mHalton.GetNext(4, rr); 
    649646  //  rr[0] = RandomValue(0.0f,0.99999f); 
    650647  //  rr[1] = RandomValue(0.0f,0.99999f); 
     
    655652  Vector3 d = ray->GetDir(); 
    656653   
    657   float objectRadius = 0.5f*Magnitude(box.Diagonal()); 
     654  float objectRadius = box.Radius(); 
    658655  //  cout<<objectRadius<<endl; 
    659656  if (objectRadius < Limits::Small) 
     
    671668  // optimal for Vienna 0.5f 
    672669   
    673   float radiusExtension = 0.1f; 
     670  float radiusExtension = 0.5f; 
    674671  //  + mRays[index].mMutations/50.0f; 
    675672   
     
    679676  //  mutationRadius = 0.22f; 
    680677 
    681 #if MUTATE_ORIGIN 
    682   origin += ComputeOriginMutation(*ray, U, V, 
    683                                                                   Vector2(rr[0], rr[1]), 
    684                                                                   mutationRadius); 
    685 #endif 
    686    
    687 #if USE_SIL_TERMINATION_MUTATION 
    688   termination += ComputeSilhouetteTerminationMutation(*ray, 
    689                                                                                                           origin, 
    690                                                                                                           box, 
    691                                                                                                           U, V, 
    692                                                                                                           Vector2(rr[2], rr[3]), 
    693                                                                                                           2.0f*objectRadius); 
    694 #else 
    695   termination += ComputeTerminationMutation(*ray, U, V, 
    696                                                                                         Vector2(rr[2], rr[3]), 
    697                                                                                         mutationRadius); 
    698 #endif 
     678  // use probabilitistic approach to decide for the type of mutation 
     679  float a = RandomValue(0.0f,1.0f); 
     680 
     681  if (a < SIL_TERMINATION_MUTATION_PROB) { 
     682        termination += ComputeSilhouetteTerminationMutation(*ray, 
     683                                                                                                                origin, 
     684                                                                                                                box, 
     685                                                                                                                U, V, 
     686                                                                                                                2.0f*objectRadius); 
     687  } else { 
     688        mRays[index].mHalton.GetNext(4, rr); 
     689        // fuzzy random mutation 
     690        origin += ComputeOriginMutation(*ray, U, V, 
     691                                                                        Vector2(rr[0], rr[1]), 
     692                                                                        mutationRadius); 
     693         
     694        termination += ComputeTerminationMutation(*ray, U, V, 
     695                                                                                          Vector2(rr[2], rr[3]), 
     696                                                                                          mutationRadius); 
     697  } 
     698 
    699699  Vector3 direction = termination - origin; 
    700700   
  • GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.h

    r2011 r2022  
    110110                                                                           const Vector3 &U, 
    111111                                                                           const Vector3 &V, 
    112                                                                            const Vector2 vr2, 
    113112                                                                           const float radius 
    114113                                                                           ); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp

    r1966 r2022  
    138138          //      } 
    139139 
    140           rssSamples+=vssRays.size(); 
     140          rssSamples += vssRays.size(); 
    141141          for (int j=0; j < vssRays.size(); j++) 
    142142                if (vssRays[j]->mFlags & VssRay::Valid) { 
    143                   Intersectable *obj = mViewCellsManager->GetIntersectable(*(vssRays[j]), 
    144                                                                                                                                    true); 
     143                  Intersectable *obj = vssRays[j]->mTerminationObject; 
     144                   
    145145                  if (obj) { 
    146146                        // if ray not outside of view space 
  • GTP/trunk/Lib/Vis/Preprocessing/src/run_test2

    r2021 r2022  
    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_pass=1000000" 
     5COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -total_samples=1000000000" 
    66 
    77#SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d" 
     
    3737 
    3838 
     39$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
     40-rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 
     41-view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 
     42-preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4k.xml \ 
     43-preprocessor_stats=$PREFIX-i-mixed-b1-n4k.log \ 
     44-preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4k.hlog 
    3945 
    40 # $COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
    41 # -preprocessor_visibility_file=$PREFIX-r-reference.xml \ 
    42 # -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \ 
    43 # -preprocessor_histogram_file=$PREFIX-r-reference.hlog 
     46$COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
     47-preprocessor_visibility_file=$PREFIX-r-reference.xml \ 
     48-view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \ 
     49-preprocessor_histogram_file=$PREFIX-r-reference.hlog 
    4450 
    45 # $COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
    46 #  -rss_distributions=direction -view_cells_filter_max_size=1 \ 
    47 #  -preprocessor_visibility_file=$PREFIX-r-reference-global.xml \ 
    48 #  -preprocessor_stats=$PREFIX-r-reference-global.log \ 
    49 #  -preprocessor_histogram_file=$PREFIX-r-reference-global.hlog 
     51$COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
     52 -rss_distributions=direction -view_cells_filter_max_size=1 \ 
     53 -preprocessor_visibility_file=$PREFIX-r-reference-global.xml \ 
     54 -preprocessor_stats=$PREFIX-r-reference-global.log \ 
     55 -preprocessor_histogram_file=$PREFIX-r-reference-global.hlog 
     56 
     57 
     58$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
     59-rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 
     60-view_cells_use_kd_pvs- -af_use_kd_pvs+ \ 
     61-preprocessor_visibility_file=$PREFIX-i-mixed-bvh-n4k.xml \ 
     62-preprocessor_stats=$PREFIX-i-mixed-bvh-n4k.log \ 
     63-preprocessor_histogram_file=$PREFIX-i-mixed-bvh-n4k.hlog 
     64 
     65$COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
     66-view_cells_use_kd_pvs- -af_use_kd_pvs+ \ 
     67-preprocessor_visibility_file=$PREFIX-r-bvh-reference.xml \ 
     68-view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-bvh-reference.log \ 
     69-preprocessor_histogram_file=$PREFIX-r-bvh-reference.hlog 
     70 
     71$COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
     72-view_cells_use_kd_pvs- -af_use_kd_pvs+ \ 
     73 -rss_distributions=direction -view_cells_filter_max_size=1 \ 
     74 -preprocessor_visibility_file=$PREFIX-r-bvh-reference-global.xml \ 
     75 -preprocessor_stats=$PREFIX-r-bvh-reference-global.log \ 
     76 -preprocessor_histogram_file=$PREFIX-r-bvh-reference-global.hlog 
    5077 
    5178# $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
     
    5683#  -preprocessor_histogram_file=$PREFIX-i-mixed-bvh-n4i.hlog 
    5784 
    58 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
    59 -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 
    60 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 
    61 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4j.xml \ 
    62 -preprocessor_stats=$PREFIX-i-mixed-b1-n4j.log \ 
    63 -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4j.hlog 
    6485 
    6586 
  • GTP/trunk/Lib/Vis/Preprocessing/src/run_test_powerplant

    r2020 r2022  
    22 
    33#COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 
    4 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -preprocessor_detect_empty_viewspace+" 
     4COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -preprocessor_detect_empty_viewspace-" 
    55 
    66 
     
    1414$COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 
    1515 -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 
    16  -view_cells_use_kd_pvs- -af_use_kd_pvs- \ 
     16 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 
    1717 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \ 
    1818 -preprocessor_stats=$PREFIX-i-mixed-b1-n4a.log \ 
Note: See TracChangeset for help on using the changeset viewer.