Create inf data without compiling?

This is the Forum to discuss the use of SBuilderX (version 3.10 and above). For previous versions of SBuilder please use the "SBuilder for Flight Simulator FS2004" forum.
Post Reply
Mojave
Posts: 17
Joined: Tue May 04, 2010 10:36 pm

Create inf data without compiling?

Post by Mojave » Mon May 10, 2010 8:47 pm

EDIT: I see that really the only pieces of info I don't have for the INF data are the xDim, yDim values. And they are not consistent that I can tell.


I follow this sequence to create photorealistic scenery. I am joining two outputs from SBX into a single file.

Use SBX (via VirtualEarth) to locate the scenery section I want.
Add a map from background.
Compile to BGL.
Use SBX to get a second scenery section.
Add map.
Compile to BGL.

Then...

Create a merge inf that connects the two scenery sections.
Resample that file to get one BGL.


As you can see, I have to do two unnecessary BGL compiles for the two sections of scenery. All I really want to do is the final merge compile.

But I can't find a way to create the inf data needed without doing the compile.

So this is the long way of asking if there is a way to create the INF data without having to compile the BGL from SBX? That way I could eliminate a step. In addition, if I knew how to get the INF data say from the scenery's txt file, I could write a script to create the merge inf rather than hand copy/paste.

Hope that makes sense!

meshman
Posts: 219
Joined: Sun Jan 01, 2006 11:54 pm

Re: Create inf data without compiling?

Post by meshman » Mon May 10, 2010 10:00 pm

When you make a Map in SBX it stores the BMP and matching TXT file in the work directory. With the Map loaded into SBX, click on the border to get it turn to turn green (highlighting), then right click and select properties. You'll find coordinates, xDim, yDim, rows and columns. All you could ever want for a MultiSource INF file!

The INF file only needs the ULC coordinates, along with the xDim and yDim data. But it doesn't hurt to include the rest.

Also, you mentioned in another thread about having a white border around the edge of the compiled files, which gives gaps (small) in coverage? You aren't telling SBX to include a Blendmask to the Map, are you? This sounds like the default method SBX uses to blend in the photo area.
Lance

Mojave
Posts: 17
Joined: Tue May 04, 2010 10:36 pm

Re: Create inf data without compiling?

Post by Mojave » Mon May 10, 2010 10:30 pm

Thanks for your quick reply.

I'd seen the map properties dialog before but had forgotten about it - duh. So that has the four required values, ULC coordinates and xDim, yDim and I wouldn't have to compile the map to get a INF file, but I would have to manually copy the values out to an INF file. Is there a way to calculate the xDim, yDim values from the coordinates in the TXT file, along with the rows/columns values? That way I could write a script to do it. I've done a little trial and error math (North - South / rows) and the value is close to yDim but not exactly the same.

I want to cut out the step of compiling the two separate BGLS, but having to manual copying the values from the properties dialog defeats that purpose.

As for the gaps around my compiled files... the gap only appears where the bottom of one BGL connects to the top of another. So it doesn't happen left to right. If that makes sense. AND I can only see it in FSX when I am flying right next to the border of the two BGLs. It's a black thin line, not a white border.

Unless SBX defaults to adding a BlendMask, then I'm pretty sure I'm not doing that. I'm certainly not intentionally doing it. There is a blendmask in my Work directory - does it automatically use it?

rhumbaflappy
Posts: 420
Joined: Sat Oct 16, 2004 10:11 pm

Re: Create inf data without compiling?

Post by rhumbaflappy » Mon May 10, 2010 11:28 pm

ulyMap is the North Latitude
ulxMap is the West Longitude

yDim is the distance between pixels in latitude. yDim = ( North - South ) / ( number of y pixels - 1 )
xDim is the distance between pixels in longitude. xDim = ( East - West ) / ( number of x pixels - 1 )

It's one less then the number of pixels because we are counting the spans between the pixels... not the pixels themselves.

Dick
Dick

Mojave
Posts: 17
Joined: Tue May 04, 2010 10:36 pm

Re: Create inf data without compiling?

Post by Mojave » Tue May 11, 2010 2:57 am

I tried dividing by pixels - 1 and I'm still getting different values.

Here is my example:

From the TXT file
North=36.5449494414833
South=36.4566360115963
West=-105.75439453125
East=-105.6005859375

From the INF file
ulyMap = 36.5449494414833
ulxMap = -105.75439453125
xDim = 1.07288360595703E-05
yDim = 8.62435838740391E-06

From the map properties
Number of columns = 1433
Number of rows = 1024

But no matter how I do the math, I don't get those xDim and yDim values. I've tried 1 less pixel, 1 more pixel, etc. I assume those Dim values have to be exact, but what would happen if they were off slightly?

rhumbaflappy
Posts: 420
Joined: Sat Oct 16, 2004 10:11 pm

Re: Create inf data without compiling?

Post by rhumbaflappy » Tue May 11, 2010 4:07 am

I also get values that differ from the SBX' INF file. I'm suspecting this is due to rounding errors in SBX, or perhaps Luis has used a slightly wrong formula.

You need to subtract 1 from the number of rows or columns because you are measuring the distance between pixels... not the size of the pixels themselves.


In a row of 5 pixels

* * * * *

there are 4 spans between them. 5-1. We are seeking the spans.

The error in this instance, by SBX not subtracting 1 from the row or column, is only a very slight error.

Perhaps 0.00000001 degrees ( about 1 millimeter )!

Dick
Dick

Mojave
Posts: 17
Joined: Tue May 04, 2010 10:36 pm

Re: Create inf data without compiling?

Post by Mojave » Tue May 11, 2010 5:11 am

Thanks Dick. I'm going to give that a try - hopefully the slight difference in the xDim, yDim values won't be noticeable. This way I can make the maps and then all the compiling can be scripted. That will save a lot of extra steps, I hope!

BTW, a note to any moderators who might be reading this - the time on this forum is about 10 minutes behind.

Post Reply