Sign in to follow this  
Guest

black parts

Recommended Posts

Hi,I have a satellite photo , 1m resolution ,1280*960 24 bit.I used it with phototerrain wizard. I lock the resolutins to 1 and 1.then enter the LAT and LON. Then create inf file and run resampler. Resample worked and created 4 images with 256*256 ....Is it right becouse it makes a square with 512*512 but my image is 1280*960.. And if you think this 4 images as each parts of a square divided to 4 my image is mush smaller than 512*512 and it is aligned to right.The left part of this square is black .So the half of the 3 bmp images that resampler create , are all black and when I run scenery in FS , my photo covers a small area ,and there are a big black area too.I hope I could tell my problem. I draw an image to show the files that resampler created. http://www.kilictepe.net/1.gif 4 bmp files as a part of square and yellow are is my original picture. 3 bmp files has black areas as shown.And my second question is what are the differences between photowizard and phototerrain wizards... For what we use photowizard?Thanks For your helpsKenan kilictepe

Share this post


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

Thanks for responding, BobKenan,In order to see what will happen in FS2002, you need to resize your image to 4.8m/pix in a photo editing app (Paint Shop PRO or such) and then load it into TB using PhotoTerrain. You will then see the LOD13 grid overlaying your photo and will be able to determine what will be cut out and what will be left in.Bob's calcs are correct: you need to resize from 1 m/pix to 4.8 m/pix bysimple ratios: xsize*1/4.8 and samo for y size - this means you'll have to drastically downsize your image (a waste, huh?) and you'll lose all that beautiful detail.PhotoWizard is an OLD and unreliable method for PhotoRealistic terrain. It was used BEFORE the SDK was released. It does NOT replace the default textures, but places terrain ON TOP of default textures. The only advantage is that you CAN use any resolution imagery, in your case 1m/pix.PhotoTerrain REPLACES the default terrain textures, but is locked to 4.8 m/pix. The up side is, there are no display problems and almost no frame rate hits.

Share this post


Link to post
Share on other sites

Thanks for your helps.I know its boring to answer same questions again and again and questions that already have answers in forum or documentations so I have read a lot of doc and try to read forum a much as I could.But if you answer my question again I will be glad becouse couldn't find correct answers yet.1-Why in SDK documentation it talks about LOD 14 or 15 ,if there is limitation of LOD 13. Before your reply I didn't know this limitation becouse I think It doesn't write in Ms documentations.2- I found answer of this question :)) 3-I looked at the niagara sample that comes with Custom Terran SDK . There is a file , named niagara_falls_watermask.bmp. Is resample.exe use this file to create bmp's. How can I use watermask files? I know to use alpha channel and tried it in FS. But resample creates a lot of files. Will I give each bmps alpha one by one or its ok if I create a tga with alpha and with it. 4-NiagaraWithSeasons.inf file doesn't work although it's defined as BuildSeasons = 1 becouse it looks for niagara_falls.bmp but there isn't any file like it. So I renamed niagara_falls_su.bmp to niagara_falls.bmp. How must I define file names to create seasons bmps. Must I write all seasons pictures in source part of inf file. 5-I used old resampler.exe as you said but it didn't create any bmp as new one. Is it enough to change format of my default bmp to DX1 or must I rename file to something like 0120302039029su.bmp.Or must I create all bmps manuelly that new resampler does.6-LOD13 is too big for me and I don't want to change areas around my picture. How can I do it? I couldn't use old resample.exe exactly. (question 5) How can I change only a small part?? I tried to take screenshots of all area of LOD 13 than copy my picture in a small part of it but it did'nt work exactly.7- I gave an 8bit bmp to Terrabuilder but it did nothing. When I move my mouse over picture in Terrabuilder it shows altimeter always 1.8- I downloaded a lot of documentation and read lot but couldn't find answers. Is there any web site that I can find datailed documentation ? :) Now I will continuw to read forum :)ThanksKenan

Share this post


Link to post
Share on other sites

Hi Kenan, wow you have asked a lot of questions...I'll give it a try.<<1-Why in SDK documentation it talks about LOD 14 or 15 ,if there is limitation of LOD 13. Before your reply I didn't know this limitation becouse I think It doesn't write in Ms documentations.>>The work we are doing is a type of resampling called "custom". other types also exist, like to produce your own elevations from DEM source data, and for those types of resampling, you can use lod 14 or 15.<<3-I looked at the niagara sample that comes with Custom Terran SDK . There is a file , named niagara_falls_watermask.bmp. Is resample.exe use this file to create bmp's. How can I use watermask files? I know to use alpha channel and tried it in FS. But resample creates a lot of files. Will I give each bmps alpha one by one or its ok if I create a tga with alpha and with it.>>Watermask is a type of designing being discovered and taught by Rhumbaflappy...I haven't learned it myself yet, but it is different than what you are doing here. for "custom" resampled textures, we create water using the alpha mask. sounds like you've already worked some with that. I use Corel Photopaint, but in any graphics program you select the water in your source file and color it black, 0,0,0, and then reverse the selection and paint that white 255,255,255. Save it as your "alpha".I like to make the following subdirectory on your hardrive: "summer", "fall" "spring", "winter", "hardwinter", "lightmap" , and another named "alpha". Under the alpha make subdiretories named "fall", "spring", "winter", "hardwinter", "summer".Now I make different source images for the summer, fall, spring, winter, and hardwinter...if you want to...or you can just leave them all the same if you don't care about seasons. Put the alpha in the alpha, and the lightmap is a source file with night imagry.I make 7 .inf files, all the same except the name of the source image and source dir. After slicing, I put the *.su slices in the summer, and *.sp in spring...etc. The alpha slices get named with *.su, *.sp etc also and those files go into the subdirectorys. They are all identical, but you'll see why in the next step.I have a batch converter written by Elrond Elvish called fstexconvert, it should be available in the library. It has a place to put the "main" file directory, and the "alpha" directory and it will then convert all the slices in that directory to "dxt1+alpha"...it works great. It also will deposit the results in your texture dir. It does, however, only work if the alpha slice name and the main image name are the same.<<4-NiagaraWithSeasons.inf file doesn't work although it's defined as BuildSeasons = 1 becouse it looks for niagara_falls.bmp but there isn't any file like it. So I renamed niagara_falls_su.bmp to niagara_falls.bmp. How must I define file names to create seasons bmps. Must I write all seasons pictures in source part of inf file. >>perhaps I covered this above...hope so..<<5-I used old resampler.exe as you said but it didn't create any bmp as new one. Is it enough to change format of my default bmp to DX1 or must I rename file to something like 0120302039029su.bmp.Or must I create all bmps manuelly that new resampler does.>>your source image is too small....with the new resample it fills any partly filled lod13 blocks with black, which lets it deliver the minimum....which I think may be 4 blocks...one block alone just won't display. Using the old resample, nothing displayed cuz it ignores partly filled blocks.<<6-LOD13 is too big for me and I don't want to change areas around my picture. How can I do it? I couldn't use old resample.exe exactly. (question 5) How can I change only a small part?? I tried to take screenshots of all area of LOD 13 than copy my picture in a small part of it but it did'nt work exactly.>>I'd either read the work by Rhumbaflappy if your really want to do a tiny job, or go ahead and make your source bigger, but use default textures to replace parts of the photo on the outside area. <<7- I gave an 8bit bmp to Terrabuilder but it did nothing. When I move my mouse over picture in Terrabuilder it shows altimeter always 1.>>not sure, sorry...I haven't worked with terrabuilder much..sounds like Misho is about to release a great new version...and he can advise you better than I in using the program.Best of luck..Bob Bernstein

Share this post


Link to post
Share on other sites

Thanks again.And last question :)4.8m/pix How can I find the size of picture that I need to ceover my LOD13 area? I tried 2200*2048 and at last 5000*5000 bmps but there are still black parts ! Or how can I calculate Cell?dimensionDeg for a picture with resolution 2048*2048 for example...Is the size of LOd13 area fixed? I tried to use your excel file to edit inf file manually but didn't work.Still there are black parts.Thanks for your helps...Kenan

Share this post


Link to post
Share on other sites

Hello Kenan,As for the question 7 - about 8 bit images, I believe that resample.exe requires RGB images. This is not a limitation of TerraBuilder, but of Microsoft's tools.If you wish to learn how to exactly define the size of your image so as to avoid black borders, please read the thread below on black borders where Frank Smith gives a very detailed solution.The size of all LOD grids is fixed. Please read the documentation with the SDK where you will learn that a LOD13 grid is 1223 metres at the equator.Best regards.Luis

Share this post


Link to post
Share on other sites

>4.8m/pix >How can I find the size of picture that I need to ceover my >LOD13 area? I tried 2200*2048 and at last 5000*5000 bmps but > there are still black parts !Resizing the imagery won't do a thing, because resampler will reduce it back to 4.8m/pix. If you need to cover the black areas, you need to ADD to your image, not resize it. Or how can I calculate >Cell?dimensionDeg for a picture with resolution 2048*2048 >for example... It's NOT the image size that is important here-it is the image RESOLUTION in meters per pixels that is important. >>Is the size of LOd13 area fixed? Only for CUSTOM (photorealistic) type. LOD13 = 4.8 m/pix>I tried to use your excel file to edit inf file manually but >didn't work. >Still there are black parts. If you use OLD resampler that comes with FS2000 SDK, all the textures where there are black parts (incomplete LODs) will be DROPPED. I prefer this over black areas, and so do many other...

Share this post


Link to post
Share on other sites

Misho, thanks for jumping in here, but I'm afraid you may have mislead Kenan a bit...<>resizing IS an effective way of finally prooving your process, he will not like the imagry and it won't be georeferenced properly, but if he is simply trying to make something appear it will work.<>again I disagree...image size IS important because so far he has not provided a source image big enough to fill the lod 13 blocks. Of course you make sense to me, cuz I know the process...what you meant was that both image size has to reach a certain value AFTER resolution is set at 4.8m/pixel for good looking imagry to appear.>>Is the size of LOd13 area fixed? <<No, he asked about AREA, not resolution....the LOD13 area IS fixed, and I described that math in my first response to Kenan...and its fixed for all types of scenery design. The resolution is also fixed, as you say. Kenan...that's the good news, the bad news is that the "fixed" area is a function of latitude...so you can't use one value around the world.Sorry to make so many disagreements, but if a beginner is going to learn this process, confusion over terms can drive him nuts.

Share this post


Link to post
Share on other sites

Right on all points. I guess sometimes I assume everyone is versed in this...Thanks Bob.I have a quick question: Last night I worked on one of the samples in TB. I used 2-point calibration on a Mt St Helens imagery of a crater that I wanted to overlay onto the default mesh. So I found crater rim features that corresponded to the imagery and read off the coordinates in FS and used that in TB.I tried 3 times - The coordinate readout in TB corresponds to the readout in the FS and everything seems exact, yet the imagery in FS is shifted by about 500 m to the east and 100 m south. (That is, the crater rim does not align with the topography) This is driving me nuts. Any Idea why this would happen?Thanks,

Share this post


Link to post
Share on other sites

Hi Misho.I'm thinking Resample is having it's way with you. ;)In another thread, I've explained wy I'm using a different set of celldimensiondegrees than what MS has told us to use.Concerning Landclass, they have certainly misled us! And I believe we should be using different values for photoreal as well.For a landclass, I'm using this with 100% accuracy:DestDir = "."DestBaseFileName = "TestLC"UseSourceDimensions = 1Type = ClassU8SourceDir ="."SourceFile = "Test256.raw"Lon = -90Lat = 45NumOfCellsPerLine = 256NumOfLines = 256CellXdimensionDeg = 0.014705882352941176470588235294118CellYdimensionDeg = 0.011029411764705882352941176470588My formula is this:CellXdimensionDeg = ( 0.0146484375 / 255 ) * 256CellYdimensionDeg = ( 0.010986328125 / 255 ) * 256so...dimensiondeg = ( degreespan / ( pixels - 1 )) * pixelsThis coincides with the idea that we are marking verticies, not cells with resample, and there is always 1 more vertex than cells ( to surround the cells ). VTP Method2 polys also have a Cell start point that is at 4080 pixels... 4080 / 255 neatly equals 16... so ther is a span of 16 null LOD13 Areas, then 32 active Areas, then 16 more inactive Areas.So the number 255 does have this strange significance.The mesh itself may be suffering dislocation if I'm right about the dimensions!I don't if this is the root of the problem or not. :)Also, I've experimented with 2 point claibration N-S for latitude, then a different 2 point calibration for E-W. It works fairly well, and takes into account the idea there is some distortion of the satellite imagery due to the angle to photo is taken at. Larger photoed areas will also have distortion in the distance due to perspective and lens size!So you may need so 'slide' the image around to get it on the money.Where's a good surveyor when you need one?:)Dick

Share this post


Link to post
Share on other sites

Hi,there is also another phenomenon. On the planar maps and also on the photographs (both original and orthorectified) we always see the convergention of the meridians and the incurvation of the parallels, for example :http://www.volny.cz/stoje/scen/S42.jpgbut the resampler needs the georectified data WGS84, where the meridians and parallels are straight lines. The previous figure after recomputing:http://www.volny.cz/stoje/scen/WGS84.jpgFor the recomputing there are also free tools as the program GRASS.

Share this post


Link to post
Share on other sites

Thanks again but I still miss something.>where you will learn that a LOD13 grid is 1223 metres at the equator.So I am working at about 36" lot.(Turkey) . If its 1223 m long 1223*4.8 = 5871 pixel widht is enough to cover an LOD 13 area. Is'nt it????>provided a source image big enough to fill the lod 13 I create a 8888*8888 bmp file which is about 250Mb and larger then what I need (8888>5871). I create an inf with terrabuilder CellXdimensionDeg = 0.00005404946744674499 CellYdimensionDeg = 0.00004319244424442435But still I have black borders.{Source} Type = CUSTOM SourceDir = "E:ProjectsFSsceneryANTALYAPARTSSEHIR1work" SourceFile = "d1.bmp" Lat = 37.273894 Lon = 30.706111 NumOfCellsPerLine = 8888 NumOfLines = 8888 CellXdimensionDeg = 0.00005404946744674499 CellYdimensionDeg = 0.00004319244424442435 ScaleinMeters = 1.000000 SampleIsCentered = 0 MakeBMP = 0 BlockWidth = 0{Destination] DestDir = "E:ProjectsFSsceneryANTALYAPARTSSEHIR1work" DestBaseFileName = "d1" UseSourceDimensions = 1I think I miss an important point. I have read forum.but why I still have black borders. At last I will edit them one by one :)At last my point is N36:53:24E30:42:22can you send me an inf file and write the size of picture about this area.Or say something like Kenan you are too stupid to build a scenery , leave it.......

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