• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FWTools - transparency?

Messages
1,510
Country
unitedstates
Hello gents, I hope I'm not intruding but I've been following along here and trying to get one of these geotifs into FS9 myself. The problem I'm having is that my reprojected tiff always comes out partially transparent. It seems to work fine as far as processing it through resample.exe goes and I think it's laying the tiles down where they're supposed to be as the roads seem to match up pretty well with my UT roads but it looks awful in the sim obviously.

the tif before reprojection:

geotif.jpg



and after:

reprojected.jpg


Here's the command I used:
Code:
gdalwarp -of GTiff -co "INTERLEAVE=PIXEL" -t_srs "+proj=latlong +datum=WGS84" -r cubic "%remote%\doi1m2009_44116h1sw_usda.tif" "%remote%\kmyl_photo.tif"

Any ideas?

Thanks,
Jim
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi Jim,

That looks weird, seems like some channels got messed up or so. Does the input geotiff you use have any additional channels, like an alpha channel?

I haven't seen before that transparency was added when it was not there in the original source.

The "INTERLEAVE=PIXEL" option might be another area to look. It is required to make a GeoTIFF that the FSX resample can process. But since you are working for FS2004 you might not need this option. I am not sure if PhotoShop can get confused by this different way to store the information. Might be worth a try.
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,932
Country
us-wisconsin
I don't know how you got a geotiff to compile into an FS9 format... that would require a resample from FS9 or earlier, and that resample doesn't support the tiff format.

Dick
 
Messages
1,510
Country
unitedstates
Thanks Arno, yes this particular .tif does have an alpha channel, this is the first I've played with these so I thought that was normal. I'll fiddle with it and remove the alpha in PS and try it again. I never thought about it but I'm sure thats where the problem lies.

Dick, I did a watermask on the reprojected .tif and saved it as a .tga before I ran resample on it in this particular case. Now that you mention it I did try once to run resample.exe on the .tif and found it didn't work. I thought it was something wrong with my .inf at the time, so I'm glad you cleared that up for me.

I'll let you know how it works after I remove the alpha and try again.

Thanks,
Jim
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,932
Country
us-wisconsin
Hi Jim.

For FS9's resample, I'd convert the tiff to 24-bit BMP... and you can give the bitmap the alpha channel to control the water.

You need the NSEW lat's and long's for the INF file, and compute the cell dimensions.

Dick
 
Messages
1,510
Country
unitedstates
Hey, it works!

Yep, that's what the problem was, I killed the alpha channel, stuck the geodata back in and reprojected it and the transparency is gone now. BTW Dick, I caught your thread on the Metrix color matching filter, thanks a million, that's a lifesaver. I used Metrix on this geotif and matched it to the GEPro textures I'm using. My landclass is a little off where it matches up with the photoscenery but you can see part of a "cool irrigated cropland" tile just off the end of the runway in the first shot which matches up with the photoscenery pretty well. This was just a quick test since I got home from work, I think it could be improved a lot with some fiddling.



kmyl_05.jpg



kmyl_06.jpg




I guess I just assumed since maps2bgl used .tga's that's what I was supposed to use. I guess the niagra.bmp sample in the terrain SDK should have been a dead giveaway :) . That's actually what I did, but since I did the water mask I saved it as a 32 bit .bmp in PS and just opened it up in Imagetool to convert it to .tga. An unnessary step as it turns out. :cool:

On the cell dimensions I actually did up a spreadsheet a while back that apparently works (now that I've got the reprojection to WGS84 figured out) judging by the way the photo roads & water line up with their Ultimate Terrain counterparts. I've been messing with this for days actually on and off, I didn't understand the reprojection thing and I kept placing pushpins in google earth for lat & lon and cropping the .tif where the pushpins were and then recording the coords in the .inf. I tried a bunch of GIS apps and didn't have any luck with those either. What a mess. Don't read the instructions Jim, whatever you do. I must have tried 20 times but I couldn't get those friggin roads to line up no matter what I did :) . My .tif was NAD83 projected. I got tired of the math during that comedy of errors so I made the spreadsheet. I've attached it in case anyone wants to use it, apparently it works?

Thanks for the help guys,
Jim
 

Attachments

  • phototiles.zip
    2.3 KB · Views: 332
Top