Changeset 685


Ignore:
Timestamp:
03/10/06 08:23:09 (18 years ago)
Author:
bittner
Message:
 
Location:
GTP/trunk/Lib/Vis
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj

    r660 r685  
    6565                        <Tool 
    6666                                Name="VCCLCompilerTool" 
    67                                 AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;..\src;&quot;$(CG_INC_PATH)&quot;;&quot;$(GTPDIR)\NonGTP\Xerces&quot;;&quot;$(GTPDIR)\NonGTP\Devil\include&quot;;&quot;$(GTPDIR)\NonGTP\Zlib\include&quot;" 
     67                                AdditionalIncludeDirectories="..\support;..\support\devil\include;..\support\zlib\include;..\include;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;..\src;&quot;$(CG_INC_PATH)&quot;;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces" 
    6868                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB;" 
    6969                                RuntimeLibrary="2" 
  • GTP/trunk/Lib/Vis/Preprocessing/scripts/default.env

    r666 r685  
    177177        # samples used for view cell construction 
    178178        Construction { 
    179                 samples 1000000 
     179                samples 100000 
    180180                samplesPerPass 200000 
    181181        } 
     
    219219                refine false 
    220220                compress false 
    221                 merge false 
     221                merge true 
    222222        } 
    223223 
     
    230230                colorCode Random 
    231231                exportRays false 
    232                 exportGeometry false 
     232                exportGeometry true 
    233233                exportMergedViewCells false 
    234234                useClipPlane true 
    235235                clipPlaneAxis 1 
    236         } 
    237  
    238         showVisualization false  
     236                clipPlanePos 0.35 
     237        } 
     238 
     239        showVisualization true   
    239240        evaluateViewCells false 
    240241         
     
    302303VspBspTree { 
    303304        Construction { 
    304                 samples 800000 
    305                 epsilon 0.0005 
     305                samples 200000 
     306                epsilon 0.00005 
    306307                randomize false 
    307308                renderCostWeight 1.0 
     
    350351                minGlobalCostRatio      0.0000001 
    351352#               minGlobalCostRatio      0.0001 
    352                 maxViewCells            20000 
     353                maxViewCells            10000 
    353354         
    354355 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r682 r685  
    12821282                                        optBool, 
    12831283                                        "view_cells_merge_empty=", 
    1284                                         "false"); 
     1284                                        "true"); 
    12851285 
    12861286        RegisterOption("ViewCells.evaluateViewCells", 
     
    16041604                                   "true"); 
    16051605 
     1606        RegisterOption("Preprocessor.computeVisibility", 
     1607                                   optBool, 
     1608                                   "preprocessor_compute_visibility=", 
     1609                                   "true"); 
    16061610 
    16071611 
  • GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp

    r608 r685  
    123123                RenderViewCell(*it); 
    124124          } 
     125        } else { 
     126          //      cerr<<"Empty viewcell mesh\n"; 
    125127        } 
    126128  } 
     
    732734 
    733735   
    734   RenderErrors(); 
    735   RenderInfo(); 
    736  
    737     if (mRenderViewCells)  
     736  if (!mRenderViewCells) { 
     737        RenderErrors(); 
     738        RenderInfo(); 
     739  } else { 
    738740        RenderViewCells(); 
     741 
     742        mWireFrame = true; 
     743        RenderScene(); 
     744        mWireFrame = false; 
     745        RenderInfo(); 
     746  } 
    739747 
    740748  mFrame++; 
     
    816824  vl->addWidget(slider); 
    817825  slider->show(); 
    818   slider->setRange(1, 10000); 
     826  slider->setRange(1, 5000); 
    819827  slider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); 
    820828  slider->setValue(500); 
     
    946954  SetupCamera(); 
    947955  glEnable(GL_CULL_FACE); 
     956  //glDisable(GL_CULL_FACE); 
    948957  glCullFace(GL_FRONT); 
    949958  double eq[4]; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r675 r685  
    3030  environment->GetBoolValue("Preprocessor.loadPolygonsAsMeshes", mLoadPolygonsAsMeshes); 
    3131  environment->GetBoolValue("Preprocessor.quitOnFinish", mQuitOnFinish); 
     32  environment->GetBoolValue("Preprocessor.computeVisibility", mComputeVisibility); 
    3233  Debug << "load polygons as meshes: " << mLoadPolygonsAsMeshes << endl; 
    3334 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h

    r658 r685  
    159159  bool mQuitOnFinish; 
    160160  bool mLoadPolygonsAsMeshes; 
     161  bool mComputeVisibility; 
    161162 
    162163protected: 
  • GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.cpp

    r599 r685  
    2020PreprocessorThread::Main() 
    2121{ 
    22       
    23   if (1) { 
     22   
     23  if (mPreprocessor->mComputeVisibility) { 
    2424    mPreprocessor->ComputeVisibility(); 
    2525        //      mPreprocessor->ExportPreprocessedData("scene.vis"); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r684 r685  
    17541754                                                                   const bool createMesh) 
    17551755{ 
    1756         CreateMesh(viewCell); 
    1757  
    17581756        float area = 0; 
    17591757        float volume = 0; 
     
    17721770                area += geom.GetArea(); 
    17731771                volume += geom.GetVolume(); 
     1772                CreateMesh(*it); 
    17741773        } 
    17751774 
     
    35923591                vm->FinalizeViewCells(true); 
    35933592 
     3593                vm->mViewCellsTree->AssignRandomColors(); 
    35943594                Debug << (int)vm->mViewCells.size() << " view cells loaded" << endl; 
    35953595        } 
     
    36703670                                                                          const bool createMesh) 
    36713671{ 
    3672         CreateMesh(viewCell); 
    3673  
    36743672        float area = 0; 
    36753673        float volume = 0; 
     
    36883686                area += geom.GetArea(); 
    36893687                volume += geom.GetVolume(); 
     3688                CreateMesh(*it); 
    36903689        } 
    36913690 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp

    r683 r685  
    18261826                 
    18271827                // clamp because of possible precision issues 
    1828                 if (0 &&  
     1828                if (1 &&  
    18291829                        (!splitSuccessFull || (pFront <= 0) || (pBack <= 0) ||  
    18301830                        !geomFront.Valid() || !geomBack.Valid())) 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VssPreprocessor.cpp

    r677 r685  
    1313#include "Beam.h" 
    1414#include "GlRenderer.h" 
     15#include "ViewCellBsp.h" 
    1516 
    1617bool use2dSampling = false; 
     
    4748} 
    4849 
     50 
    4951VssPreprocessor::~VssPreprocessor() 
    5052{ 
     
    5254        DEL_PTR(mViewSpaceBox); 
    5355} 
     56 
    5457 
    5558void 
     
    155158                // cast again to ensure that there is no objectA 
    156159                SetupRay(ray, pointB, direction); 
    157                 ray.mFlags |= Ray::CULL_BACKFACES; 
     160                ray.mFlags |= Ray::CULL_BACKFACESw; 
    158161                 
    159162                if (mKdTree->CastRay(ray))  
     
    317320  vssRays.SelectRays(number, rays); 
    318321   
    319   exporter->ExportRays(rays, RgbColor(1, 0, 0)); 
     322  //exporter->ExportRays(rays, RgbColor(1, 0, 0)); 
    320323 
    321324  delete exporter; 
     
    401404  } 
    402405} 
    403 #include "ViewCellBsp.h" 
     406 
    404407 
    405408void VssPreprocessor::TestBeamCasting(VssTree *tree,  
  • GTP/trunk/Lib/Vis/Preprocessing/src/X3dExporter.cpp

    r678 r685  
    11351135void X3dExporter::ExportGeometry(const ObjectContainer &objects) 
    11361136{ 
     1137#if 0 
    11371138        for (int j = 0; j < objects.size(); ++ j) 
    11381139                ExportIntersectable(objects[j]); 
     1140#else 
     1141        // hack 
     1142        PolygonContainer polys; 
     1143        for (int j = 0; j < objects.size(); ++ j){ 
     1144                polys.push_back(new Polygon3(dynamic_cast<MeshInstance *>(objects[j])->GetMesh()->mVertices)); 
     1145        } 
     1146 
     1147        Mesh dummyMesh; 
     1148        PolygonContainer::const_iterator it, it_end = polys.end(); 
     1149 
     1150        for (it = polys.begin(); it != it_end; ++ it) 
     1151          { 
     1152                (*it)->AddToMesh(dummyMesh); 
     1153          } 
     1154        ExportMesh(&dummyMesh); 
     1155        CLEAR_CONTAINER(polys); 
     1156#endif 
    11391157} 
    11401158 
  • GTP/trunk/Lib/Vis/Preprocessing/src/default.env

    r677 r685  
    2323        useGlRenderer true 
    2424#       type sampling 
    25         type vss 
    26 #       type rss 
     25#       type vss 
     26        type rss 
    2727        detectEmptyViewSpace true 
    2828        pvsRenderErrorSamples 10000 
    2929        quitOnFinish false 
     30        computeVisibility false 
    3031} 
    3132 
     
    3940        loadInitialSamples  false 
    4041        storeInitialSamples false 
    41         useViewSpaceBox true 
     42        useViewSpaceBox false 
    4243        enlargeViewSpace true 
    4344} 
     
    7576RssPreprocessor { 
    7677        samplesPerPass 100000 
    77         initialSamples 100000 
    78         vssSamples 100 
    79         vssSamplesPerPass 100 
     78        initialSamples 500000 
     79        vssSamples 5000000 
     80        vssSamplesPerPass 500000 
    8081        useImportanceSampling true 
    8182 
     
    179180        maxStaticMemory 40 
    180181 
    181         exportToFile true 
    182         loadFromFile false 
     182        exportToFile false 
     183        loadFromFile true 
    183184 
    184185        #type kdTree 
     
    213214                refine false 
    214215                compress false 
    215                 merge false 
     216                merge true 
    216217        } 
    217218 
     
    245246#       filename ../scripts/viewcells_vienna.xml 
    246247#       filename ../scripts/viewcells_atlanta.xml 
    247         filename ../scripts/viewcells_soda5.xml 
     248#       filename ../scripts/viewcells_soda5-2.xml 
     249#       filename ../data/soda/soda5-viewcells.xml 
     250        filename ../scripts/viewcells_atlanta.xml 
    248251} 
    249252 
Note: See TracChangeset for help on using the changeset viewer.