Changeset 549 for trunk/VUT


Ignore:
Timestamp:
01/18/06 04:55:43 (19 years ago)
Author:
bittner
Message:

rss tree tmp changes for regular sampling

Location:
trunk/VUT/GtpVisibilityPreprocessor/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/Makefile

    r529 r549  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (2.00a) (Qt 4.1.0) on: ?t 12. I 15:26:52 2006 
     3# Generated by qmake (2.00a) (Qt 4.1.0) on: po 16. I 20:32:45 2006 
    44# Project:  preprocessor.pro 
    55# Template: app 
  • trunk/VUT/GtpVisibilityPreprocessor/src/RssPreprocessor.cpp

    r537 r549  
    1313#include "GlRenderer.h" 
    1414 
    15 static bool useViewSpaceBox = true; 
     15static bool useViewSpaceBox = false; 
    1616static bool use2dSampling = false; 
    1717 
     
    8282         
    8383  SetupRay(ray, viewPoint, direction); 
     84 
     85  if (!mDetectEmptyViewSpace) 
     86        ray.mFlags &= ~Ray::CULL_BACKFACES; 
     87 
    8488  // cast ray to KD tree to find intersection with other objects 
    8589  Intersectable *objectA, *objectB; 
     
    101105  } 
    102106 
    103   bool detectEmptyViewSpace = true; 
    104          
    105   if (detectEmptyViewSpace) { 
     107 
     108  if (mDetectEmptyViewSpace) { 
    106109        SetupRay(ray, pointA, -direction); 
    107110  } else 
    108111        SetupRay(ray, viewPoint, -direction); 
    109112         
    110          
     113  if (!mDetectEmptyViewSpace) 
     114        ray.mFlags &= ~Ray::CULL_BACKFACES; 
     115 
    111116  if (mKdTree->CastRay(ray)) { 
    112117        objectB = ray.intersections[0].mObject; 
     
    122127 
    123128  //  if (objectA == NULL && objectB != NULL) { 
    124   if (1) { 
     129  if (mDetectEmptyViewSpace) { 
    125130        // cast again to ensure that there is no objectA 
    126131        SetupRay(ray, pointB, direction); 
     
    135140 
    136141  bool validSample = (objectA != objectB); 
    137   if (0 && detectEmptyViewSpace) {   // consider all samples valid 
    138         // check if the viewpoint lies on the line segment AB 
    139         if (Distance(pointA, pointB) < 
    140                 Distance(viewPoint, pointA) + Distance(viewPoint, pointB) - Limits::Small) { 
    141           validSample = false; 
    142         } 
    143   } 
    144          
    145142  if (validSample) { 
    146143        if (objectA) { 
     
    318315  //    exporter->ExportKdTree(*mKdTree); 
    319316  exporter->SetFilled(); 
    320   exporter->ExportScene(mSceneGraph->mRoot); 
     317  // temporarily do not export the scene 
     318  if (0) 
     319        exporter->ExportScene(mSceneGraph->mRoot); 
    321320  exporter->SetWireframe(); 
    322321 
  • trunk/VUT/GtpVisibilityPreprocessor/src/RssTree.cpp

    r537 r549  
    20882088        } 
    20892089  } 
    2090    
     2090 
     2091  float extendedConvexCombinationProb = 0.0f; //0.7f 
     2092  float silhouetteCheckPercentage = 0.0f; //0.5f 
    20912093  for (int i=0; generated < numberOfRays && i < numberOfTries; i++) { 
    2092         bool useExtendedConvexCombination = ((nrays >= 2) && (Random(1.0f) < 0.7f)); 
     2094        bool useExtendedConvexCombination = ((nrays >= 2) && (Random(1.0f) < 
     2095                                                                                                                  extendedConvexCombinationProb)); 
    20932096         
    20942097        Vector3 origin, direction; 
     
    21632166         
    21642167 
    2165         if (i > numberOfRays/2) { 
     2168        if (i > numberOfRays*(1.0f - silhouetteCheckPercentage)) { 
    21662169          if (exporter) { 
    21672170                VssRay *ray = new VssRay(origin, origin + 100*direction, NULL, NULL); 
  • trunk/VUT/GtpVisibilityPreprocessor/src/default.env

    r547 r549  
    2323        useGlRenderer true 
    2424#       type sampling 
    25         type vss 
    26 #       type rss 
     25#       type vss 
     26        type rss 
    2727        detectEmptyViewSpace false 
    2828} 
     
    7070RssPreprocessor { 
    7171        samplesPerPass  100000 
    72         initialSamples 500000 
    73         vssSamples 10000000 
    74         vssSamplesPerPass 500000 
     72        initialSamples 1000000 
     73        vssSamples 20000000 
     74        vssSamplesPerPass 1000000 
    7575        useImportanceSampling true 
    7676 
     
    8787        useViewcells true 
    8888        updateSubdivision true 
    89 loadInitialSamples true 
     89        loadInitialSamples true 
    9090        storeInitialSamples false 
    9191} 
     
    107107        maxStaticMemory 100 
    108108 
    109         splitType regular 
     109#       splitType regular 
    110110#       splitType heuristic 
    111 #       splitType hybrid 
    112         splitUseOnlyDrivingAxis true 
     111        splitType hybrid 
     112        splitUseOnlyDrivingAxis false 
    113113        importanceBasedCost false 
    114114 
     
    168168 
    169169ViewCells { 
    170         loadFromFile false 
     170        loadFromFile true 
    171171        #type kdTree 
    172172        #type vspKdTree 
     
    200200        } 
    201201         
    202         filename ../data/soda/viewcells_soda5.xml 
     202#       filename ../data/soda/viewcells_soda5.xml 
     203        filename ../data/atlanta/viewcells_atlanta2.xml 
    203204#       filename ../data/atlanta/atlanta_viewcells_large.x3d 
    204205#       filename ../data/vienna/viewcells-25-sel.x3d 
  • trunk/VUT/GtpVisibilityPreprocessor/src/preprocessor.pro

    r516 r549  
    4444RenderSimulator.cpp VspKdTree.cpp RayInfo.cpp RssTree.cpp RssPreprocessor.cpp \ 
    4545ViewCellsManager.cpp VspBspTree.cpp GlRenderer.cpp \ 
    46 PreprocessorThread.cpp Renderer.cpp Beam.cpp ViewCellsParser.cpp 
     46PreprocessorThread.cpp Renderer.cpp Beam.cpp ViewCellsParser.cpp Tetrahedron3.cpp 
    4747 
Note: See TracChangeset for help on using the changeset viewer.