Sign in to follow this  
Guest Royalp

Editing the image

Recommended Posts

Hi,I hope that some of you out there will have some experience with this Terra Builder scenery issue and will be kind enough to advise me.I have finally got the program to understand my co-ordinates, adjusted the resolution and am ready to go if I can solve this last problem. Under "scenery issues" it says that top,bottom,left and right edge will be discarded, exit and edit the image. I see that my image sits between the grid lines so am I right in assuming that I have to trim my image to sit exactly in line with this grid in which case how do I work out accurately how much to take off? its very hard to judge!Is there a formular to work to? or am I on the wrong track and the editing involves something else?I really would appreciate some help here!regards Peter.

Share this post


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

In the "Scenery Issue" Text file, it should say precisely how many pixels to trim off the top bottom left and right edge of the image.

Share this post


Link to post
Share on other sites

Hi Misho,Thanks for your reply,Unfortunately the "scenery issues" does not appear to give me that info.It states something like "top edge will be discarded, Suggestion exit program and edit photo." (and the same for the other three sides)Problems remaining 4.Is there a reason that the info is not showing?regards Peter.

Share this post


Link to post
Share on other sites

can't you just offer your users a path to the fs2000 resample.exe as an option, then trimming will not be needed.Bob Bernstein

Share this post


Link to post
Share on other sites

You are right, it suggests only the resizing numbers for 4.8 m/pix constraint. The only thing I can suggest is to note carefully where the LOD lines run across the image and crop along that area, then re-load the project.Or, conversely, as Bob suggested, use Fs2000 resample.exe (I am NOT sure where to get it though - anyone?) which will DISCARD the edges that do not cover the LOD grids completely.

Share this post


Link to post
Share on other sites

Hi Misho and Bob,First, thanks for your suggestions they are much appreciated.I have downloaded the 2000 resample.exe but I am not to clear what to do with it as the MS instructions talk about command promts and code, not really my field. As to editing the image, how much tollerance does FS allow either side of the LOD lines before it is necesary to edit them?. I have experimented with slightly adjusting the Lat/Lon figures and this moves the image slightly, but I can't seem to get the scenery to line up exactly, its either one side or the other. I can only imagine that the tolerance must be minimal!I assume that the LOD lines are locked into the world map coordinates and depending on the lat/lon of the picture is where the scenery sits on the lines? I have taken a screen shot showing the LOD lines over my scenery and will try and blow up the view to see if I can trim it.One suggestion Misho, it would be good if your program left a line on the photo's edges to cut to.thanks again,Peter.

Share this post


Link to post
Share on other sites

I'm going to guess that you just need to replace your current file resample.exe with this one.do a search on your harddrive for resample.exe.When you find it, rename the file something like resample.2k2. Then extract your fs2000 version file named resample.exe into that same folder.Now terrabuilder will call the older file.And the beauty of the older file is that it just ignores imagry that extends past the lod13 border, so no trimming is needed...no precision positioning of the edge of the file with respect to LOD 13 boundarys is needed.Bob

Share this post


Link to post
Share on other sites

Hi Bob,Did as you suggested, but it appears that I used the 2000 resample exe originally, but thanks for the suggestion. I did some experimenting and now find that even the Niagra falls demo will not run in this version of Terra builder. Despite of several careful attempts its comes up with simular problems as my scenery failing to fit the scenery within the LOD lines (despite of working fine originally a couple of months ago!) I feel that maybe the program has become corrupted in some way. Do you have a prefered version? I am running V1 97-08 2.0 Beta. Alternatively do you know of any payware programs that will do the job?regards Peter.

Share this post


Link to post
Share on other sites

Peter, quite honestly I just write the inf file myself and run resample.exe directly. It seems as easy to me and I have direct control over the situation that way. You need to have at least two points of known latitude and longitude if you want to do it my way. Two airports can work, even two ends of a runway can work, thou if you don't have a runway that is nicely angled, you can have a little difficulty.with that you can determine degrees per pixel by comparing the pixels in the photo of the distance between the two points to the difference in degrees, one calculation for latitude, and one for longitude. Now if you decide where you want to place the nw corner of the scenery, find a point beyond the first full lod13 grid, you can calculate its longitude/latitude by measuring the number of pixels from one of your known points to the nw corner point, and then mulitplying the deg/pixel factor times that many pixels. make sense?the inf file looks like this:[Destination]DestDir = "C:airphotoeofbow"DestBaseFileName = "class"UseSourceDimensions = 1WithSeasons = 1season = lm[source]Type = CUSTOMSourceDir = "C:airphotoeofbow"SourceFile = "b2lm.bmp"Lat = 47.01672078Lon = -123.9258492NumOfCellsPerLine = 7000NumOfLines = 2150CellXdimensionDeg = 5.24654E-05CellYdimensionDeg = 3.6E-05ScaleinMeters = 1SampleIsCentered = 0the first part is pretty obvious, right? the dest base file becomes a tmf file, which you then compile into bgl by using the fs2000 utility tmftobgl.exethe magic is in the second part. but uv already done the work! the lat long for the nw corner you figured is your lat and long lines 4 and 5 in this section. the next two lines are the width (x) and height (y) of your source image in pixels. Then comes the two degrees/pixel factors you calculated.once you fill in your inf properly, then save it in the same folder as resample.exe and tmf2bgl.exe. use a command prompt...and type "resample peter.inf", without the quotes. you'll get peter.tmf and scads of textures (depending on the size of your area). compile peter.tmf using the command "tmf2bgl peter.tmf". Now you'll get peter.bgl.put peter.bgl in a scenery folder, and the textures in a texture folder, and load it in the sim! you'll be flying over your pix. the command "withseasons=1" in the source portion of the inf sets the bgl to expect other seasons. in this example, I compiled with season=lm...the light map. probably not what you want to learn with. change that to season=su, or just delete that line altogether. THen you'll get summer textures, a good place to learn.the texturs will all look like this:000333112021223su.bmp I made the numbers up for this example. the su is the summer, the other seasons are sp, fa, wi, hw, and lm for night. you'll need all of them or you'll see grey squares on your ground in that season....that is, if you don't give if fa textures, you'll see good scenery until its fall, then youll see grey squares.You don't need all seasons, however to learn this approach. if you want you can simply change withseasons to be =0, in which case you'll only get summer textures.Good luck!BobPs...this is what is really going on behind the scenes in this part of terrabuilder. The difference is if you learn to do it by hand, you'll always be able to figure out what's wrong if it doesn't work.Then, if you want, you can return to terrabuilder for the automation of some of the calculations, and you'll really feel more confident in what's going on.

Share this post


Link to post
Share on other sites

Hi Bob,Yes I will give it a try but need a little advise on the calculations.I have a nice angled airport and can get the co-ordinates of the two opposing corners but I am not to sure about calculating the degrees from there? sorry if I seem a bit a bit slow with this part! Apart from that it all makes sense though how do I have a water bitmap to add, how do I do this?regards Peter.

Share this post


Link to post
Share on other sites

Peter,<>in what units of measure? lat/long coordinates?<I make a water mask of my main image. Assuming you have good imagry software this is pretty easy, painting the water areas pure black, rgb 0,0,0, not using any antialiasing or feathering. reverse the water selection and paint the Not water areas pure white, rbg 255,255,255Then make a copy of the inf file from before. Rename the source file to be this new water mask filename. resample as before. This time discard the tmf file, and simply store the image slices in a special folder. Assuming you put the original photo slices in its own folder, you should have the same number of files in each folder, all with the same names.Elrond Elvish wrote a neat utility to combine the contents of the two folders into one. called FS Texture Converter. http://library.avsim.net/index.php?CatID=fs2002utilit has a place to enter the above folder locations, and then does a batch convert. use DXT1 + Alpha as the save as. The alpha channel will be interpreted by fs as water.Bob

Share this post


Link to post
Share on other sites

Hi Bob,Hope I'm not jumping the gun here but from what I think I have read you suggest to let resample crop and resize the image?Images should as a rule always be resized before using resample with a decent program Like Adobe-PS or the like, or if you want the best results use a Lanczos3 filter as found in Thumbnailer. Resample gives very poor results when resizing!hope this helps.

Share this post


Link to post
Share on other sites

Hi Paul, your help in describing this process is welcome. I agree that pre-sizing of the image produces better results.Merry Christmas!Bob

Share this post


Link to post
Share on other sites

Hi Paul,I started of this current topic but still seem no wiser. While I agree with you that the image has to be sized pre to being processed, my question remains un-answered, how do I work out how much to trim or add to my image to get it to work withinTerraBuilder. The author can't tell, so how am I to work out what size it should be??????????? kind regards,Stuck up agaist a brick wall,Peter.

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