CfsTmap
Elevated Mesh Scenery Creation Program for Combat Flight Simulator
CfsTmap is a Program for creating Elevated Scenery for Microsoft Combat Flight Simulator utilising the default texture files included with every installation of CFS.
Bitmaps can be rotated 90, 180 or 270 degrees without the need to distribute any images with the scenery .
This program is not meant as a substitute for Misho Katulic`s TerraBuilder. TB is a much more powerful program capable of of much more detail. CfsTmap is intended as an easy Tool for creating areas of Elevated-Mesh terrain for placing in the "Un-Sceneried" areas of CFS
Users of CFSMap will recognise most of the program interface. Many improvements have been made, particularly to Bitmap-rotation, and some things are done slightly differently but a lot of the basic functions remain.
Misho Katulic -- For showing what could be done with the Standard Textures (with the Terrabuilder 2 SynthWizard) and for the all-important information about the CFS texture naming convention that made the Matching routines possible.
Ralf-J Triebel -- For a constant stream of ideas and unending support.
Manfred Moldenhauer - For creating Scasm (without which there would be very little scenery created) and for giving permission for scasm 2.39 to be distributed with this program.
William Potvin II - For the original Information about the new CFS opcodes that provided the inspiration for extending the CFSMap concept into Elevated-Mesh scenery.
CfsTmap is an MWGfx program and requires mwgfx.dll to run. This will either have been included in the Program distribution or can be found on the MWGraphics website. Regular updates for the Program and for mwgfx.dll can be found there also.
The program will run on any PC with at least a 486 processor and Windows 95. As with any Graphics-based program the more memory you have installed and the more advanced your graphics card the better.
Really requires a minimum of an 800x600 16 bit Graphics Display for reasonable functionality.
CFS is Required to be installed on your computer (or at least the Textures.......)
In order to Create any Scenery from you will need to have installed on your system the SCASM scenery compiler by Manfred Moldenhauer. The CfsTmap archive should contain the latest version (2.39) which will be installed in the CfsTmap folder. The new "Classlist" based mesh options require this latest version but the standard TexRelief method should work with earlier versions.
Unzip the archive to your chosen destination. This will create a "CfsTmap" folder in the location of your choice containing all the necessary program and support files
If mwgfx.dll is included then there will be a file "mwgfxdll.exe" present in this folder. If it is present then run it. If not then you will need to get hold of a copy from the Website unless you already have another MWGfx program installed (in which case you already have it!)
When installing mwgfx.dll you will be offered the chance to change the installation from the default (C:\Windows\System\) - Only change this if your Windows installation location differs from the usual C:\Windows\.
If you want to add a shortcut to the Start menu go to "Start"->"Settings"->"Taskbar & Start Menu"->"Start Menu Programs"->"Add" and browse to the Program.
If you want to add a Shortcut on the Desktop just right-click on a blank area of the desktop and select "New"->"Shortcut" and browse to the Program.
On first running the program it will attempt (by querying the registry) to locate your CFS Folder. The file "090909s1.bmp" will be copied to the "texture" folder in your main CFS folder. This image is used for blank areas in scenery maps.
The first time you run CfsTmap all required paths and settings should be set up Automatically. If problems occur such as no textures being displayed then you should check the various settings in the Prefs menu and make sure they are pointing to valid locations.
The Toolbar across the top of the Program Window contains the main gadgets for setting up and creating an initial scenery
Create | Pressing this button will drop down a list of scenery types to use to create the base scenery. Selecting
one of this will create a new layout in the main window based on the type selected. Selecting "Random"
will create a totally random scenery then attempt to create a Match with the random textures based on the current
Default Texture type |
Perform Match | Pressing this button will cause the program to try to match all the tiles in the layout to each
other. Locked textures will not change but all others are liable to be substituded with a more suitable texture.
Several passes are made through the layout in an attempt to create a 100% match of all tiles to their surrounding
textures. This is not always possible. |
Lat/Lon Position | This collection of gadgets lets you set the location in the world to place the scenery. Set N/S
and W/E using the drop down gadgets. Set the Degrees in the next gadgets and the Minutes (including fractions e.g.
34.7778) in the next boxes. |
ALT | In this box set the height (in Ft) above sealevel of the scenery when it is placed in the location.
Free-Flight to the Area you are going to put the scenery then Slew to ground level (press 'Y' then 'F1' ) and read
off the Altitude value. Don`t assume that areas covered in Water will be zero feet because they frequently aren`t! |
Display Mode | This gadget switches between "Map" mode (where the tiles are displayed as they will appear
in the scenery) and "Elevation" mode (where the tiles are seperated from each other to reveal the Elevation
settings for each corner). When in "Elevation" mode clicking directly on any of the displayed Elevations
will display a gadget for changing the Elevation at that point. Note that the Elevations you set are Elevations ABOVE the base Scenery Altitude |
Scale | This box sets the scale of the tiles when outputting scenery. Any suitable number can be used from
0.1 to 8.0. A scale of 4 corresponds to 1024x1024 metres for each texture. A scale of 1 is 256x256 metres. The
normal textures you see on the ground in CFS are at an equivalent to Scale 4. Only a scale of 4 is recommended and fully supported in all functions. |
Max Rel Altitude | This number is currently only used when the "Randomise to Max Altitude" function is run.
To quickly fill a Layout with random Elevations set this to a suitable value then use the function from the Elevations
menu. Note that the Elevations you set are Elevations ABOVE the base Scenery Altitude |
Move |
This cluster of buttons allows the shifting of the current location to the adjoining location (taking into account the size of the layout) in the chosen direction. When you have finished the Layout you are creating (and SAVED it!) you can click one of these buttons to start a new layout adjoining the current one. As well as changing the Lat/Lon location appropriately the program will flip the existing tiles in the given direction so that the edge adjoining the original layout will contain the last row or column of that layout (bitmaps and elevations) to ease the matching of the edged of the 2 layouts together. It will also Lock all the edge tiles. Once you have created a new layout that matches up to the "Carried over" tiles you can use the Shift menu to move the layout one row/column to remove the carry overs. This will just leave the opposite side to tidy up and you should have a perferct match up. If you are working with a "Single Texture" Layout then you will need to step 4 times in the chosen direction because these layouts are 4 times as big as a normal Layout. See AutoLayout.txt for added info on the Automation of adjoining layouts. |
AutDEM Buttons |
These "S" and "E" buttons work similarly to the Normal WNES buttons but automatically carry out extra functions related to Layout-update and DEM import to ease the work of creating large multi-layout DEM sceneries. See AutoLayout.txt and AutoDEM.txt for more info. |
File | Prefs | Shift | Elevations | DEM | Lock | Tools |
File |
Load Terrain File |
Load a previously created layout into the program. |
Save Terrain File |
Save the current Layout as a terrain file. The saved file includes data about the location and scale of the layout and other details |
|
Save Layout as BMP |
Save a 256 colour Bitmap of the current Layout. This is a leftover from CFSMap but retained so that you can "overview" the layout. TheBitmap takes into account the scale of the layout so that the Bmp can be imported into Airport as a background (at 10 pixels/100m) for assistance in placing further scenery objects for seperate compilation. |
|
View Saved BMP |
Displays the last "Save Layout as BMP" bitmap in a seperate window. |
|
Create Scasm File |
Outputs a scasm SCA source file. Can be compiled with scasm from dos by invoking scasm on the SCA file. |
|
Create BGL |
Outputs a scasm SCA file and compiles it to a finished BGL scenery file. The file dialog will ask for the SCA filename to use. The finished BGL will have the same name but with the .bgl extension. |
|
Create Scasm File (Classlist) |
As "Create Scasm File" but the source code will utilise the new MeshWithTexList() command instead of TexRelief(). This makes for much much smaller scenery files but requires an accompanying Classlist bgl file covering the Area of the scenery and also does not allow rotated Images. |
|
Create BGL (Classlist) |
As "Create BGL" but using the source described above. |
|
Create Scasm File (Single Texture) |
This will create the source for an area 4 times the width and height of a standard Layout utilising a single BitmapClass. Most CFS classes have 7 interchangeable textures. The elevations in the current layout will be stretched over the greater area. Bitmaps in the layout will be ignored. The single class to use is selected from the dialog that appears when you use this function. Like the "Classlist" option this will require a suitable Classlist bgl file covering the scenery area. |
|
Create BGL (Single Texture) |
As "Create BGL" but using the Single Texture source. |
|
Copy BGL to CFS |
Copy the last created BGL file to the CFS scenery folder you desire. Browse to <CFS>\Scenery and then to the desired scenery sub-folder. (\All\Scenery\ if you are not sure or have no Add-on scenery folders) |
|
Run CFS |
Runs CFS so you can test out your new BGL (providing you have set up a valid combatfs.exe path in the Prefs menu) |
|
Prefs |
Select Scasm Location |
Set up the location of scasm.exe for compiling directly to finished scenery BGL. Should be set automatically on first running the program. |
Select CFS Location |
Set up the location of combatfs.exe to enable the direct running of it from the program. Should be set automatically on first running the program. |
|
Select Texture Location |
Set up the location containing the textures to be used for creating layouts. Should be set automatically on first running the program |
|
Allow Rotation.. |
If this is ticked then the Matching routine will also take into account rotated images and the Rotation buttons will be available. If not then only the default textures will be used to find a match and the Tile Rotation buttons will not appear. If you are intending to create Classlist scenery then this option should be OFF as the classlist commands don`t support rotated images. |
|
Use Elevation Interpolation |
If this is ticked then a simple form of interpolation is used when creating the Elevated mesh. This increases the Elevation points per tile from 4 to 9. Currently Elevation Interpolation only works with Normal or Single-Texture Layouts. There is a problem with it with Classlist Layouts so at the moment it is ignored for that type. Note that if you are using multiple layouts in your scenery then they must all be compiled with the same setting or gaps will appear! |
|
Auto Update adjoining Layouts |
If this is ticked then the program will attempt to change the files set in the "Adjoining Layouts" box to match the new position when using the Move buttons to step the layout to a new position. See AutoLayout.txt for mor info. |
|
Compile on AutoUpdate (Classlist) |
If this is ticked then the Auto-routines when using the AutoDEM move buttons will also include compiling the new layout. See AutoDEM.txt for more. |
|
Shift |
|
Use this menu to shift the whole layout by one row or column in the specified direction |
Lock |
|
Use this menu to Lock or Unlock various combinations of Tiles |
Tools |
Classlist Generator |
This will run the MkClass program with which you can create Classlist source or BGL files for use in conjunction with the Classlist or Single-Texture options. |
AFD Generator |
This will run the MkAFD program which lets you create Airfield Menu entries (in the standard CFS Airfield menu) for any Location |
|
Elevations |
Randomise up to Max Altitude |
This will create a random array of relative altitudes between 0 and the number set in the Max Rel Altitude box. |
Set Water to 0m Relative |
This will set all elevation points that have a tile containing any Water adjoining them to Zero (relative to the base scenery altitude). If all 4 surrounding tiles are locked (or not water) then the elevation will not be changed. |
|
Set All to 0m Relative |
This will set All tiles to zero elevation (relative to the base scenery altitude) |
|
Average Elevations |
This will Average every elevation point (except those around the edges of the Layout) with its neighbouring tiles. |
|
Use Tile Types to Randomise |
Attempts to randomise Elevations with regard to the Type of texture. Experimental! |
|
Double/Halve Elevations |
Doubles (or Halves) all elevations in the layout |
|
Import ... Edge Elevations |
This will display a file dialog for selecting another terrain file from which to import the edge elevation for putiing on the selected Edge of the current layout. Example - To set the West edge elevations of the current layout to be the same as the East edge of the next layout westwards.....use "Import West Edge Elevations" and select the terrain file for the layout that is immediately to the Left (West). Just think in terms of the current layout and Import the N,S,E and W elevations by selecting the terrain file adjoining in that direction. |
|
Import/Export Elevation List |
These 2 functions allow the saving or loading of elevation data via simple text files. Useful if you want to make modifications to the current elevation set but want to be able to restore it if things go wrong. |
|
DEM |
Import DEM Elevations |
This will allow the extraction of the "Real World" Elevation data of the current Layout from a suitable GTOPO30 Dem file. The first time you call it during a session you will have to browse and select a suitable Dem file and select the type of layout you are going to create. You can change this at any point. |
Set Zero Elevations to Water |
This will change all the tiles that are zero elevation at all 4 corners to Water (000000s1.bmp) and Lock them. If you fill the layout with "Land" tiles, Import Dem Elevations then select this function rough coastlines will appear for later tidying up with suitable "Coast" textures. |
|
Set Level Elevations to Water |
This works as the above but for tiles that have all 4 corners at exactly the same elevation. As Elevation points are roughly 1km apart any such tile is almost certainly going to be a Lake. The chances of Land being exactly the same elevation over such an area are negligible (unless you have set it yourself for the creation of an Airfield later). |
|
Subtract Scenery Alt from Elevations |
DEM elevations will give the true altitude. If you have checked the area for your scenery in CFS and found that that there is an existing altitude to the ground at that point then you can set the Scenery Alt in CfsTmap and use this function to subtract it from each elevation in the Layout. |
|
Import N and W Elevations from Adjoining Layouts |
This function allows the easy matching up of Layout edge elevations. Because of the difference in the spacing of elevations at different Latitudes discrepancies creep in as you move to neighbouring layouts. If you set the Adjoining layouts as you create each new layout then you can call this function after importing the DEM data (assuming you are starting your multi-layout scenery in the NW corner) |
|
Do All the Above |
This will do ALL the function above here on the Menu in one step |
|
Fill and Do All |
This will unlock all the tiles, fill the layout with the current selected image then "Do All the Above". |
The first thing to do when creating a scenery is to decide where in the world it is going to be.
In CFS there are 2 distinctly different Area types - The "European Theatre" that is fully covered with ground textures and lots of variations in altitude and......."The Rest" covered with a very basic coating of Water, Desert or Forest. You can tell which type you are flying over by the type of textures on the ground. Basicly the "European Theatre" extends from Northern England down to mid-France and across to the Eastern edge of Germany.
In "The Rest" you can create CfsTmap scenery anywhere - it is all pretty level over very large areas. In "Europe" you will need to locate an area of the of the right size that is roughly the same altitude all round the edge of where your scenery is going to go. CfsTmap is primarily intended for the creation of new scenery in "The Rest". There are problems when laying scenery over existing elevated terrain that can make scenery unusable. Elevated mesh within "Europe" will not be Hardened or Landable - the original underlying scenery will still be used by CFS for crash-checking.
While bearing this in mind you can place your scenery anywhere.
Start CFS and go to Free-Flight. Select the rough coordinates of where you want to go and Fly!. Switch to "Slew" mode by pressing "Y" and move around the area (watching the Altitude readout and frequently pressing F1 to keep yourself on the ground if the altitude drops). Once you have selected the rough area go to the SW corner of it and copy the Lat/Lon and Altitude figures down (for entering into CfsTmap)
There are fundemental differences in the way Layouts are placed in the finished scenery depending which Output method you use. Using the standard ("Create BGL") method the Lat/Lon location of the Layout is set from the Bottom-Left corner of the Layout. If you use "Create ...(Classlist)" or "Create.....(Single Texture)" then the Lat/Lon Location is taken to be the Centre of the Layout. It is not recommended that you mix the 2 different types but it can be done if required (see Mixing Scenery Types) . The other difference with the Classlist scenery is that it does not support Texture Rotation.
Start CfsTmap. Set up the Lat/Lon Location gadgets and the Altitude using the data you copied down when in CFS. Set the Scale (a scale of 4 is the right size to match existing CFS ground textures). Note that all Elevations in CfsTmap are "Relative" - they will have the base altitude added to them when creating the scenery.
Decide which output method you are going to use. If Normal then you can switch on "Allow Rotation" in the Prefs menu.If Classlist then you should switch this off to avoid rotated images being used during matching.
Decide what type of basic texture the scenery is going to be (Water, Rural, Woods etc) and click the appropriate type from the "Create" button (or set the Default Texture to the appropriate type and click Random from the Create Button)
Browse the files listed on the Left and insert the textures as desired by bouble-clicking the tile in the layout where you want to put it. After inserting one or more textures click "Perform Match" to attempt to match the new and old tiles together. This may change or remove the inserted textures in the process of matching all the tiles together. If you wish to preserve particular tiles from change (and force the program to try to match the rest) then Right-Click on the Tile(s) so they are outlined in Red and they will be "Locked". To copy a texture from one place to another in the layout Right-Double-Click on the tile (to make it the current selected file) then Double-click in the place(s) you wish to put it.
Once you are happy with the scenery save the map file (File->Save Terrain File). To create a BGL file for use in CFS use File->Create Bgl. To copy this Bgl file into a CFS scenery folder use File->Copy Bgl to CFS
Because of the nature of the CFS default bitmaps they will blend best with each other if not rotated. The main problem with non-rotated textures is the shortage of suitable coastline bitmaps. If you are creating a Water-based scenery (an Island or a Lake) then you will probably need to enable Rotation (at least while working on the coastlines) in order to get a reasonable variety of textures to work with.
If Rotation is enabled then the "Rotate" button under the Thumbnail will be enabled (for rotating the image before inserting into the layout) and also each Tile will have a Rotation button which will appear when the mouse moves over the tile.
If you are intending to create the scenery with the Classlist Option then you should not use rotated images in your scenery..
If you wish to mix Layouts created using the normal (TexRelief) option with ones created with the Classlist option then you need to bear in mind that Classlist Layouts are placed using the Centre point of the layout whereas normal layouts are placed using the Bottom-Left corner as the placement point. In order to get a classlist layout to line up with normal ones you will need to move it half a layout up and right. In order to stop the "Tile Switching" messing up the layout you should do the following (assuming you are working at the default scale of 4). Change scale to 1, use the Layout-Move buttons to move the layout 2 layouts North and 2 Layouts East, set the scale back to 4.
There are problems with adding extra scenery to a scenery created with TexRelief Elevated Mesh. It is best to place static scenery on to a level area so bear this in mind when creating the Elevated mesh . In order for scenery added using Airport you will need to use the Airport Sections->General settings to add a single Synth tile (farm.r8) under the static scenery and set the altitude of the Airport file to the Real Elevation of the mesh you are placing on (find the Real Elevation from Free Flight in the same manner as "Choosing a Location".
This only seems to be necessary when using the standard TexRelief option. If you are creating "Classlist" or "Single Texture" Elevated mesh then the synth tile can be omitted though it is still a good idea to pick (or create) a flat area for the static scenery.
Example - You want to place an Airfield that will cover 3 tiles in the CfsTmap scenery. Set the Corner elevations of ALL these 3 tiles to the same value. Set the Textures to one of the "Grass" textures if you want. Now you can create a normal static scenery with Airport inside this area (3 km x 1 km at scale 4) by setting the scenery Altitude in Airport to the Altitude of these tiles (the "Real" altitude - you will need to find this out by Free-Flighting to the chosen area and slewing to the ground the same as when creating any scenery for CFS with Airport) - set the "Synthetic Scenery" in Sections->General to one tile of farm.r8 and everything should appear correctly.
I have not yet managed to implement "Elevation Interpolation" when using the Classlist commands to create the Elevated Mesh. Hopefully this will be possible at some point.
Experiments with transferring created scenery (TexRelief and Classlist) into FS2000 have shown that it is perfectly possible but major differences in the Visibility Range operation currently interfere with consistent display of the scenery. More research may make an "Export to FS2000" option possible (possibly including remapping CFS textures to FS equivalents).
Updates to CfsTmap and mwgfx.dll will be made available on the MWGraphics website as they appear.
To view the list of updates so for see update.txt
All files in this distribution are (c)2000 Martin Wright except for the files in the Scasm 2.39 Package
Scasm.exe, sclink.exe and all files in the Scasm2.39 folder are Copyright (c) 1995-2000 by Manfred Moldenhauer
No Redistribution in whole or in part without Permission
Scenery created using CfsTmap may be distributed as Freeware.
Any and All Copyrights imposed by Manfred Moldenhauer for Scasm and its accompanying files must be fully respected.