Sign in to follow this  
LuisFelizTirado

TerraBuilder - Can you spot the fault??................

Recommended Posts

Hi everyone,No-one wanted to know about my 'need to know' message posted earlier, not one e-mail or reply. OK, you were away for a few days, had visitors, a cold or was it a hangover?, well, here it is. This is what I do in TB and it does not work, can you spot the fault? any suggestions?Create TB Scenery/Texture file.Place 512x512 image (test.bmp) in new folder called 'NEW' (C:windowsdesktopNEW)Start TB File/Wizard/Photowizard - browse, select - desktopnewtest.bmp,- open.(Image details - optimised indexed 256_8bit)Chunk size leave at 256 (both) - nextStep 2, Chunks per area block H2, V2, Resolution H-4.78 Locked, V-4.78 locked, click on/activate NW corner box, Max Lat.-34.18945313, Min Longitude 140.625 - NEXT, (Show area grid - on, Show texture grid - on)Step 3, - NEXTStep 4, - place T1 in box, leave rest as is, - FINISHBack to work space with image covering part of area with black border left & bottom. - Filesave as - DesktopNEWPrg1.TBF - enter.Go to Write source code, compile to BGl, click OK-MS Terrain SDK builder, [source] Test512.bmp. [Destination] Test512, no other boxes activated, default control string = -terrainphoto -nogui -e bmp Click 'Resample current setup', Enter .inf name,'NEW'(in 'NEW' folder) - click ENTER..INF file created in DOS window OK, press any key to continue......ENTER.Back to MS Terrain SDK, Click on 'Run Image Tool', DOS window opens, some background activity, message - 'press any key to continue' ENTER - Back to MS Terrain SDK.'Convert TMF to BGL file...' Click button, Test512.tmp is displayed in the 'NEW' file, click Test512 to select file for .bgl, Click OPEN, Open Scenery folder and enter name 'NEW' for .bgl, (= NEW.bgl) & click save. Back to dos window, press any key to continue........ ENTER, back to MS Terrain SDK, click on OK, back to TB workspace. ( I don't think there is a need to click save project again, have done it both ways & can't see any difference.) - Close TerraBuilder.Open 'NEW' folder on desktop. Contents.Test512.bmp, original image, 121230110202002Su.bmp & 121230110202000Su.bmp, both 193kb,these two images represent the Left h/side of the whole image??? (where is the rest? or why are they there?), Test512.tmf file, 7kb. Prj1.TBF. NEW.inf set up information, 1kb. 'Texture' folder, contents, TI000000,TI000001,TI000002,TI000003, all 43kb. Unable to view these in drawing programmes but used the nifty 'TView' viewer & the 4 images make up the original image. 'Scenery' file contents = NEW.bgl.OK - Place 'NEW' folder into FS2002ADDON SCENERY, run FS2002. Go to settings,Scenery Lib.,Add Area, Addon Scenery, 'NEW' - click to add & click OK. File NEW now shows in scenery list. - Select airport,(Oceana,Australia,South Australia,Renmark) and nothing.This is the 'NEW'.inf file that TB changed to .bgl[source] Type = CUSTOM SourceDir = "C:WINDOWSDesktopNEW" SourceFile = "Test512.BMP" Lat = -34.189453 Lon = 140.625000 NumOfCellsPerLine = 512 NumOfLines = 512 CellXdimensionDeg = 0.00005191514756947013 CellYdimensionDeg = 0.00004301146484375629 ScaleinMeters = 1.000000 SampleIsCentered = 0 MakeBMP = 0 BlockWidth = 0[Destination] DestDir = "C:WINDOWSDesktopNEW" DestBaseFileName = "Test512" UseSourceDimensions = 1This 'Ren02'.inf file I used resample.exe for the .bgl & imagetool.exe for the images and it works fine, except for the blimey black borders.[source] Type = CUSTOM SourceDir = "." SourceFile = "Test512.BMP" Lat = -34.211375 Lon = 140.625000 NumOfCellsPerLine = 512 NumOfLines = 512 CellXdimensionDeg = 0.00005193142361109571 CellYdimensionDeg = 0.00004301453124999632 ScaleinMeters = 1.000000 SampleIsCentered = 0 MakeBMP = 0 BlockWidth = 0[Destination] DestDir = "." DestBaseFileName = "Test512" UseSourceDimensions = 1I have spent weeks & weeks trying different variations, image types, sizes etc, so where do I go from here?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

An update.I mention photowizard, which is what I used, I have also used phototerrain umpteen times.I am still working on it and get a grey square, rather rectangle when I use a 1024 sq.image.See ya.Rob Stanford.

Share this post


Link to post
Share on other sites

Hello Rob,I am sure that we all want to help you as much as possible, so please do not get upset. However, we all do have lives, with all the different contingencies. I, myself, live in the Third World and suffer from continuous black-outs - power has been cut off for a week now, so I can not turn on the computer when I want. And, believe it or not, helping you is not my primary concern. Although I am very glad to do so, as is everyone else here.First of all, please do not use PhotoWizizard - it does not work for what you want. Use PhotoTerrain exclusively.At the end of the process, you will have a 66 KB bgl file and numerous 193 KB bitmaps. You can simply declare this in your scenery library if you want.However, we all convert the bitmaps to dxt format - I suppose that dxt stands for Direct-X Transparent, or something similar. This is a Microsoft proprietary format that compress bitmaps with very little loss and permits the addition of transparency channels.Dxt bitmaps cannot be viewed in most image editing software, nor created with them. Get one of Martin Wright's great utilities (available on his web site) or search the AvSim library for Elrond Elvish's wonderful FS Texture Converter. They should allow easy conversion and viewing of your original bitmaps.Any other problems, do not hesitate to ask, but please do be patient. Also, while you are waiting, try taking the time to read previous posts in this forum that may also help you to understand the process better. God helps those ...Best regards.Luis

Share this post


Link to post
Share on other sites

Dear Luis,Thank you very much for your early reply and advice, much appreciated.It was only a month or so ago when I would not have known the difference between a .bgl, an .inf or that there was more than one kind of .bmp, so my enthusiasim is not quite making up for my (computer) illeteracy, but I am learning heaps and have worked this out.Using 'PHOTOTERRAIN' at the end of the process I have the file like you said. I leave it as is but copy the image files into the empty 'texture' folder and then add 'Imagetool' from the Microsoft SDK kit, run DOS to the "texture' folder, then type in imagetool -8 -mip -e bmp *.*bmp It is wonderfull, sit back & watch the little images flick through. I guese this is what you mean?Works with 'PHOTOWIZARD' as well, just delete the files in the 'texture' folder first. I found that the size starts at 512, tried 4096, that slowed things down a bit. Now that I have this sorted out, my turn to Help. anyone wanting a step by step doing this with TerraBuilder & DOS can send me an e-mail.Cheers,Rob Stanford.

Share this post


Link to post
Share on other sites

Great, Rob, glad that you are starting to get good results.Just some small clarifications for anyone who may be reading this and does not have all the elements of the process clearly in mind.TerraBuilder is a front-end for the Micrsosoft Terrain tools, particularly resample.exe and tmf2bgl.exe, that came with the FS2000 (NOT 2002) Terrain SDK. It also contains some old coding (to wit, PhotoWizard) that is no longer valid, and will not produce custom ground textures, so please do not use PhotoWizard.Misho has included some very clear and detailed instructions allowing anyone to make ground textures with no prior knowledge - please follow his instructions. The process is extremely easy and straight-forward, however.Image source - Please use aerial images, not satellite photos that normally do not have sufficient detail for the creation of ground textures (unless you have access to secret intelligence satellites.) Aerial pictures of sufficient quality are widely available on the internet for the U.S., England, Australia, New Zealand. Anywhere else is rather difficult, although if you are connected, government agencies and universities may have these images lying around on a shelf.The image can be of any size whatsoever - there is no need for it to be a multiple of 256. The only condition is that it fully cover a LOD13 grid (see the Terrain SDK documents for explanation of LOD - Level of Detail) which is a little over a kilometre to a side at the equator (1223 metres to be exact.)You do not know if your image covers a LOD13 grid completely? Just import it into TerraBuilder using PhotoTerrain and you will see it in the main window with the grid lines. Any part of your image that does not fill a LOD13 grid will be ignored by the FS2000 resample.exe and will not be converted to ground textures.Or you can get a LOD calculator that will give you the extents on the grid given any geographic cordinate. LOD calculators are available in the various libraries - Bob Bernstein has also put together a very nice Excel spreadsheet that many people like. I have not tried it, but you can ask him for it and he will probably supply it.The new version of the Terrain SDK (FS2002) no longer supplies tmf2bgl - it seems that the new resample.exe creates a bgl directly without any intermediate steps. Some have reported that resample.exe also no longer eliminates parts of the image that do not fill the LOD13 grid, but rather fills in the empty parts with a black border. There may be a new switch for resample.exe that controls this behaviour - please see the documentation for more details.Once you have run resample.exe, you will get a bgl (66KB) and numerous bmp files (193kB) - the bmp files will be named according to a Microsoft coordinate system (for example, 003120200313231Su.bmp) and will replace the default ground textures.Run the bitmap files through ImageTools to convert them to DXT1 format. Or better yet, get some of Martin Wright's fabulous tools (or Elrond's version) that do a much better job and provide detailed explanations on the new image formats.Making replacement ground textures is a very easy and fast (5 minutes) process that anyone can accomplish. The only hard part is finding good pictures and preparing them (coloring, or creating a transparency channel.)Best regards.Luis

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this