Jump to content
Sign in to follow this  
stonelance

Flight Toolkit 1.1.11 (beta)

Recommended Posts

Hi Steve.

 

Airport backgrounds are not a winding issue, as you suspected. It must be the remapping, or a characteristic of the game.

 

Dick

Share this post


Link to post
Share on other sites

I think I see what is wrong.  My conversion code is treating the vector remapping values form FSX as texture set id, but I think it should be interpreted as a new LC, which then looks in the normal LC table to get the texture set id.  For Flight I think this level of indirection was removed, and vector remaps just took the region, remap type and original LC and remapped to a texture set.

 

Edit: Nope, looks like my code is doing the right thing, I just misread it.  I'll need to keep searching.  I have no idea what it could be at this point.

Share this post


Link to post
Share on other sites

Hi Steve.

 

One problem example of the Airport Backgrounds is when an AB poly is over landclass 55 Cool Fields and Woods.

 

    <LandClassToTextureSet RemappingType="Airport" Region="255" Class="55">
      <TextureSetId>280</TextureSetId>
    </LandClassToTextureSet> (core)
      
    <LandClassToTextureSet RemappingType="Airport" Region="255" Class="55">
      <TextureSetId>274</TextureSetId>
    </LandClassToTextureSet> (lclookup-Cold_Climate_Wilderness_LC)

 

But no definition in the FSX lclookup.

 

  117 Small City Suburban Grid Wet
 
    <LandClassToTextureSet RemappingType="Airport" Region="255" Class="117">
      <TextureSetId>280</TextureSetId>
    </LandClassToTextureSet> (Core)
    
    <LandClassToTextureSet RemappingType="Airport" Region="255" Class="117">
      <TextureSetId>274</TextureSetId>
    </LandClassToTextureSet> (lclookup-Alaska_Shared)
    
    <LandClassToTextureSet RemappingType="Airport" Region="255" Class="117">
      <TextureSetId>168</TextureSetId>
    </LandClassToTextureSet> (lclookup_FSX)

 

Here the Small City Suburban Grid Wet properly displays with the AB poly over.

 

42.7971644326867, -88.3726170379668, 871.72802734375

 

Dick

Share this post


Link to post
Share on other sites

What region are you in for LC 55?  There are several airport remappings for LC 55 in the FSX lclookup, just not one for all regions.

 

I was looking at LC 117 from the scenery errors thread on fsdev

Share this post


Link to post
Share on other sites

This is region 1 (B Northern North America). The landclass is fine, but the remapping of the Airport Background is not.

 

Remaps for airports in LC 55 in the FSX conversion are for regions 5, 13, 14. ( And I can find no examples in the games of airports used in these landclasses in these areas!)

 

The worst region is probably region 10, in Ireland. (52.6906127930145, -8.9235076904302, 400m). It looks as though the remapping is it's own landclass (55).

 

 

Dick

Share this post


Link to post
Share on other sites

Hi Steve.

 

I think I found the problem with Airport Backgrounds, and this may have larger consequences.

 

In the converted FSX lclookup.bgl, we have the default Texture Id defined for Region 1:

    <LandClassToTextureSet RemappingType="Default" Region="1" Class="55">
      <TextureSetId>131</TextureSetId>      
    </LandClassToTextureSet>

... but there is no airport Texture Id defined for Region 1. I added this definition to supply the missing Region 1 Airport Background:

    <LandClassToTextureSet RemappingType="Airport" Region="1" Class="55">
      <TextureSetId>168</TextureSetId>
    </LandClassToTextureSet>

...and recompiled the lclookup and replaced it in the FSX World.

 

The result is no more missing airport background for my East Troy Municipal airport.

 

gnhOMDx.png

 

The consequences seem to be this:

 

For all LandClassToTextureSet definitions used, we need a corresponding compliment of Default, Natural, Cultural, and Airport definitions for that Region, or we run the risk of missing textures. (A Region 1 Default definition will need a Region 1 Airport Definition, and possibly Utility, Railroad, Natural and Cultural as well... they seem not to use Region 255).

 

I made sure the TextureSetId was defined already in the lclookup for the Airport, as I don't know if the FallbackId will supply this, and 168 was used for other definitions.

 

I also changed something else...

    <TextureSet id="168">
      <DrawPriority>20</DrawPriority>
      <Texture Region="1" Variation="5" Vulcn="139" />
      <Mask Region="1" Variation="7" Vulcn="900" />
      <LightMap Region="1" Variation="1" Vulcn="0" />
      <Autogen Region="1" Variation="5" Vulcn="139" />

I changed the Variation to 5 in TextureSet id 168, as that's all the number of textures we have for Vulcan 139.

 

Here's a list of Class 55 in the FSX lclookup:

 

RemappingType="Default" Region="0" Class="55"
RemappingType="Default" Region="1" Class="55"
RemappingType="Default" Region="15" Class="55"
RemappingType="Default" Region="10" Class="55"
RemappingType="Default" Region="11" Class="55"
RemappingType="Default" Region="12" Class="55"
RemappingType="Default" Region="13" Class="55"
RemappingType="Default" Region="14" Class="55"

RemappingType="Airport" Region="13" Class="55"
RemappingType="Airport" Region="6" Class="55"
RemappingType="Airport" Region="14" Class="55"

RemappingType="Natural" Region="14" Class="55"

 

Ireland is in Region 10, so that explains the loss of Airport Background textures there.

 

Dick

Share this post


Link to post
Share on other sites

Hi Steve.

As another experiment, in the FSX lclookup, I deleted the Region 10 Airport defintion and added this:

    <LandClassToTextureSet RemappingType="Default" Region="255" Class="55">
      <TextureSetId>131</TextureSetId>
    </LandClassToTextureSet>    
    <LandClassToTextureSet RemappingType="Airport" Region="255" Class="55">
      <TextureSetId>168</TextureSetId>
    </LandClassToTextureSet> 

This re-defines the Region 255 definitions for airport and landclass texturing. It completely solves the Region 10 problems in Ireland, as the Seasons.bgl now controls the textures correctly. And I'm guessing it would work for Region 1 as well. The lclookup-Cold_Climate_Wilderness_LC messes up the definition of the textures by specifying the seasons as:

    <TextureSet id="57">
      <DrawPriority>40</DrawPriority>
      <Texture Region="1" Variation="10" Vulcn="25" />
      <Mask Region="1" Variation="1" Vulcn="25" />
      <LightMap Region="1" Variation="1" Vulcn="137" />
      <Autogen Region="1" Variation="10" Vulcn="25" />
      <Season>1</Season>
      <Season>1</Season>
      <Season>2</Season>
      <Season>3</Season>
      <Season>4</Season>
      <MaskTextureVariation>0</MaskTextureVariation>
      <MaskTextureVariation>1</MaskTextureVariation>
      <MaskTextureVariation>2</MaskTextureVariation>
      <MaskTextureVariation>3</MaskTextureVariation>
      <MaskTextureVariation>4</MaskTextureVariation>
      <MaskTextureVariation>5</MaskTextureVariation>
      <MaskTextureVariation>6</MaskTextureVariation>
      <MaskTextureVariation>7</MaskTextureVariation>
      <MaskTextureVariation>8</MaskTextureVariation>
      <MaskTextureVariation>9</MaskTextureVariation>
      <MaskTextureVariation>10</MaskTextureVariation>
      <MaskTextureVariation>11</MaskTextureVariation>
      <MaskTextureVariation>12</MaskTextureVariation>
      <MaskTextureVariation>13</MaskTextureVariation>
      <MaskTextureVariation>14</MaskTextureVariation>
      <MaskTextureVariation>15</MaskTextureVariation>
    </TextureSet>

It overrides the MildWinter textures, when the Seasons.bgl would have taken care of that.

 

Dick

Share this post


Link to post
Share on other sites

Hi Steve.

 

In 2006, Holger Sandmann developed a spreadsheet for all of the landclasses of FSX, including slopes and regions. http://www.fsdeveloper.com/forum/resources/fsx-land-class-catalog-and-visual-reference.81/

 

It might be better to reorganize much of the lclookup for FSX by using this as a reference.

 

Just taking the landclass 55, there would be problems with future addons to some non-defined regions, and it would also impact airports, railroads, etc...

 

There are over 130 different landclasses used by FSX Up to number 148 i think, but not all numbers used). FSX always assumes region 1 is the "255" region... so we could skip Region 1, make all of them as region 255, and add in the other needed regional variations as listed in Holger's work. Defining the default, airport, cultural, natural, etc, as needed.

 

This would expand the FSX lclookup a lot, but it would help with future addons.

 

Just reorganizing the lclookup's LandClassToTextureSet by Class would make it much more readable.

 

Dick

Share this post


Link to post
Share on other sites

First of all, thank you so much for digging into this.  I think you have found a couple things that I now realize I may have done incorrectly.

 

1) The FSX lclookup doesn't have the concept as far as I could tell of "Default" region like Flight does.  I was trying to optimize the number of entries in the lclookup by combining together multiple regions into one in order to form the default.  However, I didn't realized that FSX treated region 1 as the default.  It may be irrelevant since the FSX lclookup has a complete mapping of every region, but I will look into it.

 

2) Also, as part of the optimizing, I also incorrectly thought that if a entry didn't exist for a remapping type that it would fallback to the default remapping type, but did not realize that will only occur if there is no region="255" entry for that remapping type.  I think I have an error in my logic here, and should always include every remapping type.

 

To test my suspicions I modified the conversion code to not do any optimizations and just output the full set of data.  I then looked at the data and found this mapping:

<LandClassToTextureSet RemappingType="Airport" Region="1" Class="55">

 

<TextureSetId>168</TextureSetId>

 

</LandClassToTextureSet>

 

Which looks correct according to your above post, so it looks like my optimizations are removing a little too much :)


As far as the TextureSet variation, I think 11 is correct.  This number is not a count, but a value from a pattern enumeration.  Here are the values (5 and 11 happen to both have 5 textures):

        Single = 1,                 // 1,Single,1,Only one variation
        ThreeRandom = 3,            // 1,Random 3,3,Three random variations
        FiveRandom = 5,             // 1,Random 5,5,Five random variations
        SevenRandom = 7,            // 1,Random 7,7,Seven random variations
        EightWang = 8,              // 1,Wang 8,8,Eight Wang tile variations
        FifteenUber = 9,            // 1,uber tile 1,15,uber tile
        SixteenUber = 10,           // 1,uber 2,16,uber tile
        FiveParks = 11,             // 1,parks,5,parks
        FiveByTwo = 12,             // 1,golf course,10,5 x 2 layout
        FifteenUrbanUber = 13,      // 1,urban uber,15,urban uber and extras
        FifteenDesertSpread = 14,   // 1,semi desert spread,15,semi desert variation
        SixteenFourKByFourK = 15,   // 1,4 X 4,16,4k X 4k 16 textures
        SixteenFourKByFourK2 = 16,  // 1,4 X 4 no 2,16,4k X 4k 16 textures
        SixteenFourKByFourK3 = 17,  // 1,4X4 number3,16,4k X 4k 16 textures
        ThreeByThree = 18,          // 1,3X3,9,3 x 3 texture

Share this post


Link to post
Share on other sites

Investigating more, it looks like this is the order Flight will search for textures (this is deja-vu as I'm pretty sure I figured this out once before):

 

The order that Flight appears to look for textures is:

1) Region, RemappingType, Class

2) Region, Default RemappingType, Class

3) Default Region, RemappingType, Class

4) Default Region, Default RemappingType, Class

 

So, it looks like I was correct in my original implementation, that if a remapping type is the same as the default remapping type, then I shouldn't need to include an entry in the lclookup for it.  I believe I probably screwed up the implementation though.  Going back and checking through it.

Share this post


Link to post
Share on other sites

Ok, I was able to change the optimization algorithm, and it appears that the airport remappings work now.  I also added code to verify that every Region, remapping, class combination matches the values in the FSX lclookup while following the Flight evaluation order.  I'm pretty confident this will fix all land class mapping issues for the whole world.  Although, there may still be issues with the texture sets.

 

I'm going to try to spend a bit of time trying to figure out why the taxiway signs are not showing up, and then hopefully if that is an easy fix I can release a new toolkit.

Share this post


Link to post
Share on other sites

Dick and Steve, ongoing thanks for all your work on this.  I am sure I am one of many who are thoroughly enjoying what you have provided this community!

 

Warmest regards,

-Bob


Always remember to Find Your FUN!

-Bob

Share this post


Link to post
Share on other sites

Hi Steve.

 

Looking forward to the next version. Good info about the patterning of the TextureSet variations.

 

Dick

Share this post


Link to post
Share on other sites

Steve, thanks for the info. Kudos to Dick for your help in attempting to fix these issues. Looking forward to next toolkit.


Ken

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...