Changeset 3276
- Timestamp:
- 01/14/09 18:48:14 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env
r3274 r3276 11 11 #filename=newvienna 12 12 #bvhname=newvienna 13 filename=p rocedural_pompeii_area6_hires/pompeii_full14 #filename=p rocedural_pompeii_area6_hires/pompeii_part15 #filename=city16 #bvhname=city13 filename=pompeii/pompeii_full 14 #filename=pompeii/pompeii_part 15 filename=city 16 bvhname=city 17 17 useLODs=1 18 18 # shadow map size … … 22 22 # the filename for the statistics 23 23 statsFilename=mystats.log 24 walkThroughSuffix=path_pp 24 walkThroughSuffix=walkthrough_pp_1 25 #walkThroughSuffix=path_pp 25 26 26 27 # use potentially visible sets? … … 55 56 56 57 # initial camera position 57 #camPosition=483.398f 242.364f 186.078f58 camPosition=483.398f 242.364f 186.078f 58 59 # pompeii view point 59 camPosition=1300.0f -2500.0f 10.0f 60 #camPosition=1300.0f -2500.0f 10.0f 61 # pompeii problematic 62 #camPosition=627.003 -1725.33 25.2 63 #camDirection=-0.761538 0.64812 -0 60 64 61 65 # initial camera orientation … … 92 96 # tone mapping 93 97 useHDR=0 94 95 98 # use antialiasing 96 99 useAA=0 97 98 100 # show lense flare 99 101 useLenseFlare=1 100 101 102 # use ssao / color bleeding 102 103 useAdvancedShading=1 103 104 104 # skylight turbitity 105 105 turbitity=3.0f … … 130 130 #bvhname=PowerPlantM 131 131 #keyForwardMotion=500.0f 132 #mouseMotion=3.0f133 132 #visibilitySolution=power-plant-2c-xx-1000b-pgv2 134 133 #visibilitySolution=power-plant-2c-xx-1000d-pgv -
GTP/trunk/App/Demos/Vis/FriendlyCulling/plot_friendly
r3271 r3276 7 7 COMMAND3=./ps_memory_plot3 8 8 9 PREFIX=pp 9 PREFIX=pp_2 10 10 11 11 #FILES="$PREFIX-vfc.log $PREFIX_chc.log $PREFIX-vfc_pvs.log $PREFIX-chc++_b20.log $PREFIX-chc++_pvs_b20.log" … … 13 13 #FILES="$PREFIX-vfc.log $PREFIX-vfc_pvs.log $PREFIX-chc++.log $PREFIX-chc++_pvs.log" 14 14 #FILES="$PREFIX-chc++.log $PREFIX-chc++_b20.log" 15 FILES="$PREFIX-chc.log $PREFIX-vfc_pvs.log $PREFIX-vfc_pvs_smaller.log $PREFIX-chc++.log $PREFIX-chc++_pvs.log $PREFIX-chc++_pvs_smaller.log" 15 #FILES="$PREFIX-chc.log $PREFIX-vfc_pvs.log $PREFIX-vfc_pvs_smaller.log $PREFIX-chc++.log $PREFIX-chc++_pvs.log $PREFIX-chc++_pvs_smaller.log" 16 FILES="$PREFIX-chc.log $PREFIX-vfc_pvs.log $PREFIX-chc++.log $PREFIX-chc++_pvs.log" 16 17 17 18 echo $FILES -
GTP/trunk/App/Demos/Vis/FriendlyCulling/ps_memory_plot2
r3271 r3276 24 24 #echo set xrange \[4200:4600\] >> $FILE 25 25 #echo set xrange \[100:400\] >> $FILE 26 echo set xrange \[1: 1000\] >> $FILE26 echo set xrange \[1:500\] >> $FILE 27 27 #echo set xrange \[1600:2000\] >> $FILE 28 28 # echo set boxwidth 0.4 >> $FILE -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Geometry.cpp
r3274 r3276 40 40 if (delData) 41 41 { 42 //DEL_ARRAY_PTR(mVertices);42 DEL_ARRAY_PTR(mVertices); 43 43 DEL_ARRAY_PTR(mNormals); 44 44 DEL_ARRAY_PTR(mTexCoords); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SkyPreetham.cpp
r3272 r3276 109 109 110 110 // scale the sky dome so no intersection with the scene is visible 111 const float scaleFactor = 80.0f;112 //const float scaleFactor = 1000.0f;111 //const float scaleFactor = 80.0f; 112 const float scaleFactor = 1000.0f; 113 113 114 114 position.z -= 3.0f * scaleFactor; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3274 r3276 377 377 void RenderViewCell(); 378 378 379 void LoadPompeiiScene(); 380 379 381 380 382 // new view projection matrix of the camera … … 597 599 //LoadModel("sibenik.dem", dynamicObjects); 598 600 599 600 AxisAlignedBox3 pompeiiBox = SceneEntity::ComputeBoundingBox(staticObjects); 601 602 #if 1 603 // todo: dispose texture 604 Texture *floorTex = new Texture(model_path + "stairs.c.01.tif"); 605 606 floorTex->SetBoundaryModeS(Texture::REPEAT); 607 floorTex->SetBoundaryModeT(Texture::REPEAT); 608 609 floorTex->Create(); 610 Material *mymat = resourceManager->CreateMaterial(); 611 612 Technique *tech = mymat->GetDefaultTechnique(); 613 tech->SetDiffuse(RgbaColor(1, 1, 1, 1)); 614 tech->SetTexture(floorTex); 615 616 Technique *depthPass = new Technique(*tech); 617 Technique *deferred = new Technique(*tech); 618 619 depthPass->SetColorWriteEnabled(false); 620 depthPass->SetLightingEnabled(false); 621 622 ShaderProgram *defaultFragmentTexProgramMrt = ShaderManager::GetSingleton()->GetShaderProgram("defaultFragmentTexMrt"); 623 ShaderProgram *defaultVertexProgramMrt = ShaderManager::GetSingleton()->GetShaderProgram("defaultVertexMrt"); 624 625 deferred->SetFragmentProgram(defaultFragmentTexProgramMrt); 626 deferred->SetVertexProgram(defaultVertexProgramMrt); 627 628 deferred->GetFragmentProgramParameters()->SetViewMatrixParam(0); 629 deferred->GetVertexProgramParameters()->SetModelMatrixParam(1); 630 deferred->GetVertexProgramParameters()->SetOldModelMatrixParam(2); 631 632 deferred->SetTexture(floorTex); 633 634 mymat->AddTechnique(deferred); 635 mymat->AddTechnique(depthPass); 636 637 638 //const Vector3 offs(1300.0f, -2500.0f, .0f); 639 const Vector3 offs(pompeiiBox.Center(0), pompeiiBox.Center(1), 0); 640 Matrix4x4 moffs = TranslationMatrix(offs); 641 642 Plane3 plane; 643 Transform3 *mytrafo = resourceManager->CreateTransform(moffs); 644 645 SceneEntity *myplane = 646 SceneEntityConverter().ConvertPlane(plane, 647 pompeiiBox.Size(0), 648 pompeiiBox.Size(1), 649 5, 650 5, 651 mymat, 652 mytrafo); 653 654 resourceManager->AddSceneEntity(myplane); 655 staticObjects.push_back(myplane); 656 657 #endif 601 if (1) LoadPompeiiScene(); 658 602 659 603 #if 0 … … 724 668 725 669 726 ObjExporter().Export(model_path + "mypompeii.obj", bvh);727 BvhExporter().Export(model_path + "mypompeii.bv", bvh);670 //ObjExporter().Export(model_path + "mypompeii.obj", bvh); 671 //BvhExporter().Export(model_path + "mypompeii.bv", bvh); 728 672 729 673 … … 1461 1405 deferredShader->SetSaveFrame("", -1); 1462 1406 } 1463 //if (makeSnapShot) makeSnapShot = false; 1407 1408 if (makeSnapShot) makeSnapShot = false; 1464 1409 1465 1410 ShadowMap *sm = showShadowMap ? shadowMap : NULL; … … 2397 2342 int i = 4; 2398 2343 2399 if (0) 2344 if (0) // q: show rendered objects or nodes (no space for both) 2400 2345 { 2401 2346 sprintf(msg[i ++], "rendered: %s of %s objects, %s of %s triangles", … … 2408 2353 } 2409 2354 2410 sprintf(msg[i ++], "traversed: %5d, frustum culled: %5d, query culled: %5d ",2355 sprintf(msg[i ++], "traversed: %5d, frustum culled: %5d, query culled: %5d nodes", 2411 2356 traversedNodes, frustumCulledNodes, queryCulledNodes); 2412 2357 sprintf(msg[i ++], "issued queries: %5d, state changes: %5d, render batches: %5d", … … 2429 2374 { 2430 2375 if (showFPS) 2431 sprintf(msg[7], "%s: %6.1f fps", alg_str[renderMode], fps); 2376 { 2377 sprintf(msg[7], "%s: %6.1f fps", alg_str[renderMode], fps); 2378 myfont.DrawString(msg[7], 1.3f, 690.0f, 760.0f);//, top_color, bottom_color); 2379 } 2432 2380 } 2433 2381 else 2382 { 2434 2383 sprintf(msg[7], "%s: %6.1f ms", alg_str[renderMode], rTime); 2435 2436 myfont.DrawString(msg[7], 1.3f, 690.0f, 760.0f);//, top_color, bottom_color); 2384 myfont.DrawString(msg[7], 1.3f, 690.0f, 760.0f);//, top_color, bottom_color); 2385 } 2386 2437 2387 2438 2388 //sprintf(msg[8], "algorithm time: %6.1f ms", rTime); … … 2516 2466 renderState.Reset(); 2517 2467 2518 PrintGLerror("visible objects");2468 PrintGLerror("visible objects"); 2519 2469 } 2520 2470 … … 2537 2487 2538 2488 if (validIntersect) 2539 // 2489 //&& ((playerPos.z - oldPos.z) < bvh->GetBox().Size(2) * 1e-1f)) 2540 2490 { 2541 2491 camera->SetPosition(playerPos); … … 2743 2693 Visualization::RenderBoxForViz(viewCell->GetBox()); 2744 2694 } 2695 2696 2697 void LoadPompeiiScene() 2698 { 2699 AxisAlignedBox3 pompeiiBox = SceneEntity::ComputeBoundingBox(staticObjects); 2700 2701 // todo: dispose texture 2702 Texture *floorTex = new Texture(model_path + "stairs.c.01.tif"); 2703 2704 floorTex->SetBoundaryModeS(Texture::REPEAT); 2705 floorTex->SetBoundaryModeT(Texture::REPEAT); 2706 2707 floorTex->Create(); 2708 Material *mymat = resourceManager->CreateMaterial(); 2709 2710 Technique *tech = mymat->GetDefaultTechnique(); 2711 tech->SetDiffuse(RgbaColor(1, 1, 1, 1)); 2712 tech->SetTexture(floorTex); 2713 2714 Technique *depthPass = new Technique(*tech); 2715 Technique *deferred = new Technique(*tech); 2716 2717 depthPass->SetColorWriteEnabled(false); 2718 depthPass->SetLightingEnabled(false); 2719 2720 ShaderProgram *defaultFragmentTexProgramMrt = ShaderManager::GetSingleton()->GetShaderProgram("defaultFragmentTexMrt"); 2721 ShaderProgram *defaultVertexProgramMrt = ShaderManager::GetSingleton()->GetShaderProgram("defaultVertexMrt"); 2722 2723 deferred->SetFragmentProgram(defaultFragmentTexProgramMrt); 2724 deferred->SetVertexProgram(defaultVertexProgramMrt); 2725 2726 deferred->GetFragmentProgramParameters()->SetViewMatrixParam(0); 2727 deferred->GetVertexProgramParameters()->SetModelMatrixParam(1); 2728 deferred->GetVertexProgramParameters()->SetOldModelMatrixParam(2); 2729 2730 deferred->SetTexture(floorTex); 2731 2732 mymat->AddTechnique(deferred); 2733 mymat->AddTechnique(depthPass); 2734 2735 2736 //const Vector3 offs(1300.0f, -2500.0f, .0f); 2737 const Vector3 offs(pompeiiBox.Center(0), pompeiiBox.Center(1), 0); 2738 Matrix4x4 moffs = TranslationMatrix(offs); 2739 2740 Plane3 plane; 2741 Transform3 *mytrafo = resourceManager->CreateTransform(moffs); 2742 2743 SceneEntity *myplane = 2744 SceneEntityConverter().ConvertPlane(plane, 2745 pompeiiBox.Size(0), 2746 pompeiiBox.Size(1), 2747 5, 2748 5, 2749 mymat, 2750 mytrafo); 2751 2752 resourceManager->AddSceneEntity(myplane); 2753 staticObjects.push_back(myplane); 2754 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/toto.txt
r3228 r3276 162 162 163 163 164 implement dof 164 make better DOF 165 166 clouds 167 168 god rays 169 170 animation 171 172 173 ################################ 174 ## pompeii todo: 175 176 1) improve performance: 177 make better objects (jiri?) 178 179 2) use better bvh code (also use size to handle floor plane) 180 181 3) shading problems: 182 183 create own normals: 184 185 flat normals 186 use crease angles 187 188 find out about degenerate vertices 189 190 find out about missing texcoords 191 192 193 ##################################### 194 195 fix shadows
Note: See TracChangeset
for help on using the changeset viewer.