Changeset 2613 for GTP/trunk/Lib/Vis
- Timestamp:
- 01/18/08 09:28:09 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/CHCRenderer.cpp
r2562 r2613 90 90 Environment::GetSingleton()->GetBoolValue("Preprocessor.detectEmptyViewSpace", 91 91 mDetectEmptyViewSpace); 92 mSnapErrorFrames = true;92 mSnapErrorFrames = false; 93 93 mSnapPrefix = "snap/"; 94 94 mUseForcedColors = false; -
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
r2612 r2613 25 25 #endif 26 26 27 // if 1 = SAFE RENDERING OF PVS primitives without VBOs for Pvs error estimation 28 #define EVAL_ERROR 0 29 27 30 namespace GtpVisibilityPreprocessor { 28 31 … … 97 100 Environment::GetSingleton()->GetBoolValue("Preprocessor.detectEmptyViewSpace", 98 101 mDetectEmptyViewSpace); 102 99 103 mSnapErrorFrames = true; 100 104 mSnapPrefix = "snap/"; … … 135 139 { 136 140 Triangle3 *t = &(object->GetItem()); 137 138 141 glBegin(GL_TRIANGLES); 139 142 Vector3 normal = t->GetNormal(); … … 786 789 if (node->IsLeaf()) 787 790 { 788 #if 1791 #if !EVAL_ERROR 789 792 RenderKdLeaf(static_cast<KdLeaf *>(node)); 790 793 #else … … 1464 1467 int pvsSize; 1465 1468 1466 cerr<<"GPE"<<endl;1467 1468 1469 float error = GetPixelError(pvsSize); 1469 cerr<<"GPEd"<<endl;1470 1470 1471 1471 mPvsErrorBuffer[i].mError = error; -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2612 r2613 102 102 { 103 103 104 MakeCurrent(); 105 104 106 float pErrorPixels = -1.0f; 105 107 … … 113 115 return 0.0f; 114 116 115 116 117 ObjectPvs pvs; 117 118 118 119 if (1) 119 120 pvs = viewcell->GetPvs(); … … 121 122 mViewCellsManager->ApplyFilter2(viewcell, false, 1.0f, pvs); 122 123 124 mUseForcedColors = true; 125 123 126 SetupCamera(); 124 127 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); 125 128 glColorMask(GL_FALSE, GL_TRUE, GL_FALSE, GL_FALSE); 129 glColor3f(0,1,0); 126 130 127 131 … … 133 137 134 138 pvsSize = pvs.GetSize(); 139 cout<<pvsSize<<endl; 135 140 136 141 Intersectable::NewMail(); … … 140 145 } 141 146 142 143 147 //glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE); 144 148 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 145 149 glEnable(GL_STENCIL_TEST); 146 147 mUseFalseColors = true; 148 150 glColor3f(1,0,0); 151 152 149 153 OcclusionQuery *query = mOcclusionQueries[0]; 150 154 155 // SetupCamera(); 156 157 Intersectable::NewMail(); 158 151 159 query->BeginQuery(); 152 160 153 SetupCamera();154 155 161 RenderScene(); 156 162 157 163 query->EndQuery(); 158 164 glDisable(GL_STENCIL_TEST); … … 166 172 167 173 pixelCount = query->GetQueryResult(); 168 174 // cout<<"pc="<<pixelCount<<endl; 175 169 176 pErrorPixels = ((float)pixelCount)/(GetWidth()*GetHeight()); 170 177 171 178 172 if (mSnapErrorFrames && pErrorPixels >= 0.01f) {179 if (mSnapErrorFrames && (0 && pErrorPixels >= 0.01f)) { 173 180 glReadBuffer(GL_BACK); 181 //glReadBuffer(GL_FRONT); 174 182 175 183 char filename[256]; … … 180 188 181 189 im.save(qstr, "PNG"); 182 if ( 1) { //0 && mFrame == 1543) {190 if (0) { //0 && mFrame == 1543) { 183 191 int x,y; 184 192 int lastIndex = -1; … … 196 204 } 197 205 198 199 206 mUseFalseColors = false; 200 207 glPushAttrib(GL_CURRENT_BIT); 201 208 glColor3f(0,1,0); 202 209 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 203 SetupCamera();204 210 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 205 211 … … 207 213 Intersectable::NewMail(); 208 214 215 209 216 ObjectPvsIterator it = pvs.GetIterator(); 210 217 for (; it.HasMoreEntries(); ) … … 212 219 RenderIntersectable(it.Next()); 213 220 } 221 222 mUseForcedColors = false; 214 223 215 224 im = toImage(); … … 222 231 223 232 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 224 233 234 DoneCurrent(); 235 225 236 return pErrorPixels; 226 237 } -
GTP/trunk/Lib/Vis/Preprocessing/src/SG08/run_test_pixel
r2612 r2613 4 4 #COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 5 5 #COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=500000 -samples_per_evaluation=10000000 -total_samples=500000000 -preprocessor_pvs_rendererror_samples=10000 -preprocessor_evaluatePixelError+" 6 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -samples_per_evaluation= 500000 -total_samples=500000000 -preprocessor_pvs_rendererror_samples=10000 -preprocessor_evaluatePixelError+ -preprocessor_detect_empty_viewspace+"6 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish+ -preprocessor_use_gl_renderer- -preprocessor_evaluate_filter- -samples_per_pass=1000000 -samples_per_evaluation=10000000 -total_samples=500000000 -preprocessor_pvs_rendererror_samples=10000 -preprocessor_evaluatePixelError+ -preprocessor_detect_empty_viewspace+ -kd_pvs_area=1e-4" 7 7 8 8 #SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d" … … 43 43 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 44 44 -rss_distributions=mutation+object_direction+spatial -view_cells_filter_max_size=1 \ 45 -view_cells_use_kd_pvs+ -af_use_kd_pvs -\45 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 46 46 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4l.xml \ 47 47 -preprocessor_stats=$PREFIX-i-mixed-b1-n4l.log \ -
GTP/trunk/Lib/Vis/Preprocessing/src/default.env
r2611 r2613 176 176 maxCostRatio 0.98 177 177 ct_div_ci 0.5 178 maxNodes 50000178 maxNodes 200000 179 179 #500000 180 180 } … … 196 196 } 197 197 198 #splitMethod spatialMedian199 splitMethod SAH198 splitMethod spatialMedian 199 # splitMethod SAH 200 200 splitBorder 0.01 201 201 }
Note: See TracChangeset
for help on using the changeset viewer.