July 8, 20187 yr I forked ortho4xp on github to try to modify it to support fsx/p3d. It is working, but I am stuck in trying to utilize the masks generated by ortho4xp for creating blend masks with resample.exe Long story short, ortho4xp generates a mask bmp at zoom level 14 which comprises the area in question. No matter what I do, the produced bgl isn't masked properly. Areas that should be masked aren't, and areas that shouldn't are. I know the lat and longs and cellxdimension, cellydimension values in the inf files are correct, because I have generated bgl's utilizing only the satellite photo as the source and a bgl utilizing only the mask photo as the source (as layer type Imagery so it shows up in the sim), and they both line up in tmfviewer in the area of the satellite photo which the mask encompasses (as the mask encompasses a smaller area than the satellite photo).... I am really not sure what is going wrong, I have tried everything, and would really appreciate some help. Do masks of bmp's need to be the same dimensions and lat and long as the bmp they mask? I have tried to use tiffs as masks, and it makes no difference. The only time it worked is when I forced ortho4xp to generate a mask which produced a mask image of the same dimensions and top left lat/lon as the satellite bmp. However, it isn't feasible to do this for high zoom levels because one quickly runs out of memory due to how ortho4xp generates the mask files. Below is an example of an inf file (I can upload the satellite bmp and mask bmp to google drive if needed): [Source] Type = MultiSource NumberOfSources = 2 [Source1] Type = BMP Layer = Imagery SourceDir = F:\ortho4xpvm\Ortho4XP_FSX_P3D\Orthophotos\+25-081\USA_2_11 SourceFile = 864_560_USA_211.bmp Lon = -81.5625 Lat = 27.05912578437406 NumOfCellsPerLine = 4096 ;Pixel isn't FSX/P3D NumOfLines = 4096 ;Pixel isn't used in FSX/P3D CellXdimensionDeg = 0.0006866455078125 CellYdimensionDeg = 0.000618161855902407 PixelIsPoint = 0 SamplingMethod = Point ; pull the blend mask from Source2, band 0 Channel_BlendMask = 2.0 [Source2] Type = BMP Layer = None SourceDir = F:\ortho4xpvm\Ortho4XP_FSX_P3D\Masks\+25-081 SourceFile = whole_tile.bmp Lon = -81.2109375 Lat = 26.115985925333533 NumOfCellsPerLine = 16384 ;Pixel isn't FSX/P3D NumOfLines = 16384 ;Pixel isn't used in FSX/P3D CellXdimensionDeg = 8.58306884765625e-05 CellYdimensionDeg = 7.747928327110458e-05 PixelIsPoint = 0 SamplingMethod = Point [Destination] DestDir = F:\ortho4xpvm\Ortho4XP_FSX_P3D\Orthophotos\+25-081\USA_2_11\ADDON_SCENERY\scenery DestBaseFileName = 864_560_USA_211 BuildSeasons = 0 UseSourceDimensions = 1 CompressionQuality = 100 LOD = Auto,13 Alfredo Terrero
July 8, 20187 yr Example *.inf file and images Blend mask must be in TIFF format 256 colors 8 bits per pixel. Edited July 8, 20187 yr by PanosG Panos Georgotas
July 8, 20187 yr Author Hello Panos, I will check out your example. However, I have created TIFFS from the satellite photo by hand using GIMP to test, and it still doesn't work. What happens is that the mask and the base imagery is completely unaligned, producing very weird behavior. The only time that it worked is when I had the mask file be the same dimensions and cover the same geopgraphic area as the satellite imagery bmp (in fact, In this case the mask file was bmp and it still worked). I am going to upload my satellite imagery to a cloud provider, maybe there is something wrong with my images. When I tried with TIFF, I saved both with and without LZW compression,and still had the same problems. Alfredo Terrero
July 8, 20187 yr Author I tried your tiff. I rescaled it to 16384 x 16384 pixels as the tiffs I need to use are. I set the top left lat and Lon to that of the tiff I need to use as well. The same problem occurred as with my tiffs/bmps. I see some resampling occurring, but the same thing occurs as with The tiffs and bmps I was originally using(ie the mask doesn’t seem to scale nicely on top of the smaller satellite image). The satellite base image is 4096x4096 pixels, and it is as if the first 4096x4096 pixels of the mask tiff are used when resampling. i am not sure why. Maybe I’m misunderstanding how resample works, but I set cellXDimensionDegrees and cellYDimensionDegrees of the mask to be 1/4th that of the values I use for the satellite image. Is this not correct? The mask tiff is 4 times the size in terms of width and 4 times in terms of height, so shouldn’t each pixel represent an increment 1/4th that of the increment in the base satellite bmp? Alfredo Terrero
July 22, 20187 yr Author I gave up and switched to Ortho4XP v1.30 which generates masks for each downloaded satellite bmp at the correct zoom level instead of one large mask for the area at zoom level of 14. It is working fine now. I think the issue is that resample.exe needs the mask and the main image that is to be masked to cover the same physical geographic area. Alfredo Terrero
Archived
This topic is now archived and is closed to further replies.