WikiStart: readme.ubuntu.txt

File readme.ubuntu.txt, 3.2 KB (added by habili, 7 years ago)
Line 
1To Run ANUGA viewer
2-------------------
3
4anuga-viewer <path to sww file>
5
6("h" for help)
7
8Controls
9--------
10
11Hold the left mouse button and drag to spin the model.
12Hold the right mouse button and drag to change the zoom distance.
13Hold both mouse buttons down or hold the middle button to slide around the model.
14Hold down shift and click on the water with the left mouse button to show a timeseries plot. The data shown depends on the view mode.
15Click on something that is not water, or click without holding shift to hide the timeseries plot.
16
17
18Applying Textures
19-----------------
20
21Applying images (ie textures) to the bedslope mesh can be done with the --texture command line option. For example:
22
23viewer-viewer -texture ../images/bedslope.jpg ../data/cairns.sww
24
25There are two possible ways the texture is mapped onto the bedslope mesh, based on the texture format.
26
27   1. If the texture file contains GDAL geodata, this will be used to map the texture onto the mesh.
28
29   2. Otherwise, the texture will be projected directly from above, in a rectangle that exactly bounds the bedslope.
30
31In summary, if you load a GDAL texture, it will map the texture onto the mesh using the data in the texture file. Otherwise (if you are using a jpeg, tiff, etc.) it will naively map the texture onto the mesh, as if a projector beam was pointing directly downwards, situated so that the image would just cover every corner of the bedslope mesh.
32
33
34
35How to Make a Movie
36-------------------
37
381. Anuga viewer can export a movie in a format that is only viewable with the viewer. Press 1 to begin recording, and 3 to save the movie in Anuga's /bin folder as "movie.sww".
39
402. To export the movie as an AVI that can be viewed by anyone, run anuga on the command line like so:
41      anuga-viewer -movie <mymoviename> movie.swm
42The movie will be saved as a series of JPEG stills in a folder <mymoviename>.
43
443. Use the MEncoder program to stitch the jpegs into a movie. Instructions here: http://www.mplayerhq.hu/DOCS/HTML/en/encoding-guide.html
45
464. You can now view this .avi file on any computer, or upload to a video site, etc.
47
48
49
50Lighting
51--------
52
53By default, there is a single light in the ANUGA Viewer scene at a default position. To change its position you can use the following command line parameter:
54
55   -lightpos <float>,<float>,<float> - x,y,z of bedslope directional light (z is up)
56
57To remove lighting altogether and just have flat texturing, press 'l' to toggle lighting.
58
59
60
61
62Troubleshooting
63---------------
64
65Q: I can't load TIF images.
66A: Try opening the file in Gimp, or some other image viewer, then re-save it. Some TIF files seem to have a strange format that OSG/ANUGA can't read. Loading very large image files also seems to be dependent on the video card - you could try shrinking the image to 4096x4096 pixels or smaller.
67
68Q: I have 2 monitors, and the viewer opens a window in each. How do I make it only show in a single monitor?
69A: You need an extra command line option or environment setting to tell it which screen to open into:
70
71-- screen <screen num>
72
73ie:
74
75anuga-viewer --window 64 64 1024 768 --screen 0 -scale 1.5 -texture
76../images/bedslope.jpg ../data/cairns.sww
77
78