Inf file / Resample - Spring and Summer Seasons are solid red

#1
I'm working on a project using resample and an inf file for photo scenery and I keep having a problem. The spring and summer photos are solid red in FSX. The other files seem to be working fine. I have recreated from scratch tonight the Spring and Summer photo files and I am still having the issue. Fall and Winter display correctly along with the water mask and night files. The Spring and Summer are solid red and when viewed at night all of the lights come through as solid red as well. There also is no water mask for those seasons. I've attached some screenshots below and the inf file. Can anyone help me with what's going on here?

Brandon

Screenshots -

1 - Correct Night View during Winter/Fall
2 - Red View at night with Spring/Summer photo
3 - Spring/Summer Photo is solid red
4 - Winter/Fall are correct

Inf photo is attached - (kafw_photo.txt)
 

Attachments

hcornea

Resource contributor
#2
Your Blend and Water mask layers should have

Layer = None
Don't think they should have "Variation = " in them at all.

Just checked one of mine, for the Blend and Water channels:
Code:
Type = GeoTIFF
Layer = None
SamplingMethod = Gaussian
remove the Variation line completely.

The compiler is getting confused, and adding a blended out version (no texture = red) and apparently ignoring the lines afterwards.
 
Last edited:
#3
ok I tried making these changes and no dice...I still have solid red for the summer/spring months. At first I changed the Layer to None and removed the Variation line and the compiler crashed when I ran it. I then added the SamplingMethod=Gaussian line and it compiled but I still am getting the red tile. Photos and the edited inf file are attached...

Brandon
 

Attachments

hcornea

Resource contributor
#4
Is the Geodetic data still in the TIFF files?

(I must say for ease of editing, I usually move the data inot the inf file and just use TIFF)

Are they saved without compression, and without any layers?
 
#5
The tiffs are saved without layers and no compression. These are 30cm orthoimagery so they are quite large files. The Geo data was still with the tiff files but I had also thought about that previously. Just to make sure I AGAIN made the TIFF files from scratch using global mapper. Because of the size of the files the tiles are broken into smaller blocks and I use the global mapper program to make them into one image and also re-project it into the WGS84 format. Anyway I loaded the tiles and made the summer/spring images again and I am still seeing red during those seasons. My next thought is that the tiles that I used for spring/summer are messed up so I'm going to try and make my seasonal variations again from the fall tiles and see if that works. I'm truly at a loss here...everything I try it is still RED!!!!

Brandon
 

hcornea

Resource contributor
#6
The red is what you see when there is data missing.

The usual time I have seen this is when forgetting a month in the seasonal variations.

Sorry, I'm at a loss here.

I usually have the sources in a different order, but I don;t htink that should matter.
 
#7
I for sure have all of the months listed in the inf file...I just re-created the two seasonal images that are messing up from scratch and I am compiling at this time. If this doesn't work then maybe I will change the order in the inf file although I agree with you that it shouldn't matter...especially since the 2 seasons that are working (fall and winter) are at opposite ends of the file. One is source #1 and the other is #7.

Brandon
 
#8
I've learned enough so that I never expect things to go as they should, only as they will.

You might break things down into simpler steps, which would be seeing if your seasonal source compiles correctly. If so, add in the blend mask. If that works, add in the water mask.

Also, the mask files can be very tempermental. Make sure they are in 8 bit grayscale. It's easy to check by file size, these should be 1/3 the size of any of the source files.

I've gone away from GeoTiffs, other than mesh files. Once I have the known coordinates I go and work on the files and save the source as BMPs. When I do any mask files I save these as BMP files and then use IrfanView to convert to 8 bit grayscale.
 
#9
I have never used Channel_BlendMask= and Channel_LandWaterMask= in an .inf, I simply make a new alpha channel which in PhotoShop becomes "Alpha 1". This is the watermask. Then I make another alpha channel named "Alpha 2" and this is the blendmask. That's it, save as .tif, no compression. Resample.exe has always sorted it out from there.

Are you using PS to edit, and how are you putting the geodata back into the .tif if so? I'm with Ian on getting the geo-info out of the .tif and into the .inf.

Jim
 

ollyau

Resource contributor
#10
Only thing I'd suggest is to remove the SamplingMethod=Gaussian from your night variation (I'm not sure you're supposed to have that in the actual imagery layers) and possibly move the blend and water masks to the last two sources (though I'm pretty sure it shouldn't actually matter). Or as Jim said, try adding the masks into the 4th and 5th channels of your images (those are where resample automatically checks for masks).

Also, not to jack the thread, but how are you supposed to get the geodata out of the TIFF and into the INF? I've always relied on the geotags. :p
 
Last edited:
#11
I use FWTools:

gdalinfo "65S_01_WGS84.tif" > "65S_01_WGS84.txt"

...which makes a .txt file with the coords of the upper left and lower right corners. Then I use that and an excel spreadsheet along with the pixel dimensions of the .tif to come up with xDim and yDim. Once you get that set up in your .inf, you can save it 5 times an hour in PhotoShop if need be, and recompile it each time just by dropping the .inf on resample.exe.

I'm pretty sure everyone that's ever figured this stuff out has posted their spreadsheet, but anyway here's mine. It started out for FS9 so "CellXdimensionDeg" is what we now know as "xDim" and so forth.

phototiles_spreadhseet.zip

Jim
 

hcornea

Resource contributor
#12
The other issue is when the TIFF is saved in the wrong format, but I think Globalmapper will only export with 24 RGB, so that seems unlikely.

The gaussian sample for image layers is not required, but won't cause an issue.

The Q is why there is missing data in your Summer variation. Odd.
 

rhumbaflappy

Moderator
Staff member
Resource contributor
#13
Would this work?

Code:
[Source]
Type=MultiSource
NumberOfSources=8

[Source1]
Type=GeoTIFF
SourceDir="C:\Flight Simulator Programs\Scenery Design\Alliance Airport Scenery\Aerial Photos\Projected"
SourceFile="kafw_winter_photo.tif"
Layer=Imagery
Variation=January, February
Channel_BlendMask=7.0
Channel_LandWaterMask=8.0

[Source2]
Type=GeoTIFF
SourceDir="C:\Flight Simulator Programs\Scenery Design\Alliance Airport Scenery\Aerial Photos\Projected"
SourceFile="kafw_spring_photo.tif"
Layer=Imagery
Variation=March, April, May
Channel_BlendMask=7.0
Channel_LandWaterMask=8.0

[Source3]
Type=GeoTIFF
SourceDir="C:\Flight Simulator Programs\Scenery Design\Alliance Airport Scenery\Aerial Photos\Projected"
SourceFile="kafw_summer_photo.tif"
Layer=Imagery
Variation=June, July, August
Channel_BlendMask=7.0
Channel_LandWaterMask=8.0

[Source4]
Type=GeoTIFF
SourceDir="C:\Flight Simulator Programs\Scenery Design\Alliance Airport Scenery\Aerial Photos\Projected"
SourceFile="kafw_fall_photo.tif"
Layer=Imagery
Variation=September, October
Channel_BlendMask=7.0
Channel_LandWaterMask=8.0

[Source5]
Type=GeoTIFF
SourceDir="C:\Flight Simulator Programs\Scenery Design\Alliance Airport Scenery\Aerial Photos\Projected"
SourceFile="kafw_winter_photo.tif"
Layer=Imagery
Variation=November, December
Channel_BlendMask=7.0
Channel_LandWaterMask=8.0

[Source6]
Type=GeoTIFF
SourceDir="C:\Flight Simulator Programs\Scenery Design\Alliance Airport Scenery\Aerial Photos\Projected"
SourceFile="kafw_photo_LM.tif"
Layer=Imagery
Variation=Night
Channel_BlendMask=7.0
Channel_LandWaterMask=8.0

[Source7]
Type=GeoTIFF
SourceDir="C:\Flight Simulator Programs\Scenery Design\Alliance Airport Scenery\Aerial Photos\Projected"
SourceFile="kafw_photo_B.tif"
Layer=None
SamplingMethod=Gaussian


[Source8]
Type=GeoTIFF
SourceDir="C:\Flight Simulator Programs\Scenery Design\Alliance Airport Scenery\Aerial Photos\Projected"
SourceFile="kafw_photo_W.tif"
Layer=None
SamplingMethod=Gaussian
Dick
 
#14
Here's an update...I made an inf file with only the seasonal variations in them and took out the light map and water/blend masks. I at first did it with the channel_Blendmask and channel_Watermast left in there...this compiled however when I started the sim there was nothing there but the default scenery. I then removed these lines from the inf file and compiled. I was able to see all 4 seasons. So I guess there is something with one of the masks or the light map...I'm trying to add them in one by one and see what happens. One interesting thing...the scenery had a small yellowish border around it in the sim without the masks being in there...I haven't seen this before when I've created photo scenery and it looks like the background of the global mapper program. I don't know if that is an issue or not...

I'll keep adding things one at a time and I'm going to keep the water and blend masks in sources 4 and 5 and see what happens.

The strange thing about all of this is that I have done this before with seasons for a different scenery and I used that inf file as the basis for this one so I would make sure I got everything right...I know that inf file compiled the other scenery correctly so I don't know why it's not working here. Oh well...keep trying!

Brandon
 

ollyau

Resource contributor
#15
In each source, you'll want to add NullValue = r,g,b to get rid of the yellow-ish border. Of course, don't actually use r, g and b, but use the RGB values of the Global Mapper background color. After Global Mapper re-projects an image, it leaves its background color in the empty space after being warped (similarly, after reprojecting, FWTools (gdalwarp) leaves pure black (0,0,0), but that's aside the point).

You probably never noticed the edges of the warped image in Flight Sim before because you were using blend masks which made the edges transparent.
 

hcornea

Resource contributor
#16
Note that using an RGB Null value can produce artefact (mainly if any of your imagery happens to have that RGB value) in which case it will be blended out, leaving whatever is underneath (or even worse that red colour you're trying to get rid of!)

For the sake of not compiling the border of the imagery, it is not worth adding a null value if you are using a Blend Mask.

You could consider adding a non-RGB as the null if there is a large area. This won't troubleshoot your current problem, however, so leave it for now.

Back to the problem at hand:

Have you tried Dick's inf file?
 
#17
I have the black edges on all my source .tifs from the FWTools reprojection that ollyau mentioned, so I use NullValue=0,0,0 in all my .infs, but I always select and use "replace color" just after flattening to get the black out of the main imagery before saving as .tif. Otherwise yeah, the compiled imagery will be full of holes where the landclass shows through.

Jim
 

ollyau

Resource contributor
#18
Sorry for continuing the off track discussion, but:

You could consider adding a non-RGB as the null if there is a large area. This won't troubleshoot your current problem, however, so leave it for now.
You can use a non-RGB value in an imagery source's NullValue? What does that accomplish?

I have the black edges on all my source .tifs from the FWTools reprojection that ollyau mentioned, so I use NullValue=0,0,0 in all my .infs, but I always select and use "replace color" just after flattening to get the black out of the main imagery before saving as .tif. Otherwise yeah, the compiled imagery will be full of holes where the landclass shows through.

Jim
What do you mean by "I always select and use "replace color" just after flattening"? Just swap the black color with something else and change the NullValue to match?
 
#19
What I do when I first finish reprojecting a .tif is pull it into PS and use the magic wand tool, additive, with a tolerance of "0", no anti-aliasing, and "continuous" ticked, I click 4 times to select only the black wedges. I then invert the selection and copy/paste that part of the background so that I now have the imagery in a layer with no black edges. I then delete the background for file size reasons and add an all-black color fill layer behind the remaining imagery layer. I save this as my master .psd and all editing color matching and what not takes place above the imagery layer with adjustment layers and so forth.

When I get ready to export a .tif from the master .psd, I Ctrl+Click on the imagery layer's icon in the layers pallette to load it's selection. I then flatten the image and just to make sure the wedges will positively be nulled out, I invert the selection and fill the wedges with black. Then I invert the selection again and do Image > Adjustments > Replace color, click the eyedropper in the black area I just filled to set the color to be replaced (black), "Fuzziness: 0", radio button: "Selection", and then adjust the lightness slider to "+1" which replaces every black pixel in the selected area with 2,2,2 so nothing gets nulled out (except the edges).

Jim
 

hcornea

Resource contributor
#20
You can use a non-RGB value in an imagery source's NullValue? What does that accomplish?
The recommendation is to NOT use both a blendmask, and an RGB null value, or at least to make sure that value appears nowhere in your source. Otherwise you may find impressive red spots in your photoreal scenery. These red spots are "missing data" ... the same problem in the original post.

The purpose of using a null value in combination with a blendmask is to not compile the areas under your blend, and hence reduce filesize. You cannot easily do this with any Rgb value, so it is best to use the actual blend channel "black" to do this. Nullvalue = R,G,B,W,B, or in other words NullValue = ,,,,0 in combination with your blendmask channel.

Everything is in the SDK! Usually only apparent after the 3rd or 4th read.
 
Last edited:
Top