World Wide Guide to FS Scenery Design | Knowledge Bank


Terrain and landscapes

There are a variety of techniques that can be used to create terrain and "textured" landscapes. If you have something to contribute on this topic, please send e-mail to kraybill@vianet.net.au.

Creating terrain using texture files
Creating realistic textures for city areas
Combining two kinds of texture tiles
Creating a special "68" surface in Scenery Maker
Making a "big dot" in Scenery Maker

See also:


Creating terrain using texture files

Q.  I know how to use FS's synthetic scenery blocks, but how do you create terrain using other textures?

Alessandro Antonini of Italy writes:

I use a simple poly covered by a texture. I then scale it to the appropriate size. Below is an example, written for SCASM:
; polygon 1

Area(b 45:12:4 7:39:0 64)
LayerCall(:Taglayer 1)
Jump(:)

:Taglayer
RefPoint(7 :TagPoly 12 45:12:4 7:39:0 V1=0)
SurfaceColor(2 F0)
Points(1
   -5000 0 -5000 ; 1
   -5000 0 5000  ; 2
    5000 0 5000  ; 3
    5000 0 -5000 ; 4
     )

   Palette(eur1.pal)
   Bitmap(eur1_062.eu1 0 0 0 0)

Inst_7D

Poly(a 1 2 3 4)

:TagPoly

Return

EndA

This is a 10000 by 10000 meters poly which is scaled 12 times so that it becomes a 120 by 120 km area. It is covered with the green Europe-1 texture. If you want to have a different effect add

Smoothing(1)
Smoothing(0)

immediately before and after the Poly command. I then put some sparse Synth block just where I need altitude - the synth block is covered automatically by the texture-poly. This way allows me to easily cover large areas and to save huge amount of memory, disk size and framerate at the same time.


Q. What are some ways of creating realistic textures for city areas?

Bill Roccia of Philadelphia, says:

One trick I used in the Philadelphia scenery was to capture images from a Windows based map program, chop them into 256x256 pixel pieces, add textures, and just tile them down into the FS world. This method doesn't require a lot of programming, as I just programmed a bunch of square poly's and inserted the textures. It does require skill with Neopaint. The version of Philly out there now has the major part of the Delaware River from Wilmington to Trenton done with this method. The version I'm working on now has the entire New Jersey coast done with this method. It's not fast, but I think it provides a level of accuracy and detail unheard of with any other method.

I have a program called City Streets for Windows. CSW allows you to set preferences as to what is shown, and the scale is variable. I set the preferences so the only thing showing is roads and water, then capture the image onto the Windows clipboard using Alt-PrintScreen, then paste it into Paintbrush and save it as a .bmp file. This gives me a rough template for the area I'm doing. I open Neopaint, make a new .bmp file of 1024x1024, and paste the bmps from CSW onto it, matching up the edges, and in effect making a large bitmapped map of the area, consisting of roads, waterways, and coastlines.

Neopaint allows you to fill areas with a chosen bitmap. I have taken all the default textures, converted them to .bmps with my R82bmp.zip, modified them slightly to suit me, and saved them.

I take these textures, and "fill" the areas on my image according to what I see in the image, and according to actual knowledge of the area. If the map shows a lot of small streets, I fill the area with my suburb or city texture. All blue areas I fill with my own slightly lighter colored water.r8, etc. Then it's just a matter of chopping the image into 256x256 bitmaps for conversion into .r8s, and tiling them down into FS. Positioning the tiles is made possible by the fact that CSW has a lat long feature, where the cursor position reads off the latitude and longitude. If you know the lat and long of two recognizable points on your .r8, you can adjust your refpoint and scaling factors to make these two points match up with their proper lat and long positions in FS5. Once this is done with your first r8, you code the rest of them around this.

I let the smaller roads stay in the texture, but the major roads I cover over in the texture and add them by my roads method. I only use the bitmap scenery method for small areas that I want super-detailed. In my case, only the immediate area around Philadelphia, and the strip along the NJ coast are done with bitmaps. The bulk of the two states is done with the standard methods.

It would be impractical, if not impossible, to do a large area this way. FS can only handle the display of about 46 bitmaps before things start to dissappear.

At one time I had the city of Philadelphia done with an aerial photo, but I didn't like the results. If you make the scale small enough for the scenery to not be mushy, too many bitmaps are required, and you reach that 46 r8 limit. If you scale it up to use fewer bitmaps, the pixels become so large that it only looks good at altitude.

If you have anything to contribute on this subject,
please send e-mail to kraybill@vianet.net.au.


Combining two kinds of texture tiles

Q.  The synthetic texture tiles look fine when viewed from a certain height, but aren't that great when viewed close to the ground. Is it possible to display texture tiles of higher resolution near the ground and display ordinary tiles when viewed from a higher altitude?

Bill Roccia, of Philadelphia, Pa. USA (e-mail: waroccia@delphi.com) says:

It can't be done with synthetic blocks, but it can be done with texture files laid down as surface polygons or tex polygons. The FarJump08 function in BGLCOMP allows you to set the distance where an object will not be seen. In other words, with FarJump08, you will not see the object until you are a certain distance AWAY from it. You could have your low detail textures using 08, and your detailed textures using FarJump05, and they will change seamlessly. (Similar commands are available in other compilers - Gene.)

You can see this demonstrated in MS New York, where at a distance you see an aerial photo of New York, and at closer range it changes to the texture files.

I've also done a small demo, 08-test.zip, which can be downloaded from FTP.IUP.EDU. [Yes, download it now!] It's part of the New Jersey scenery I'm working on. It puts you at 40,000 ft above Brigantine, NJ. One texture covers the entire area. As you descend to about 30000 ft, the one texture gets replaced by 4 detailed textures of the same area.

Konstantin Kukushkin (e-mail: kukushk@itereu.de) writes:

My Airphoto program uses multiple sets of textures to create photorealistic sceneries. It starts from a high resolution image and creates sets of textures with different resolutions. Lower-resolution textures are used to display far-away parts of the image. The main reason was to reduce RAM requirements (in Airphoto-generated scenery, textures for a 16MB (4000x4000 pixels) source image never require more than 2 MB RAM), to reduce the 'boiling horizon' effect and to increase the frame rate.

The documentation supplied with Airphoto has a more detailed description of how reduced-resolution textures are used. Also, if you can understand SCASM or FSASM code, you might want to look at the code Airphoto generates.

Eduardo Spremolla of Uruguay (e-mail: lalo@terminus.dtdantel.com.uy) adds:

One way is to place a square polygon over a synthetic tile, with very short visibility and textured to good detail. In the Uruguay scenery, you can see the layout of Montevideo city as a textured poly, but if you zoom out it disappears and you see a crude coastline made up of synthetic tiles.

If you have anything to contribute on this subject,
please send e-mail to kraybill@vianet.net.au.


Creating a special "68" surface

Q.  In Schiratti Commander/Scenery Maker, how do I make a 68 type surface (the one used when the shadow is turned on, and for the mats in Airport's tennis.api)?

Alessandro Antonini [e-mail: mailto:a.antonini@leonet.it] of Italy writes:

Scenery Maker doesn't support it by default. You can, however, achieve it by placing hex code directly into the source. This is the code:

Db 0x52, 0x00, 0xCOLORCODE, 0x68

The first two bytes are a SurfaceColor statement, the third one is the surface color, the last is surface type (may be either 0x68 or 0xF0). So, to define a Night Yellow Surface 68:

Db 0x52, 0x00, 0x14, 0x68
Polygon_4( point, point, point, point )

This is equal to Scasm command SurfaceColor( 14 68 )

Db 0x52, 0x00, 0x03, 0x68
Polygon_4( point, point, point, point )

This will give a light grey surface type, instead.

Remember also that you may use hex code in place of standard SM names for colors and variables. For example:

SurfaceColor( Red ) and SurfaceColor( 0x05 ) will give the same output.

GoIfOut( ObjEnd, SceneryComplexity, 2, 4 ) and

GoIfOut( ObjEnd, 0x0346, 2, 4 ) will also give the same output. I find it more confortable using hex numbers instead of SM names, which are hard to remember.

If you have anything to contribute on this subject,
please send e-mail to kraybill@vianet.net.au.


Creating a special "68" surface

Q.  How do I make a big dot in Scenery Maker?

Alessandro Antonini [e-mail: mailto:a.antonini@leonet.it] of Italy writes:

Scenery Maker doesn't support the drawing of "big dots" by default. You can, however, achieve it by placing hex code directly into the source code. This is the basic code:

Dw 0x0028, 0x2000, 0x0001, 0x0019, 0xFFFF

This is equal to the SCASM command BigDot( 512, 1, 25, -1 )

We have 5 unsigned words in this case:

When a word value is higher than 7FFF (32767), the corresponding value will be considered as negative by the FS graphics engine.

To convert between Bytes (or Words) and decimal numbers, you may use a special program (the Windows calculator is OK). Be aware that SM doesn't consider this value if you scale the object (just because you are placing it in hex)!

That means that no matter how you scale the object, the BigDot size and coordinates remain the same. So you have to manually change the word values. My SM objects collection includes full implementation of this.

If you have anything to contribute on this subject,
please send e-mail to kraybill@vianet.net.au.


Last updated 19 October 1996 by Gene Kraybill. All rights reserved.