1 | To Run ANUGA viewer |
---|
2 | ------------------- |
---|
3 | |
---|
4 | anuga-viewer <path to sww file> |
---|
5 | |
---|
6 | ("h" for help) |
---|
7 | |
---|
8 | Controls |
---|
9 | -------- |
---|
10 | |
---|
11 | Hold the left mouse button and drag to spin the model. |
---|
12 | Hold the right mouse button and drag to change the zoom distance. |
---|
13 | Hold both mouse buttons down or hold the middle button to slide around the model. |
---|
14 | Hold 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. |
---|
15 | Click on something that is not water, or click without holding shift to hide the timeseries plot. |
---|
16 | |
---|
17 | |
---|
18 | Applying Textures |
---|
19 | ----------------- |
---|
20 | |
---|
21 | Applying images (ie textures) to the bedslope mesh can be done with the --texture command line option. For example: |
---|
22 | |
---|
23 | viewer-viewer -texture ../images/bedslope.jpg ../data/cairns.sww |
---|
24 | |
---|
25 | There 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 | |
---|
31 | In 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 | |
---|
35 | How to Make a Movie |
---|
36 | ------------------- |
---|
37 | |
---|
38 | 1. 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 | |
---|
40 | 2. 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 |
---|
42 | The movie will be saved as a series of JPEG stills in a folder <mymoviename>. |
---|
43 | |
---|
44 | 3. Use the MEncoder program to stitch the jpegs into a movie. Instructions here: http://www.mplayerhq.hu/DOCS/HTML/en/encoding-guide.html |
---|
45 | |
---|
46 | 4. You can now view this .avi file on any computer, or upload to a video site, etc. |
---|
47 | |
---|
48 | |
---|
49 | |
---|
50 | Lighting |
---|
51 | -------- |
---|
52 | |
---|
53 | By 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 | |
---|
57 | To remove lighting altogether and just have flat texturing, press 'l' to toggle lighting. |
---|
58 | |
---|
59 | |
---|
60 | |
---|
61 | |
---|
62 | Troubleshooting |
---|
63 | --------------- |
---|
64 | |
---|
65 | Q: I can't load TIF images. |
---|
66 | A: 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 | |
---|
68 | Q: I have 2 monitors, and the viewer opens a window in each. How do I make it only show in a single monitor? |
---|
69 | A: You need an extra command line option or environment setting to tell it which screen to open into: |
---|
70 | |
---|
71 | -- screen <screen num> |
---|
72 | |
---|
73 | ie: |
---|
74 | |
---|
75 | anuga-viewer --window 64 64 1024 768 --screen 0 -scale 1.5 -texture |
---|
76 | ../images/bedslope.jpg ../data/cairns.sww |
---|
77 | |
---|
78 | |
---|