Changeset 677


Ignore:
Timestamp:
03/06/06 22:22:38 (18 years ago)
Author:
bittner
Message:

changes for visualization of distant view space sampling

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

Legend:

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

    r589 r677  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (2.00a) (Qt 4.1.0) on: so 4. II 09:57:31 2006 
     3# Generated by qmake (2.00a) (Qt 4.1.0) on: út 14. II 10:13:02 2006 
    44# Project:  preprocessor.pro 
    55# Template: app 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h

    r610 r677  
    108108  bool RemoveSample(T sample, const float pdf); 
    109109 
     110  /** Compute continuous PVS difference */ 
     111  void ComputeContinuousPvsDifference(const Pvs<T> &pvs, 
     112                                                                          float &pvsReduction, 
     113                                                                          float &pvsEnlargement); 
     114   
     115 
     116                                           
     117                                           
    110118  /// Map of PVS entries 
    111119  std::map<T, PvsData<T>, LtSample<T> > mEntries; 
    112120}; 
    113121 
     122 
     123 
     124/** Compute continuous PVS difference */ 
     125template <typename T> 
     126void 
     127Pvs<T>::ComputeContinuousPvsDifference(const Pvs<T> &pvs, 
     128                                                                           float &pvsReduction, 
     129                                                                           float &pvsEnlargement) 
     130{ 
     131   
     132 
     133} 
    114134 
    115135template <typename T> 
  • GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.cpp

    r608 r677  
    472472  // if not already loaded, construct view cells from file 
    473473  if (!mLoadViewCells) {         
    474          
     474 
     475        if (0)  
    475476          mViewCellsManager->SetViewSpaceBox(mKdTree->GetBox()); 
     477        else { 
     478          AxisAlignedBox3 box = mKdTree->GetBox(); 
     479          float s = box.Size(0); 
     480          box.Scale(0.1f); 
     481          box.SetMin(0, box.Min(0) + s); 
     482          box.SetMax(0, box.Max(0) + s); 
     483          mViewCellsManager->SetViewSpaceBox(box); 
     484        } 
    476485 
    477486          // construct view cells using it's own set of samples 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r676 r677  
    3333struct BspRay; 
    3434 
     35 
     36/** Probably Visible Set */ 
     37class PrVs { 
     38  /// viewcells 
     39  ViewCellContainer mVviewCells; 
     40  /// aggregatred pvs 
     41  ObjectPvs mPvs; 
     42 
     43  // input parameter is the render budget for the PrVS 
     44  float mRenderBudget; 
     45 
     46  /// some characteristic values could be here 
     47   
     48}; 
     49 
    3550/** 
    3651        Manages different higher order operations on the view cells. 
     
    203218        virtual void GetPvsStatistics(PvsStatistics &stat); 
    204219 
    205         /** Get a viewcell containing the specified point */ 
     220  virtual void GetPrVS(const Vector3 &viewPoint, 
     221                                           PrVs &prvs 
     222                                           ) {} 
     223   
     224  /** Get a viewcell containing the specified point */ 
    206225        virtual ViewCell *GetViewCell(const Vector3 &point) const = 0; 
    207226   
  • GTP/trunk/Lib/Vis/Preprocessing/src/VssPreprocessor.cpp

    r675 r677  
    565565                // HACK: enlarge in y directon 
    566566                mViewSpaceBox = new AxisAlignedBox3(mKdTree->GetBox()); 
     567 
     568                if (0) { 
    567569                //Vector3 pmin = mViewSpaceBox->Min(); 
    568570                Vector3 size = mViewSpaceBox->Size(); 
     
    571573 
    572574                mViewSpaceBox->Enlarge(enlarge); 
     575                } else { 
     576                  // $$ JB temporary 
     577                  AxisAlignedBox3 box = *mViewSpaceBox; 
     578                  float s = box.Size(0); 
     579                  box.Scale(0.8f); 
     580                  box.SetMax(0, box.Max(0) + s*0.8f); 
     581                  box.SetMin(0, box.Min(0) + s*0.8f); 
     582                  *mViewSpaceBox = box; 
     583                } 
     584                 
    573585          } 
    574  
    575586          //Debug << "view space box: " << *mViewSpaceBox << endl; 
    576587  } 
     
    695706 
    696707   
    697   //int numExportRays = 5000; 
    698   int numExportRays = 0; 
     708  int numExportRays = 2000; 
     709  //int numExportRays = 0; 
    699710 
    700711  if (numExportRays) { 
  • GTP/trunk/Lib/Vis/Preprocessing/src/default.env

    r608 r677  
    2323        useGlRenderer true 
    2424#       type sampling 
    25 #       type vss 
    26         type rss 
     25        type vss 
     26#       type rss 
    2727        detectEmptyViewSpace true 
    2828        pvsRenderErrorSamples 10000 
     
    3939        loadInitialSamples  false 
    4040        storeInitialSamples false 
     41        useViewSpaceBox true 
     42        enlargeViewSpace true 
    4143} 
    4244 
     
    7274 
    7375RssPreprocessor { 
    74         samplesPerPass 500 
    75         initialSamples 100 
     76        samplesPerPass 100000 
     77        initialSamples 100000 
    7678        vssSamples 100 
    7779        vssSamplesPerPass 100 
     
    169171        # samples used for view cell construction 
    170172        Construction { 
    171                 samples 600000 
     173                samples 100000 
    172174                samplesPerPass 200000 
    173175        } 
    174176 
    175177        #number of active view cells 
    176         active 10000 
     178        active 1024 
    177179        maxStaticMemory 40 
    178180 
    179         exportToFile false 
     181        exportToFile true 
    180182        loadFromFile false 
    181183 
    182184        #type kdTree 
    183185        #type vspKdTree 
    184         #type bspTree 
    185         type vspBspTree 
    186          
     186        type bspTree 
     187        #type vspBspTree 
    187188        #type sceneDependent 
    188189         
    189190        height 5.0 
    190         maxViewCells 100000 
     191        maxViewCells 3000 
    191192 
    192193        #percentage of total visible objects where pvs is considered invalid 
     
    195196        pruneEmptyViewCells false 
    196197        processOnlyValidViewCells false 
    197          
     198 
     199        #stats viewCellStats.log 
     200 
     201        samplingType directional 
     202        #samplingType box 
     203 
    198204        PostProcess { 
    199205                # how much samples are used for post processing 
    200                 samples 300000 
     206                samples 100000 
    201207                renderCostWeight 1.0 
    202208                maxCostRatio 0.1 
    203209                minViewCells 1 
    204                 avgCostMaxDeviation 0.8 
    205                 maxMergesPerPass 500  
     210                avgCostMaxDeviation 0.01 
     211                maxMergesPerPass 5000 
    206212                useRaysForMerge false 
    207213                refine false 
    208214                compress false 
    209                 merge true 
     215                merge false 
    210216        } 
    211217 
     
    217223                #colorCode MergedTreeDiff 
    218224                colorCode Random 
    219                 exportRays true 
    220                 exportGeometry true 
     225                exportRays false 
     226                exportGeometry false 
    221227                exportMergedViewCells false 
    222                 useCuttingPlane false 
    223                 cuttingPlaneAxis 1 
    224         } 
    225          
     228                useClipPlane true 
     229                clipPlaneAxis 1 
     230        } 
     231 
     232        showVisualization false  
     233        evaluateViewCells false 
     234         
     235        Evaluation { 
     236                samplesPerPass 80000 
     237                samples 1000000 
     238                statsPrefix ../scripts/viewCells 
     239        } 
     240 
    226241#       filename ../data/atlanta/atlanta_viewcells_large.x3d 
    227242#       filename ../data/vienna/viewcells-25-sel.x3d 
     
    229244#       filename ../data/vienna/viewcells-large-sel.x3d 
    230245#       filename ../scripts/viewcells_vienna.xml 
    231         filename ../scripts/viewcells_atlanta.xml 
     246#       filename ../scripts/viewcells_atlanta.xml 
     247        filename ../scripts/viewcells_soda5.xml 
    232248} 
    233249 
     
    241257 
    242258 
    243  
    244259VspKdTree { 
    245260        epsilon         1e-6 
    246261 
    247262        Construction { 
    248                 samples 300000 
     263                samples 500000 
    249264        } 
    250265         
    251266        Termination { 
    252267                maxDepth                40 
    253                 minPvs                  50 
    254                 minRays                 300 
     268                minPvs                  0 
     269                minRays                 1 
    255270                minSize                 0.001 
    256                 maxCostRatio            0.9 
     271                maxCostRatio            5.9 
     272                maxViewCells            169 
    257273                missTolerance           4 
    258                 maxRayContribution      0.5 
     274                maxRayContribution      2.5 
    259275        } 
    260276         
    261277        maxTotalMemory  100 
    262         maxStaticMemory 50 
     278        maxStaticMemory 40 
    263279 
    264280        splitType       regular 
     
    270286        PostProcess { 
    271287                maxCostRatio 0.005 
    272                 minViewCells 200 
    273                 maxPvsSize   50000 
     288                minViewCells 10000 
     289                maxPvsSize   5000 
    274290        } 
    275291         
     
    278294        } 
    279295} 
    280  
    281  
    282296 
    283297VspBspTree { 
    284298        Construction { 
    285                 samples 1000000 
    286                 epsilon 0.005 
     299                samples 800000 
     300                epsilon 0.0005 
    287301                randomize false 
    288302                renderCostWeight 1.0 
     
    296310        # pvs                  = 1024 
    297311         
    298         splitPlaneStrategy 1024 
     312        splitPlaneStrategy 1026 
    299313         
    300314        # maximal candidates for split planes 
    301         maxPolyCandidates 0 
    302  
    303          
     315        maxPolyCandidates 150 
     316 
     317        usePolygonSplitIfAvailable false 
     318 
    304319        # maximal tested rays for split cost heuristics 
    305320        maxTests 10000 
     
    307322        maxTotalMemory  50 
    308323        maxStaticMemory 50 
    309          
     324 
     325        subdivisionStats ../subdivisionStats.log 
     326 
    310327        # factors for evaluating split plane costs 
    311328        Factor { 
     
    317334        Termination { 
    318335                # parameters used for autopartition 
    319                 minRays                 -150 
     336                minRays                 -15 
    320337                minPolygons             -1 
    321                 maxDepth                30 
    322                 minPvs                  -10 
    323                 #minProbability         0.0001 
    324                 minProbability          -1 
    325 #               maxRayContribution      0.3 
    326                 maxRayContribution      2.3 
    327 #               maxCostRatio            0.9 
    328                 maxCostRatio            3.9 
    329                 missTolerance           3 
    330  
    331                  
    332                 maxViewCells            50000 
    333                  
     338                maxDepth                25 
     339                minPvs                  -15 
     340                minProbability          0.00000001 
     341                maxRayContribution      1.8 
     342                maxCostRatio            1.8 
     343                missTolerance           6 
     344                globalCostMissTolerance 4 
     345                minGlobalCostRatio      0.0000001 
     346#               minGlobalCostRatio      0.0001 
     347                maxViewCells            20000 
     348         
     349 
    334350                # used for pvs criterium 
    335351                ct_div_ci 0.0 
    336352                 
    337353                AxisAligned { 
    338                         minRays                 1 
     354                        minRays                 50000 
    339355                        maxRayContribution      9.9 
    340356                } 
    341357        } 
    342358         
    343         splitUseOnlyDrivingAxis true 
    344          
     359        useSplitCostQueue true 
     360        useCostHeuristics true 
     361 
     362        splitUseOnlyDrivingAxis false 
     363        simulateOctree false 
     364        useRandomAxis false 
     365        usePolygonSplitIfAvailable false 
     366        useBreathFirstSplits false 
     367 
    345368        Visualization { 
    346369                # x3d visualization of the split planes 
    347                 exportSplits true 
    348         } 
    349 } 
     370                exportSplits false 
     371        } 
     372} 
     373 
     374BspTree { 
     375        Construction { 
     376                samples 300000 
     377                epsilon 0.005 
     378        } 
     379 
     380 
     381        # random polygon       = 1 
     382        # axis aligned         = 2 
     383        # least splits         = 4 
     384        # balanced polygons    = 8 
     385        # balanced view cells  = 16 
     386        # largest polygon area = 32 
     387        # vertical axis        = 64 
     388        # blocked rays         = 128 
     389        # least ray splits     = 256 
     390        # balanced rays        = 512 
     391        # pvs                  = 1024 
     392 
     393        # least splits + balanced polygons 
     394        #splitPlaneStrategy 12 
     395         
     396        #axis aligned + vertical axis 
     397        #splitPlaneStrategy 66 
     398         
     399        # axis aligned + balanced view cells 
     400        # splitPlaneStrategy 18 
     401         
     402        # largest polygon area 
     403        #splitPlaneStrategy 32 
     404         
     405        # axus aligned + balanced polygons 
     406        #splitPlaneStrategy 72 
     407         
     408        # axis aligned + blocked rays 
     409        #splitPlaneStrategy 130 
     410         
     411        #splitPlaneStrategy 384 
     412        #splitPlaneStrategy 130 
     413         
     414        splitPlaneStrategy 32 
     415         
     416        maxPolyCandidates 100 
     417        maxRayCandidates 0 
     418         
     419        maxTests 10000 
     420         
     421        subdivisionStats ../subDivisionStats.log 
     422 
     423        # factors for evaluating split plane costs 
     424        Factor { 
     425                verticalSplits 1.0 
     426                largestPolyArea 1.0 
     427                blockedRays 1.0 
     428                leastRaySplits 1.0 
     429                balancedRays 1.0 
     430                pvs 1.0 
     431                leastSplits 1.0 
     432                balancedPolys 1.0 
     433                balancedViewCells 1.0 
     434        } 
     435         
     436        Termination { 
     437                # parameters used for autopartition 
     438                minRays -1 
     439                minPolygons 0 
     440                maxDepth 30 
     441                minPvs -1 
     442                minProbability 0.00001 
     443                maxRayContribution 9999 
     444                maxViewCells 20000 
     445 
     446                # used for pvs criterium 
     447                ct_div_ci 0.0 
     448         
     449                maxCostRatio 0.9 
     450                 
     451                # axis aligned splits 
     452                AxisAligned { 
     453                        minPolys 5000 
     454                        minRays 500 
     455                        minObjects 10 
     456                        ct_div_ci 0.5 
     457                } 
     458        } 
     459         
     460        AxisAligned { 
     461                splitBorder 0.01 
     462        } 
     463         
     464         
     465        Visualization { 
     466                # x3d visualization of the split planes 
     467                exportSplits false 
     468        } 
     469} 
  • GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro

    r563 r677  
    22 
    33TARGET = preprocessor 
     4 
     5NONGTP = ../../../../../../NonGTP 
    46 
    57#win32:INCLUDEPATH += c:/STLport-4.6.2/stlport 
     
    810unix:INCLUDEPATH += ../support/src/xerces-c-src_2_7_0/include 
    911 
    10 INCLUDEPATH += ../src  ../support/xerces/include  ../support/zlib/include ../support/boost ../support/devil/include 
     12INCLUDEPATH += ../src  $$NONGTP/Xerces/xerces/include  $$NONGTP/Zlib/include $$NONGTP/Boost $$NONGTP/Devil/include 
    1113 
    1214 
    13 win32:LIBPATH += ../support/xerces/lib ../support/devil/lib "d:/Programs/NVIDIA Corporation/Cg/lib" 
     15win32:LIBPATH += $$NONGTP/Xerces/xerces/lib $$NONGTP/Devil/lib "d:/Programs/NVIDIA Corporation/Cg/lib" 
    1416unix:LIBPATH += ../support/src/xerces-c-src_2_7_0/lib ../support/devil/lib /usr/lib/qt3/lib64 
    1517 
Note: See TracChangeset for help on using the changeset viewer.