Sign in to follow this  
LuisFelizTirado

FSX Photoreal terrain - problem with water reflection chanel

Recommended Posts

HI,Hopfuly someone else has done this and can shed some light..I have a nice photoreal scenery project with good color data ($$$) and have successfuly compiled it with resample.exe. Now I am trying to get the water/sky reflections to resample correctly and resample will only render a small area correctly and then ignores the rest for some reason.To be clear, I am masking the real water in the photoscene to get reflections NOT the FSX default Water.The SDK says to use 32bit Targa format, yet their melinium sample was 24 bit with a forth chanle with the alpha mask so that is what I did.one I did a small test area it cam out fine when viewed in FSX, so I went ahead and proccessed all of the images for batch conversion as normal through resample but the result was that it only did the reflections on a small area and ignored the rest of the alpha chanel data. THe data is about 6 Gb in size and this was way too much work and now to find that soemthing is wrong...Help?

Share this post


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

An interesting problem. Perhaps there is not enough information for a good diagnosis of the problem. If it is possible, could you give an illustration of what you have done?Perhaps the first thing to check is whether the alpha mask is pure black everywhere you want water effects. It is quite easy to verify your mask for this. Of course, if it is not pure black, then there will be no water effects.Best regards.Luis

Share this post


Link to post
Share on other sites

High Luis,Thank you for the reply.the Mask are pure black 0,0,0 the mask are embeded into the bmp as a fourth chanel just as the SDK melenium example that uses a fourth chanel (R/G/B/Alpha).When I do small area to test using just 2 of some 50 12000x6000 geotiffs all of the alpha/mask works just perfect. But when i try to proccess the whole 50 it only proccess the first tiff with alpha and the remaining 49 ignor the alpha resulting in just one small part of the whole scenery getting the water reflection though it does proccess the whole.So the proccess works somewhat but resample does not seem to like soemthing as it starts the alpha data then just stops.I have tried doing it with seperate mask and referenced those in the inf file according to the SDK but have not had any success. The only success came when I imbeded the alpha as a fourth chanel.I must be doing soemthing wrong as thre are large scenery areas being done by others with the water reflections on the real water imagery.Sigh.

Share this post


Link to post
Share on other sites

A very interesting problem. It has been found that Resample has an upper limit on the number of sources it will process together, somewhere in the order of hundreds, I seem to remember.So, is there also a maximum number of alpha channels that it will accept?I tried compiling a GeoTIFF with an alpha channel, and also a multi-source inf file with 2, 3, 4, and 5 sources, all GeoTIFFs with alpha channels. They all gave good results, and all had a water mask.This is not definitive, of course, since you are compiling 50 sources at once. But, I had no problem with multiple sources and alpha channels in the GeoTIFFs.I did realize something I had not known previously, though. Not being an expert concerning image formats or editing programs, the alpha channel contained in a file is something of a mystery to me. But, when creating the water mask for each GeoTIFF, I did not paint the water part pure black - rather, I selected and deleted that part of the alpha channel, thus creating a transparent area there. So, perhaps if you have painted it black, there is no transparency. Just an idea, since I am no expert in these matters.Best regards.Luis

Share this post


Link to post
Share on other sites

Thanks for the replys.As I have mentioned the mask work, if you do them one tiff at a time, but that is waistful, there will be overlaping bgls. the problem comes into play as soon as I do multi source then it starts to do the water mask and stops with just 60% or so of one of the tiffs alpha water mask working.Luis, when you added alpha did you keep the image at 24bit or go to 32?I stayed at 24bit and it works, just only one at a time.Just a note on the "nullvalue": I have chosen absolute Green as the source data never has absolute green but may have absolute Black or White so this way you don't get any unwanted "holes".Here is the info file:[source]Type = MultiSourceNumberOfSources = 37[source1]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_1.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source2]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_2.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source3]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_3.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source4]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_4.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source5]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_5.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source6]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_6.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source7]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_7.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source8]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_8.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source9]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_9.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source10]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_10.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source11]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_11.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source12]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_12.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source13]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_13.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source14]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_14.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source15]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_15.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source16]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_16.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source17]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_17.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source18]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_18.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source19]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_19.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source20]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_20.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source21]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_21.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source22]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_22.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source23]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_23.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source24]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_24.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source25]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_25.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source26]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_26.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source27]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_27.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source28]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_28.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source29]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_29.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source30]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_30.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source31]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_31.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source32]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_32.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source33]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_33.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source34]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_34.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source35]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_35.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source36]Type = GeoTIFFSourceDir = "mon05"SourceFile = "Mon05_36.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[source37]Type = GeoTIFFSourceDir = "mon05"SourceFile = "mon05_37test2_gf.tif"Layer = ImageryVariation = DayNullValue = 0,255,0[Destination]DestDir = "scenery"DestBaseFileName = "mon05east"DestFileType = BGLSplitFileLOD = 11LOD = AutoCompressionQuality = 85

Share this post


Link to post
Share on other sites

I am using the GIMP, not Photoshop. Does the GIMP even handle 32-bit Targa files? No idea.Anyway, the GeoTIFFs with alpha remained at 24 bit. Here is my multi-source inf file (just like yours, basically):Type = MultiSourceNumberOfSources = 5Type = GeoTIFFLayer = ImagerySourceDir = "."SourceFile = "blendmasktest01a_gf.tif"Variation = DayType = GeoTIFFLayer = ImagerySourceDir = "."SourceFile = "blendmasktest02a_gf.tif"Variation = DayType = GeoTIFFLayer = ImagerySourceDir = "."SourceFile = "blendmasktest03a_gf.tif"Variation = DayType = GeoTIFFLayer = ImagerySourceDir = "."SourceFile = "blendmasktest04a_gf.tif"Variation = DayType = GeoTIFFLayer = ImagerySourceDir = "."SourceFile = "blendmasktest05a_gf.tif"Variation = DayDestDir = "."DestBaseFileName = "blendmasktest"UseSourceDimensions = 1LOD = AutoSo, if you confirm this problem, it may very well be a bug in Resample. You can try for some points with the FS developers by filing a bug report - I think that you can do that at the FS Insider site, or with the Tell_FS mail address.Best regards.Luis

Share this post


Link to post
Share on other sites

Pardon for barging in...I'm attempting to create a water mask for some photoscenery as well (FS9 though).There seems to be a step which I'm either missing, or don't understand.I'm using GIMP, so to create the mask I duplicate the layer (the original bmp) desaturate and invert it and make sure that my water areas get a value of 0 (black).At this point I'm stuck. I know that I should add an alpha channel, not quite sure to which areas though (the water? the whole layer? everything but the water?)And then, I'm not sure how to follow up next. I have two layers (the bmp + mask) but a tga file can't accept layers...can anyone be kind enough to show the way to the noob? :)

Share this post


Link to post
Share on other sites

From the FS 9 documentation:More than likely, the image you want to use will be an aerial or satellite photo. The raw image must be either a 24-bit per pixel Windows .bmp file or a 32-bit per pixel Targa .tga file. For some file formats, you can use Imagetool (found in the Terrain SDK

Share this post


Link to post
Share on other sites

Thanks Luis,I did read the SDK but apparently I'm doing something wrong....I paint my water in black (I use GIMP) add an alpha channel with imagetool (for some reason image tool can't read the tga if I try and add alpha in GIMP) and compile it..The result..I just get a black area instead of a transparent one...Where am I going wrong?

Share this post


Link to post
Share on other sites

Hmmm, very strange. I never used Targa files with the FS 9 Resample, only normal 24-bit bitmaps.Perhaps you could try keeping the original image as a normal 24-bit bmp.Then, make a copy, paint the land white and the water black. Save with another name.Combine using Elrond Elvish' (yes! that is the alias he used) FS Texture Converter v1.03, in the Avsim library. This handy little tool merges the image with the water mask. Thanks, Elrond, with best wishes wherever you are.Best regards.Luis

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