Sign in to follow this  
rhumbaflappy

The Ugly Black Border

Recommended Posts

You are using the resample program that came with FS2002 SDK. If you carefully read Misho's release notes he states that you should use the resample program that came with FS2000 SDK.The difference is that resample FS2000 clips down to the full LOD13 cell within the bounds, while resample FS2002 pads with black out to any LOD13 cell that has anything in it (even if it is just one pixel row).Easy answer done. You can stop reading here if you want.Now for you other question:I do full LOD 8 chunks, but I go through a number of gyrations to get the results I want. You get quite a bit of distortion from the UTM projection that most photos are in. By the time you get a image the size of an LOD 8 chunk it is neccessary to rectify the image. For those of you familiar with map projections, we must convert from the UTM projection to a cylindrical projection.These are the steps I go through.1. Get the image, including coloring if required.2. Mark the corners of the LOD 8 chunk image. Then use the Free Transform command in Adobe Photoshop with the Distort option to square up the image so that the top corners are straight above the bottom corners and the left corners are in line with the right corners.3. Crop the image to the corners and resize the image to 4096x4096 pixels. This resamples the image to exacly the right size so that resample does not have to do any resizing. (Resizing is not neccessary if you are going to use TB to create the scenery and then stop there.) The reason that I resize the image is because of the rounding errors in resample. If you put in the exact lat and lon of the LOD 8 chunk it usually clips to inside the boundary and you lose 1 row of LOD13 textures inside. If you pad your lat and lon enough to make sure you get all of the textures then adjacent areas won't line up quite right. Because of this I use TB to get the BGL file. I take the opportunity at this point to get rid of the marks I put at the corners of the image.4. Run image through TB.5. Use Slicer to cut up the image into 256x256 textures. (That is why I resize an LOD 8 image to 4096x4096.) For an LOD 8 chunk there should be 256 textures. I wrote an excel spreadsheet that I use to create a .bat file that renames the images from Slice to the correct texture names.6. Run the textures through FS Texture Converter and replace textures created by TB with the textures created using Slicer.This is a lot of extra work, but I do it so that the adjacent LOD 8 scenery areas line up. Sometimes they are off about 1 or 2 pixels, but I can live with that. Generally they line up very well. Note: if you are using a watermask you will need to slice that up and place it in the your Alpha subdirectory before you run FS Texture Converter.Sorry if this more than you wanted. I don't want to scare anyone off. It is not neccessary to go through these steps, but it improves the boundaries between scenery areas so that they are invisible.Frank

Share this post


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

Thanks for the quick advice - I am using the 2002 resampler... I *DID* notice that the readme mentioned the "FS2000" version, but I wasn't sure if that was due to the FS2002 version not being available when it was written. Either way, I'll swap over to the FS2000 version (it's in my toolkit of fun) and give that a whirl to see how it goes. Of course, I did get my scenery to kiss the edges of the LOD8 box by the brute force method, but I'll move to the FS2000 version to make things easier and more blendable.Are you making each LOD8 chunk a seperate scenery item, or combining the texture files and BGL's into one?My ultimate goal is to do up all of New England, and maybe work across the country depending on drive space and bordom. :) AND, I have some lofty goals to work up some Annotated Autogen as well - am I sick or what! 1024 individual cells of custom autogen per LOD8 chunk. ...perhaps just the cells around the airport are deserving of attention. :)Regarding projections...I am using TerraScene generated source files, not photographs. Will I see the same types of errors in projection (roads and rivers not lining up between chunks) with that? I'm sure I'll soon find out, but if anyone happens to know, feel free to chime in.Thanks for the help...-Greg

Share this post


Link to post
Share on other sites

Hi Greg.As long as the SHP file data input to TerraScene is the correct projection ( simple lat/long ), you'll have no allignment problems. Your data is probably fine. I did 6 adjacent LOD8 sized areas as CUSTOM projects from TerraScene derived images, and they all lined up perfectly. Even diagonal roadlines met and matched seamlessly at the adjoined edges of the different projects.This is because all GIS line data is vector data and angularly projected. This is a good thing. A bitmap from this makes a great source for CUSTOM.Most images are equidistantly projected.. so a meter is the same distance NS as it is WE. This is a bad thing for flight simulator design. Almost all image source data needs reprojection to be accurate in FS scenery design. A small rectangular area of 6 to 8 slices each way is generally not a problem. A huge area like an LOD8 size is a huge problem for image-based source data. These photos are already stretched to make them equidistant.. so the viewer of the photo doesn't see distortion. Equiangular is very distorted visually, but when FS maps it to the 3D earth, it removes the distortions. When FS maps equidistant photo-image data to the 3D FS World, the photos get distorted!:)Dick

Share this post


Link to post
Share on other sites

I am making each LOD 8 chunk a separate scenery. The naming convention I am using is "AreaXXXYYY" where XXX and YYY are the LOD 8 cell numbers. My goal is to do the entire state of Utah. I must be nuts! If you don't include New York its bigger than all of New England.Frank

Share this post


Link to post
Share on other sites

Just to reinforce the thought:Using the FS2000 resampler, any "partial" LOD13 cell will be dropped, and only those LOD13 cells which are completely filled will be processed. This is why it is recommended that you tell Terrabuilder/resample that your image is just a bit LARGER than your actual LOD8 section, that way your custom textures will go all the way to the very edge of the LOD8 section, and that hair of information you extended beyond the edges will be dropped.I need a few more computers to do all this rendering for me!!!Ack!-Greg(Oh yeah, and technically, New York is not part of New England. :) )

Share this post


Link to post
Share on other sites

Hi all.Here's an INF file that will process an LOD8 sized area. I first generate an imag a bit larger than the extents of the LOD8 Cell I'm interested in... in this case, I make it exactly 1 extra LOD13 Arae all the way around... so the actual TARGA image from Terrascene is 34 x 34 LOD13 areas.; MyLOD8.inf; Slew to N43* 0.000' W79* 0.0000'{Destination}DestDir = "."DestBaseFileName = "MyLOD8"UseSourceDimensions = 0NorthLat = 43.242187500 ; extents of LOD8 CellSouthLat = 42.89062500 ; these should be multiples of LOD13 AreasEastLong = -78.75000000 ; the smallest allowed block is 2x2 LOD13 AreasWestLong = -79.21875000 ; the largest block can be the size of the world;{Source}Type = CUSTOMSourceDir= "."SourceFile = "MyLOD8.bmp"Lat = 43.2531738275 ; this image is 1 LOD13 too big all the way aroundLon = -79.233338948375NumOfCellsPerLine = 4096NumOfLines = 4096CellXdimensionDeg = 1.2156379668049792531120331950207e-4CellYdimensionDeg = 9.1172847510373443983402489626556e-5;; y = ( ( 0.010986328125 * 34 ) / 4097 ) = 9.1172847510373443983402489626556e-5; y = 34 LOD13 Areas of Latitude divided by bitmap "cells" + 1; CellYdimensionDeg = ( Total Image Latitude span ) / ( BitmapY + 1 );; x = ( ( 0.0146484375 * 34 ) / 4097 ) = 1.2156379668049792531120331950207e-4; x = 34 LOD13 Areas of Longitude divided by bitmap "cells" + 1; CellXdimensionDeg = ( Total Image Longitude span ) / ( BitmapX + 1 );This will make a good LOD8 sized BGL, with 1024 textures.The source image can be much larger than this. Just use the formula to compute the correct CellXdimensionDeg and CellYdimensionDeg. And always place the NW Source corner right on the money.Dick

Share this post


Link to post
Share on other sites

..and the question...What is the best way to prevent it from showing up?! I am using LODCalc to define the borders of a LOD8 cell, and creating a terrascene image using those nw/se corners. THen I am using the same measurements in TerraBuilder to do the job - the east, south, and west borders are "flush" with the surrounding terrain, but the north edge has a rather large, almost full LOD13 black row.Does that mean I have to SHRINK (pull south) my measurements up there? Push up? I am confused as to how to make it a perfect edge.If anyone has any pointers for doing full LOD8 chunks of data, PLEASE pass them along! It's the toughest part of using the program!Picture is of the northwest corner of my scenery... (Rhode Island, for those interested)

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