Changeset 2719


Ignore:
Timestamp:
05/27/08 18:48:22 (16 years ago)
Author:
bittner
Message:

merge on nemo

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp

    r2709 r2719  
    9797 
    9898                // for sg snapshot 
    99                 mViewPoint = Vector3(32.8596, 9.86079, -1023.79); 
    100                 mViewDirection = Vector3(-0.92196, 0, 0.387286); 
     99          mViewPoint = Vector3(32.8596, 9.86079, -1023.79); 
     100          mViewDirection = Vector3(-0.92196, 0, 0.387286); 
    101101 
    102102                // inside 
     
    104104                mViewDirection = Vector3(-0.604798, 0, 0.796379); 
    105105 
     106                if (0) { 
     107 
    106108                // outside 
    107109                mViewPoint = Vector3(35.092, 17.7078, -857.966); 
     
    138140                mViewPoint = Vector3(1188.22, 187.427, -381.739); 
    139141                mViewDirection = Vector3(-0.963031, -0, -0.269365); 
     142                } 
    140143        } 
    141144 
     
    145148                                                      mDetectEmptyViewSpace); 
    146149 
    147         //mSnapErrorFrames = false; 
    148         mSnapErrorFrames = true; 
     150        mSnapErrorFrames = false; 
     151        //mSnapErrorFrames = true; 
    149152 
    150153        mSnapPrefix = "snap/"; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/Makefile

    r2714 r2719  
    11############################################################################# 
    22# Makefile for building: preprocessor 
    3 # Generated by qmake (2.00a) (Qt 4.1.2) on: po 26. V 14:55:33 2008 
     3# Generated by qmake (2.00a) (Qt 4.1.2) on: út 27. V 17:03:19 2008 
    44# Project:  preprocessor.pro 
    55# Template: app 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp

    r2717 r2719  
    2020#include "ObjectPlacer.h" 
    2121 
     22#define TEASER 1 
    2223 
    2324#define USE_CG 1 
     
    246247 
    247248                // mat_specular and mat_shininess are NOT default values 
    248                 GLfloat mat_ambient[] = {0.5f, 0.5f, 0.5f, 1.0f}; 
     249                GLfloat mat_ambient[] = {0.2f, 0.2f, 0.2f, 1.0f}; 
    249250                GLfloat mat_diffuse[] = {1.0f, 1.0f, 1.0f, 1.0f}; 
    250251                GLfloat mat_specular[] = {0.3f, 0.3f, 0.3f, 1.0f}; 
     
    256257                glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); 
    257258 
    258                 GLfloat light_ambient[] = {0.3, 0.3, 0.3, 1.0}; 
     259                GLfloat light_ambient[] = {0.1, 0.1, 0.1, 1.0}; 
    259260                //GLfloat light_diffuse[] = {0.6, 0.6, 0.6, 1.0}; 
    260                 GLfloat light_diffuse[] = {0.6, 0.6, 0.6, 1.0}; 
     261                GLfloat light_diffuse[] = {0.5, 0.5, 0.5, 1.0}; 
    261262                GLfloat light_specular[] = {1.0, 1.0, 1.0, 1.0}; 
    262263 
    263264                glEnable(GL_LIGHTING); 
    264                 //GLfloat light_position[] =  {278.0f, 548.8f,279.0f, 1.0f}; 
    265                 //GLfloat light_position[] =  {0.f, 0.f, 0.f, 1.0f}; 
    266                 GLfloat light_position[] =  {0.f, 0.0f, 0.f, 1.0f}; 
    267  
     265                GLfloat light_position[] =  {0.f, 0.f, 0.f, 1.0f}; 
     266 
     267                // lights in arena 
     268                 
    268269                glEnable(GL_LIGHT0);  
    269270 
     
    272273                glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); 
    273274                glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); 
    274                 glLightfv (GL_LIGHT0, GL_POSITION, light_position); 
    275  
     275 
     276                 
     277                 
     278                 
    276279                glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); 
    277280                glEnable(GL_COLOR_MATERIAL); 
    278281 
    279                 GLfloat lmodel_ambient[] = {0.3f, 0.3f, 0.3f, 1.0f}; 
     282                GLfloat lmodel_ambient[] = {0.1f, 0.1f, 0.1f, 1.0f}; 
    280283                glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); 
    281284 
     
    466469         
    467470        // mat_specular and mat_shininess are NOT default values 
    468         GLfloat mat_ambient[] = {0.5f, 0.5f, 0.5f, 1.0f}; 
     471        GLfloat mat_ambient[] = {0.1f, 0.1f, 0.1f, 1.0f}; 
    469472        GLfloat mat_diffuse[] = {1.0f, 1.0f, 1.0f, 1.0f}; 
    470473        GLfloat mat_specular[] = {0.3f, 0.3f, 0.3f, 1.0f}; 
     
    480483 
    481484        // a light       
    482         GLfloat light_ambient[] = {0.3, 0.3, 0.3, 1.0}; 
    483     GLfloat light_diffuse[] = {0.6, 0.6, 0.6, 1.0}; 
    484     GLfloat light_specular[] = {1.0, 1.0, 1.0, 1.0}; 
    485     GLfloat light_position[] =  {0.f, .0f, 0.f, 1.0f}; 
     485        GLfloat light_ambient[] = {0.05, 0.05, 0.05, 1.0}; 
     486    GLfloat light_diffuse[] = {0.7, 0.7, 0.7, 1.0}; 
     487    GLfloat light_specular[] = {0.3, 0.3, 0.3, 1.0}; 
     488    //GLfloat light_position[] =  {0.f, .0f, 0.f, 1.0f}; 
    486489    //GLfloat light_position[] =  {600.0f, 250.0f, -500.f, 1.0f}; 
    487490    //GLfloat light_position[] = {278.0f, 548.8f,279.0f, 1.0f}; 
     491 
     492 
    488493 
    489494        glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); 
     
    491496        glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); 
    492497 
    493         glLightfv(GL_LIGHT0, GL_POSITION, light_position); 
    494  
    495         //glDisable(GL_LIGHT0); 
    496         glEnable(GL_LIGHT0); 
     498        glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 1); 
     499        glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0); 
     500        glLightf(GL_LIGHT0, GL_QUADRATIC_ATTENUATION, 0); 
     501         
     502        //      GLfloat light1_position[] =  {-22.076887, 21.070816, 50.272095}; 
     503         
     504        // GLfloat light1_position[] =  {0, 0, -100}; 
    497505 
    498506        glLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient); 
    499507        glLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse); 
    500508        glLightfv(GL_LIGHT1, GL_SPECULAR, light_specular); 
    501                  
    502         // set position of the light2 
    503         GLfloat infinite_light2[] = {  -0.3, 1.5, 1.0, 0.0  }; 
    504         glLightfv (GL_LIGHT1, GL_POSITION, infinite_light2); 
    505         //glEnable(GL_LIGHT1); 
    506  
    507         GLfloat lmodel_ambient[] = {0.3f, 0.3f, 0.3f, 1.0f}; 
     509 
     510        glLightf(GL_LIGHT1, GL_CONSTANT_ATTENUATION, 1.0f); 
     511        glLightf(GL_LIGHT1, GL_LINEAR_ATTENUATION, 0); 
     512        glLightf(GL_LIGHT1, GL_QUADRATIC_ATTENUATION, 0); 
     513 
     514 
     515        glLightfv(GL_LIGHT2, GL_AMBIENT, light_ambient); 
     516        glLightfv(GL_LIGHT2, GL_DIFFUSE, light_diffuse); 
     517        glLightfv(GL_LIGHT2, GL_SPECULAR, light_specular); 
     518         
     519         
     520        glEnable(GL_LIGHT0); 
     521        glEnable(GL_LIGHT1);  
     522        glEnable(GL_LIGHT2);  
     523 
     524         
     525        GLfloat lmodel_ambient[] = {0.05f, 0.05f, 0.05f, 1.0f}; 
    508526        glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); 
    509  
     527         
    510528        glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); 
    511529        //glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR); 
     
    732750        glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);  
    733751 
     752#if TEASER 
     753        glColor3f(0.0f, 0.8f, 0.0f); 
     754#else 
    734755        glColor3f(0.6f, 0.6f, 0.6f); 
    735  
     756#endif 
     757         
    736758        // Render PVS 
    737759        VisualizePvs(); 
     
    9861008        SetupCameraProjection(width(), height()); 
    9871009        SetupCamera(); 
     1010 
     1011        GLfloat light0_position[] =  {22.495655, 21.070816, -1001.375000}; 
     1012        GLfloat light1_position[] =  {-22.076887, 21.070816, -997.272095}; 
     1013        GLfloat light2_position[] =  { 0.3, 1.5, -0.3, 0.0  }; 
     1014 
     1015        glLightfv (GL_LIGHT0, GL_POSITION, light0_position); 
     1016        glLightfv (GL_LIGHT1, GL_POSITION, light1_position); 
     1017        glLightfv (GL_LIGHT2, GL_POSITION, light2_position); 
    9881018 
    9891019        if (mRenderErrors)  
  • GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro

    r2708 r2719  
    8686} 
    8787 
    88 QMAKE_LFLAGS_CONSOLE=/NODEFAULTLIB:LIBCMT 
     88QMAKE_LFLAGS_CONSOLE=/NODEFAULTLIB:LIBCMT /DEBUG 
    8989 
    9090CONFIG(qt) { 
  • GTP/trunk/Lib/Vis/Preprocessing/src/run_test2

    r2713 r2719  
    44 
    55#COMMAND="./release/preprocessor.exe -preprocessor_quit_on_finish+" 
    6 COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=50000000 -samples_per_pass=300000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3 -preprocessor_detect_empty_viewspace+ -total_time=1400" 
     6COMMAND="../scripts/preprocessor.sh -preprocessor_quit_on_finish- -preprocessor_use_gl_renderer+ -preprocessor_evaluate_filter- -samples_per_evaluation=50000000 -samples_per_pass=300000 -total_samples=20000000 -mutation_use_pass_importance- -mutation_silhouette_search_steps=3 -preprocessor_detect_empty_viewspace+ -total_time=60  -preprocessor_ray_cast_method=1 -kd_pvs_area=1e-4" 
    77 
    88#SCENE="../data/vienna/vienna-buildings.x3d;../data/vienna/vienna-roofs.x3d;../data/vienna/vienna-roads.x3d" 
     
    2929#VIEWCELLS=../data/test1/test-viewcells.xml 
    3030 
    31 #SCENE=../data/Arena/arena-high-lods.obj 
    32 #VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz 
     31SCENE=../data/Arena/arena-high-lods.obj 
     32VIEWCELLS=../data/Arena/arena-high-lods-5000-viewcells.xml.gz 
    3333#VIEWCELLS=../data/Arena/viewcells-5000.xml.gz 
    3434#VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz 
    3535 
    3636 
    37  SCENE=../data/vienna/vienna_cropped.obj 
    38  VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz 
     37# SCENE=../data/vienna/vienna_cropped.obj 
     38# VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz 
    3939#VIEWCELLS=../data/vienna/vienna_cropped-20000-viewcells.xml.gz 
    4040 
Note: See TracChangeset for help on using the changeset viewer.