[2018] | 1 | |
---|
| 2 | |
---|
| 3 | BUILDING FROM SOURCE |
---|
| 4 | |
---|
| 5 | 1) The pyVolution Visualizer has several dependencies. |
---|
| 6 | |
---|
| 7 | OpenThreads, Producer, OpenSceneGraph: |
---|
| 8 | - http://openscenegraph.sourceforge.net |
---|
| 9 | - available as a bundle, OSG_OP_OT-0.9.8, that contains |
---|
| 10 | OpenThreads, (Open)Producer and OpenSceneGraph as |
---|
| 11 | subdirectories. |
---|
| 12 | - OpenSceneGraph has 3rd party dependencies, these are |
---|
| 13 | available as a downloadable .zip for Windows. Extracted |
---|
| 14 | .zip directory (3rdParty) lives alongside other three |
---|
| 15 | subdirectories. |
---|
| 16 | - Build "release" versions in above order |
---|
| 17 | - ensure you can run the examples that come with OSG |
---|
| 18 | prior to building the viewer (these live in the |
---|
| 19 | OpenSceneGraph/bin directory on Windows). |
---|
| 20 | |
---|
| 21 | NetCDF - a self-describing binary file format I/O library |
---|
| 22 | - http://my.unidata.ucar.edu/content/software/netcdf/index.html |
---|
| 23 | - require the header file netcdf.h and the library proper to |
---|
| 24 | link against |
---|
| 25 | |
---|
| 26 | cppUnit - a unit testing framework for C++ |
---|
| 27 | - http://cppunit.sourceforge.net |
---|
| 28 | - this is optional |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | 2) Set environment variables: |
---|
| 32 | |
---|
| 33 | OSG_ROOT : root of your OpenSceneGraph installation |
---|
| 34 | conforming to following layout |
---|
| 35 | |
---|
| 36 | OSG_ROOT |
---|
| 37 | /OpenThreads |
---|
| 38 | /lib |
---|
| 39 | /win32 (for VisualStudio builds) |
---|
| 40 | /include |
---|
| 41 | /Producer |
---|
| 42 | /lib |
---|
| 43 | /include |
---|
| 44 | /OpenSceneGraph |
---|
| 45 | /lib |
---|
| 46 | /include |
---|
| 47 | /3rdParty (Windows only) |
---|
| 48 | |
---|
| 49 | NETCDF_DIR : root of NetCDF binary package with needed subdirs |
---|
| 50 | /lib and /include |
---|
| 51 | |
---|
| 52 | CPPUNIT : root of c++ unit testing framework with needed subdirs |
---|
| 53 | /lib and /include (optional) |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | 3) Compilation |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | WINDOWS |
---|
| 60 | |
---|
| 61 | (i) Within VisualStudio, Open the solution in Swollen visualstudio subdirectory |
---|
| 62 | (ii) Open Menu Tools|Options|Projects|VC++Directories and add a |
---|
| 63 | path to $(NETCDF_DIR)/bin and $(OSG_ROOT)/bin. |
---|
| 64 | (iii) Build the solution |
---|
| 65 | |
---|
| 66 | |
---|
| 67 | Mac OSX |
---|
| 68 | |
---|
| 69 | Run make in top-level OSG_ROOT directory. |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | Linux |
---|
| 73 | |
---|
| 74 | Makefiles not yet written |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | 4) The binary swollen (swollen.exe on Windows) lives in the distribution's |
---|
| 79 | bin directory. Test the build with any of the sample datasets in the |
---|
| 80 | distribution's data subdirectory, e.g., |
---|
| 81 | "cd bin; ./swollen ../data/laminar.sww" |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | ========================================= |
---|
| 85 | RUNNING SWOLLEN |
---|
| 86 | |
---|
[2047] | 87 | Fix for swollen not locating sky and water texture images when binary |
---|
| 88 | found using PATH environment variable. The fix is to set an |
---|
| 89 | environment variable SWOLLEN_BINDIR pointing to your distro |
---|
| 90 | directory. This is not an optimal approach, but it works. |
---|
[2018] | 91 | |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | ========================================= |
---|
| 95 | STEREO |
---|
| 96 | |
---|
| 97 | Minor tweaks to re-enable stereo functionality. I have verified that this works on the vizlab active stereo system. For the GA passive stereo system, youll need to set the following environment variables. |
---|
| 98 | |
---|
| 99 | Environment Variable Name Value Description |
---|
| 100 | OSG_STEREO_MODE HORIZONTAL_SPLIT Use horizontal split stereo mode when in stereo |
---|
| 101 | OSG_SCREEN_DISTANCE 0.50 Set the distance the viewer is from screen in metres (default shown) |
---|
| 102 | OSG_SCREEN_HEIGHT 0.26 Set the height of image on the screen in metres (default shown) |
---|
| 103 | OSG_SCREEN_WIDTH 0.325 Set the width of image on the screen in metres (default shown) |
---|
| 104 | OSG_EYE_SEPARATION 0.06 Set the eye separation interoccular distance (default shown.) |
---|
| 105 | OSG_SPLIT_STEREO_HORIZONTAL_SEPARATION 42 Set the number of pixels between the left and right viewports (default shown) |
---|
| 106 | |
---|
| 107 | The default physical dimensions are for a computer monitor. These need to be adjusted for the larger setup. Typical values might be 2m viewing distance from screen, screen dimensions of 2m x 1.5m. Eye separation obviously stays the same. Then just start swollen with the dash dash stereo flag. |
---|
| 108 | |
---|
| 109 | The GA edge: |
---|
| 110 | OSG_STEREO_MODE QUAD_BUFFER |
---|
| 111 | OSG_SCREEN_DISTANCE 3.0 |
---|
| 112 | OSG_SCREEN_HEIGHT 2.0 |
---|
| 113 | OSG_SCREEN_WIDTH 2.66 |
---|
| 114 | OSG_EYE_SEPARATION 0.06 |
---|
| 115 | OSG_SPLIT_STEREO_HORIZONTAL_SEPARATION 0 |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | ===========DEBUG |
---|
| 119 | |
---|
| 120 | set OSG_NOTIFY_LEVEL=DEBUG |
---|
| 121 | |
---|
| 122 | |
---|