Export Optimised Landscape - A Plugin for GenesisII
Function
This plugin exports a GenesisII grid in polygon-optimised form - that is is
creates a surface containing a small number of triangles that approximates as
closely as possible the landscape grid. Typically surfaces like this are used
in realtime applications - such as our ActiveMap ActiveX or VRML worlds displayed
in Netscape or Internet Explorer.
Setting up the plugin
Simply copy the vrml.glg file to your GenesisII plugins directory.
As this plugin is written in Borland C++Builder you must
also download the C++Builder common file set from our site and copy it to your
GenesisII or Windows system directory.
Options
The plugin can export data in TIN, OBJ or VRML. TIN and OBJ formats simply
contain textual information about the triangles. As the same dialog is displayed
for all three export types we just describe VRML export here - TIN and OBJ export
is the same except the texture mapping and background color parameters are not
used.
VRML worlds are viewed in real-time, i.e. the viewer may move around inside the VRML model using the mouse. If response times are to be acceptable on a medium specification PC (say a 200MHz Pentium) then the number of polygons in the image must be reduced to around 500 or less. If this is not done, and the program exported a typical GenesisII grid of 200 x 200 grid points then the 40,000 polygons that the world contained would bring even a high specification machine to a virtual halt!
This plugin employs an advanced polygon reduction algorithm to determine the best set of triangles that can model the map and minimise loss of detail. You can control this using the Tolerance and Polygons parameters. You may like to experiment with these, but in most cases a tolerance setting of 10 and about 300 to 500 polygons yield good results.
Typically the Horizontal scale should usually be set to the same value as the grid point spacing, and the Vertical scale value set to one. You can change these values to increase the size and change the scale of the model.
The VRML file is exported to show the surface texture mapped (i.e. in GenesisII terms with an overlay). The required graphics file should be entered in the Texture map edit control. As the VRML file may be used on UNIX or other non-PC systems no validation of the file name is applied. You can use maps or satellite images as texture maps, or remove this information later from the created file if it is not required.
The Background color control sets the background colour for the world - for instance a sky blue. VRML 2.0 is a comprehensive graphics description language and is supports many more features than those that can be set here (such as graduated backgrounds, fog, text etc.). As VRML files are in ASCII text you can add these manually or using a specialised VRML design tool. Further details about VRML may be found on the internet at http://vrml.vag.org.