TerrainRendering

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

THIS WEBPAGE IS DEPRECATED - please visit our new website

Terrain Rendering

Source Code

Find your branch:

  • OpenGl Version (https://cgsr1.informatik.tu-muenchen.de:8443/svn/kirschan/branches)
    • amal: EQ 0.9
      • Terrain3D_Navigation: EQ 0.9; (Sandro)
    • ashry: EQ 1.0
    • dienersb: ??
    • dynamicFrustum: EQ 1.6/git (Sid - see EqualizerGithub)
    • ForceFeedback: EQ 1.0 (Maxi)
    • Guidance: EQ 1.0 (Manuel)
    • MagicLens: EQ 1.0 (Alba)
    • Navigation: EQ 1.0; similar to amal/Terrain3D_Navigation but on new EQ
    • selectionUI: ??
    • tunnel: ??
  • DirectX Version (https://camplinux.in.tum.de/far_project_virtualArabia/trunk/Terrain3D)

Compilation on Ubuntu64 using Eclipse

Eclipse

We do use Eclipse IDE for C/C++ Developers and subclipse. You of course can use your IDE or shell environment.

  • Eclipse IDE for C/C++ Developers (includes Incubating components); Indigo
  • http://www.eclipse.org/downloads/
  • Unzip file and run eclipse
  • Go to Help -> Install New Software...
  • Add a new site with the link to Subclipse: http://subclipse.tigris.org/update_1.6.x and install it
  • Eclipse will restart and probably an error pops up with something like JavaHL defect... OK to remove that

Now you do have your IDE.

Equalizer

You might require Equalizer. How does one know if he needs EQ?

Now you do have a compiled EQ.

Compiling the Terrain3D

Note: For first time compilation you need to be at one of the frave computers physically.

  • Run Eclipse IDE for C/C++ Developers
  • Getting Sources
    • Switch to SVN Repository Exploring Perspective
    • Create a new Repository Location with your branch information
    • Do a checkout of your branch as a project; You'll have a Project named Terrain3D
  • Either:
    Just using EQWorking on EQ

    • Right click on the Project -> Properties
    • Go to C/C++ Build -> Settings
    • GCC C++ Compiler -> Includes: add (or edit) path to point at /opt/Equalizer-1.0.2/include folder
    • GCC C++ Linker -> Libraries: add (or edit) path with /opt/Equalizer-1.0.2/lib folder

    • Right click on the Project -> Properties
    • Go to C/C++ Build -> Settings
    • GCC C++ Compiler -> Includes: add (or edit) path to your EQ/release/include folder
    • GCC C++ Linker -> Libraries: add (or edit) path with
      • EQ/release/lib/collage folder
      • EQ/release/lib/client folder
      • EQ/release/lib/server folder
  • Exit eclipse, walk to one of the frave computers, log in locally, start eclipse
  • Click on Project -> Build All
  • If an error is printed on the console it might be some issue with the GFX Compiler. Do this step to get it running. Do it only if the folder Terrain3D/GFXcompiler has the subfolders bin and src
    • File -> Import -> General -> Existing project into workspace: Select root dir: folder Terrain3D/GFXcompiler
    • Import projects: ctp and GFX
    • Click on Project -> Build All (ensure that this build sequence is kept: ctp, GFX, Terrain3D)
  • If compilation does termiante with an error Ubitrack/Facade/SimpleDataTypes.h: No such file or directory continue with next section "Ubitrack" otherwise you can skip through to "Running"
  • You can go back to a comfortable chair again

Ubitrack

Run eclipse

  • Right click on the Project -> Properties
  • Go to C/C++ Build -> Settings

    Using Existing Ubitrack installation at the fraveUsing own local Ubitrack installation

    • GCC C++ Compiler -> Includes: add (or edit) path with
      • /work/Ubitrack/Boost/include folder
      • /work/Ubitrack/ubitrack/src folder
      • /work/Ubitrack/ubitrack/3rd/lapack folder
      • /work/Ubitrack/ubitrack/3rd/boost-bindings folder
    • GCC C++ Linker -> Libraries: add (or edit) path with
      • /work/Ubitrack/Ubitrack_Installation/lib folder
      • /work/Ubitrack/Boost/lib folder

    • GCC C++ Compiler -> Includes: add (or edit) path with
      • Ubitrack/src folder
      • Ubitrack/3rd/lapack folder
      • Ubitrack/3rd/boost-bindings folder
    • GCC C++ Linker -> Libraries: add (or edit) path with
      • Ubitrack/build/rls/src/Ubitrack folder
      • Ubitrack/build/rls/3rd/log4cpp folder
      • Ubitrack/build/rls/3rd/tinyxml folder

  • Click on Project -> Build All

Running

  • Copy the file Terrain3D/Terrain3D_gl/Terrain3D.cfg.Sample to the execution folder (usually Terrain3D)
  • Rename it to Terrain3D.cfg
  • Edit it and change the location of the terrain to /work/...
    In EclipseStandalone
    • Note: In Eclipse you only can start Terrain3D locally; say, you have to be at one of the frave computers physically
    • Go to Run -> Run Configurations... -> Environment
    • Add a new variable LD_LIBRARY_PATH and let it point to
      • the lib folders of EQ
      • the lib folders of Ubitrack (if you are using it)
    • Note: To run standalone you can start Terrain3D from any computer, but it will run on the frave computers on which you are logged in (you need to be logged in physically, too)
    • Create a shell script, e.g. run.sh
    • add export LD_LIBRARY_PATH=<PATHS_TO_EQ>:$LD_LIBRARY_PATH to the script
    • add export LD_LIBRARY_PATH=<PATHS_TO_UBITRACK>:$LD_LIBRARY_PATH if you are using Ubitrack
    • Note: all paths must be separated by a colon (:)
    • add the call to Terrain3D/Debug64/Terrain3D to the script
    • Note: the Terrain3D.cfg must be in the same folder from which you are running the Terrain3D

Compilation on Windows64 (Ubitrack 64bit) using Visual Studio 2010

Visual studio 2010

You need to install VS2010 There is VS2010 solution file included in the SVN repository under your branch.

Equalizer and glut

The Equalizer libraries needed for windows 64 are already in the SVN repository under : \Terrain3D\Equalizer-env There is also a glut folder under: Terrain3D\glut containing all the header files and the libraries needed for glut

Compilation and Linking

Please follow the following steps to configure VS2010 to compile Terrain3D and Link it with Ubitrack, glut, Equlaizer.

  • In VS2010 under project Properties=>C++=> general => additional Include directories : you need the specify the path of the header files :

\Ubitrack64\src; (the ubitrack checkout folder in your machine).

\boost_1_47_0; (Boost src files).

\YOURWorkspace\Terrain3D\Equalizer-env\Win64\include.

\YOURWorkspace\Terrain3D\trackdAPI.

\YOURWorkspace\Terrain3D\Equalizer-env\include.

YOURWorkspace\Terrain3D\glut.

%(AdditionalIncludeDirectories?).

  • Under Linker=>general=> Additional Library Directories:

YOURWorkspace\Terrain3D\trackdAPI.

\YOURWorkspace\Terrain3D\Equalizer-env\Win64\Release\lib.

\YOURWorkspace\Terrain3D\glut.

\boost_1_47_0\lib64; (The boost 64bit binaries, ask Amal Benzina if you need the binaries)

\ubitrack64_installation\release\lib; (ubitrack 64bit Binaries , ask Amal Benzina if you need the binaries).

%(AdditionalLibraryDirectories?)

  • Under Linker=>input : Additional Dependencies

Equalizer.lib;Collage.lib;glew-1.5.8-MX-Equalizer.lib;trackdAPI_MD.lib;opengl32.lib;glu32.lib;ws2_32.lib;winmm.lib;comctl32.lib;libboost_wserialization-vc100-mt-1_47.lib;ubitrack.lib;%(AdditionalDependencies?)

Running

  • Run on VS2010 Release equalizer X64 (the debug does not work because trackDAPI(not relevant for you but needed for the Terrain3D with other tracking...) is only availabe in release)

  • copy "ubitrack.dll and log4cpp.dll" to YOURWorkspace\Terrain3D\Terrain3D_gl\Release Equalizer x64.

This is to avoid to put Ubitrack DLL path in the system environment path, to avoid potential conflicts, especially if you are using the lab computers.

Screen Configs for EQ

  • TBD

Code

  • A brief overview about the code to ease getting into it.
  • Maybe even a class diagram or a diagram showing what happens on startup and one that shows what happens on a render cycle or psoe callback push.

Tips

  • You can use ssh -Y username@frave0 to start the Terrain locally on frave0 from a remote machine
  • You can use ankhsvn to have a nice SVN integration for Visual Studio.


Edit | Attach | Refresh | Diffs | More | Revision r1.36 - 22 Mar 2013 - 16:48 - EvgenyIlyushkin

Lehrstuhl für Computer Aided Medical Procedures & Augmented Reality    rss.gif