Sign in to follow this  
rhumbaflappy

FS2002Pro - Creating Custom Terrain Textures

Recommended Posts

Misho and other FlightSim gurus,In reference to my earlier post this week:wanting to import a bitmap into flightsim2002pro as a texture or sceneryHave went through the MSFS2002Pro SDK "Niagara Falls" example as instructed by Misho. After reading the "Creating Custom Terrain Textures" I went through the step by step process for the Niagara example, using the resample program from DOS. It provided an excellent means to accomplish putting my one file bitmap into flight sim without even having to use TerraBuilder. 2 QuestionsIn adobe photoshop 7.0, how do I reduce my raw image, http://www.wrinn.com/terrabuilder/to the required 24 bit, this is troubling me, and I am no graphics expert. Basically I am having the hardest time with this. Within the .inf file that I run resample on, the SourceFile = "my bitmap". I ran resample yesterday on this image(even though it was extremely huge and high resolution, and it batched prcessed for about thirty minutes. The end results was a million bitmap files in my "Destination" directory. I know this is not right. Note: That I ran this with my destination directives> UseSourceDimensions to 0 in my .inf file. All I want is a basic image of Fort Rucker and am not sure of the width and height that is required in the image. Here is my .inf file, I attempted to modifty the niagara falls example.;; niagra.inf -- Sample INF file for FS2002 SDK.;; To use, run the following commands from directory containing this file:;; mkdir fortrucker ; mkdir fortruckerscenery; mkdir fortruckertexture; resample fortrucker.inf; tmf2bgl fortrucker.tmf sceneryfortrucker.bgl; imagetool -terrainphoto 0*.bmp; copy *.mip texture*.bmp;; In FS2002, go to the Scenery Library and Add this area [Destination] DestDir = "c:fortruckersourcefortrucker" DestBaseFileName = "c:fortruckersourcefortrucker" BuildSeasons = 0 UseSourceDimensions = 0[source] Type = Custom SourceDir = "c:fortruckersource" SourceFile = "fortrucker.bmp" Lat = 43.09187107354186 Lon = -79.084149661936578 NumOfCellsPerLine = 419 NumOfLines = 400 CellXdimensionDeg = 9.594888067660175E-005 CellYdimensionDeg = 7.3660695441155573E-005

Share this post


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

It looks to me like the problem is your source file is too small. Your source must completely fill an LOD13 grid. While this pixel dimension should be bigger than a grid, It totally depends on where your nw corner lies with respect to the grid intersection, whether most of these pixels will be counted against filling the intended grid or fewer.Way back we played with seeing if the custom flag would work with only one texture, no one succeeded. If photoshop 7 is the same as previous versions, use the image drop down, select "mode". choose rgb color, this is 24 bit. Resampling is done using image size command from the same drop down.so, bottom line is you need more source material. And if your deg/pixel is that small, its a clear indication that your resolution is much higher than you want. BTW, imitating the Niagra example may not be such a good idea, many problems existed in it. Here is my own inf for my current project, perhaps it will help as a guideline for what works.[Destination]DestDir = "C:airphotoharveyground"DestBaseFileName = "class"UseSourceDimensions = 1WithSeasons = 1[source]Type = CUSTOMSourceDir = "C:airphotoharveyground"SourceFile = "h23.bmp"Lat = 47.94171946Lon = -122.1930231NumOfCellsPerLine = 2473NumOfLines = 1912CellXdimensionDeg = 5.89744E-05CellYdimensionDeg = 4.24431E-05ScaleinMeters = 1SampleIsCentered = 0

Share this post


Link to post
Share on other sites

Hi martintwrinn.UseSourceDimensions = 0should read...UseSourceDimensions = 1That's what causes the endless resampling.But I think there is a problem. As Bob indicates, the bounds of your source image needs to be large enough to display complete LOD13 Areas. The minumum size that will display ( with the OLD resample ) is a 2x2 LOD13 size. The source should be slightly larger than this.You should be using the OLD resample, but that produces only 2 bitmaps. The NEW resample produces 12 bitmaps, but these will have blackborders.The pic shows the results of the NEW resample. The red lines are the LOD13 Areas. The green lines mark what the OLD resample makes... but the BGL won't display them. As I said, a 2x2 square of textures is the minimum. That is about 0.02197266 Lat span by 0.02929688 Long span.. and only then is alligned exactly on the LOD13 borders. Old resample here only gives you 2 complete bitmaps.I don't know if your source file is alright, because you've displayed this at Niagara Falls. If you give us the exact georeferenced bounds of your image, we might be better able to help. I suspect your image may be too small, but as Bob wrote, the depends on it's positioning.For example, if that NW corner reference point was slightly eastwards, you would have filled 4 complete LOD13 Areas, and then it would have displayed at least those 4 bitmaps. That's due to positioning.Also, if the cell span was increased slightly, then 4 LOD13 Areas would have been completely filled, as the image size would have expanded during resampling. That's due to size.Dick

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