Jump to content
Sign in to follow this  
stonelance

Converting FSX content to Flight

Recommended Posts

Hi there

New member here - I hope this is the right place to post. I'm definitely having some problems converting FS-X to Flight.

Background - long-term user of Flight, but I never dreamed there was another world still living and breathing Flight! I've only just, in the past few weeks, discovered all the add-ons and extras that can form part of Flight. I've steadily been adding new aircraft etc to my installation.

Problem - adding the world. I discovered the 'World Region UI' through the Flight AddOn Manager, but all that seemed to give me was a brownish mush everywhere outside Hawaii and Alaska. Then I discovered the FS-X scenery conversion idea. So I put down my money in Steam and acquired FS-X. Installed this with no further add-ones and it works OK. Next came the ContentConverter to get what I assume will be the FS-X world in to Flight? And this is where my error crops up.

Initially the ContentConverter failed after -

...
...
 Loading BGL file index: 'C:\Program Files (x86)\Steam\steamapps\common\FSX\Scenery\EURW\scenery\lisbon.bgl'
  Loading BGL file index: 'C:\Program Files (x86)\Steam\steamapps\common\FSX\Scenery\EURW\scenery\London.bgl'
  Loading BGL file: 'C:\Program Files (x86)\Steam\steamapps\common\FSX\Scenery\EURW\scenery\London.bgl'
  Loading MDL...
  Determining optimal material set

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at DetermineMaterialShaderPipeline(Model* , Material* )
   at FlightToolkit.OptimizeMaterials(Model* pModel, ConversionOptions* pConversionOptions, unordered_map<int\,int\,std::hash<int>\,std::equal_to<int>\,std::allocator<std::pair<int const \,int> > >* mapOldToNewMaterials, vector<MDL::Material\,std::allocator<MDL::Material> >* vecNewMaterials, vector<int\,std::allocator<int> >* vecMaterialVertexDataFlags)
   at FlightToolkit.ModelConverter.ConvertMDL(Stream stream, String path, IEnumerable`1 textureSearchPaths, String tspName, ILogger logger, OutputTextureFormat outputTextureFormat, Boolean useMDLGuidAsMaterialVariationID, Boolean modelOnly)
   at FlightToolkit.SceneryConverter.ConvertFSXSceneryToFlight(String fsxSceneryCfgPath, String fsxTerrainCfgPath, String outputRootPath, HashSet`1 filesToSkip, HashSet`1 vegetationGroupings, IEnumerable`1 lclookupBgls, ILogger logger, IProgress`1 progress)
   at ContentConverter.Program.Main(String[] args)

C:\>

That was running Win 10 Home with Command Prompt in Admin mode.

I assumed the 'memory is corrupt' suggestion referred to my own PC, so I ran mdsched.exe and no memory problems were found. I changed the output to a different physical disk and the same problem recurred. I tried changing other items but they all failed at the same point. Finally, I tried Command Prompt not in Admin mode, and removed the "/a" parameter from my command line. This time the process appeared to continue longer but still failed with -

Loading MDL...
  Determining optimal material set
  Converting MDL ('lon_hammersmith': 2828ab56-ab35-4934-a892-3212561d4fbc) to Flight .Model...
  Converting textures...
  Converting materials
  Creating material variation
  Writing asset 'D:\FlightTemp\FSX World\materialVar\lon_hammersmith.materialVar' (1 of 6)
  Writing asset 'D:\FlightTemp\FSX World\material\lon_hammersmith_Material_0.material' (2 of 6)
  Writing asset 'D:\FlightTemp\FSX World\material\lon_hammersmith_Material_1.material' (3 of 6)
  Writing asset 'D:\FlightTemp\FSX World\model\lon_hammersmith.model' (4 of 6)
  Writing asset 'D:\FlightTemp\FSX World\texture\LON_Hammersmith.dds' (5 of 6)
  Writing asset 'D:\FlightTemp\FSX World\texture\LON_Hammersmith_LM.dds' (6 of 6)
  Loading MDL...
  Determining optimal material set

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at DetermineMaterialShaderPipeline(Model* , Material* )
   at FlightToolkit.OptimizeMaterials(Model* pModel, ConversionOptions* pConversionOptions, unordered_map<int\,int\,std::hash<int>\,std::equal_to<int>\,std::allocator<std::pair<int const \,int> > >* mapOldToNewMaterials, vector<MDL::Material\,std::allocator<MDL::Material> >* vecNewMaterials, vector<int\,std::allocator<int> >* vecMaterialVertexDataFlags)
   at FlightToolkit.ModelConverter.ConvertMDL(Stream stream, String path, IEnumerable`1 textureSearchPaths, String tspName, ILogger logger, OutputTextureFormat outputTextureFormat, Boolean useMDLGuidAsMaterialVariationID, Boolean modelOnly)
   at FlightToolkit.SceneryConverter.ConvertFSXSceneryToFlight(String fsxSceneryCfgPath, String fsxTerrainCfgPath, String outputRootPath, HashSet`1 filesToSkip, HashSet`1 vegetationGroupings, IEnumerable`1 lclookupBgls, ILogger logger, IProgress`1 progress)
   at ContentConverter.Program.Main(String[] args)

I'll be honest. I'm at the limits of my knowledge here (and perhaps a bit beyond!) - I've no idea what this is actually telling me or how to remedy it.

Any suggestions on what to try (or additional symptoms I should have reported) are very welcome.

Thank you in advance

Walter

Share this post


Link to post
Share on other sites
46 minutes ago, Walter Eagle said:

Hi there

New member here - I hope this is the right place to post. I'm definitely having some problems converting FS-X to Flight.

Background - long-term user of Flight, but I never dreamed there was another world still living and breathing Flight! I've only just, in the past few weeks, discovered all the add-ons and extras that can form part of Flight. I've steadily been adding new aircraft etc to my installation.

Problem - adding the world. I discovered the 'World Region UI' through the Flight AddOn Manager, but all that seemed to give me was a brownish mush everywhere outside Hawaii and Alaska. Then I discovered the FS-X scenery conversion idea. So I put down my money in Steam and acquired FS-X. Installed this with no further add-ones and it works OK. Next came the ContentConverter to get what I assume will be the FS-X world in to Flight? And this is where my error crops up.

Initially the ContentConverter failed after -


...
...
 Loading BGL file index: 'C:\Program Files (x86)\Steam\steamapps\common\FSX\Scenery\EURW\scenery\lisbon.bgl'
  Loading BGL file index: 'C:\Program Files (x86)\Steam\steamapps\common\FSX\Scenery\EURW\scenery\London.bgl'
  Loading BGL file: 'C:\Program Files (x86)\Steam\steamapps\common\FSX\Scenery\EURW\scenery\London.bgl'
  Loading MDL...
  Determining optimal material set

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at DetermineMaterialShaderPipeline(Model* , Material* )
   at FlightToolkit.OptimizeMaterials(Model* pModel, ConversionOptions* pConversionOptions, unordered_map<int\,int\,std::hash<int>\,std::equal_to<int>\,std::allocator<std::pair<int const \,int> > >* mapOldToNewMaterials, vector<MDL::Material\,std::allocator<MDL::Material> >* vecNewMaterials, vector<int\,std::allocator<int> >* vecMaterialVertexDataFlags)
   at FlightToolkit.ModelConverter.ConvertMDL(Stream stream, String path, IEnumerable`1 textureSearchPaths, String tspName, ILogger logger, OutputTextureFormat outputTextureFormat, Boolean useMDLGuidAsMaterialVariationID, Boolean modelOnly)
   at FlightToolkit.SceneryConverter.ConvertFSXSceneryToFlight(String fsxSceneryCfgPath, String fsxTerrainCfgPath, String outputRootPath, HashSet`1 filesToSkip, HashSet`1 vegetationGroupings, IEnumerable`1 lclookupBgls, ILogger logger, IProgress`1 progress)
   at ContentConverter.Program.Main(String[] args)

C:\>

That was running Win 10 Home with Command Prompt in Admin mode.

I assumed the 'memory is corrupt' suggestion referred to my own PC, so I ran mdsched.exe and no memory problems were found. I changed the output to a different physical disk and the same problem recurred. I tried changing other items but they all failed at the same point. Finally, I tried Command Prompt not in Admin mode, and removed the "/a" parameter from my command line. This time the process appeared to continue longer but still failed with -


Loading MDL...
  Determining optimal material set
  Converting MDL ('lon_hammersmith': 2828ab56-ab35-4934-a892-3212561d4fbc) to Flight .Model...
  Converting textures...
  Converting materials
  Creating material variation
  Writing asset 'D:\FlightTemp\FSX World\materialVar\lon_hammersmith.materialVar' (1 of 6)
  Writing asset 'D:\FlightTemp\FSX World\material\lon_hammersmith_Material_0.material' (2 of 6)
  Writing asset 'D:\FlightTemp\FSX World\material\lon_hammersmith_Material_1.material' (3 of 6)
  Writing asset 'D:\FlightTemp\FSX World\model\lon_hammersmith.model' (4 of 6)
  Writing asset 'D:\FlightTemp\FSX World\texture\LON_Hammersmith.dds' (5 of 6)
  Writing asset 'D:\FlightTemp\FSX World\texture\LON_Hammersmith_LM.dds' (6 of 6)
  Loading MDL...
  Determining optimal material set

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at DetermineMaterialShaderPipeline(Model* , Material* )
   at FlightToolkit.OptimizeMaterials(Model* pModel, ConversionOptions* pConversionOptions, unordered_map<int\,int\,std::hash<int>\,std::equal_to<int>\,std::allocator<std::pair<int const \,int> > >* mapOldToNewMaterials, vector<MDL::Material\,std::allocator<MDL::Material> >* vecNewMaterials, vector<int\,std::allocator<int> >* vecMaterialVertexDataFlags)
   at FlightToolkit.ModelConverter.ConvertMDL(Stream stream, String path, IEnumerable`1 textureSearchPaths, String tspName, ILogger logger, OutputTextureFormat outputTextureFormat, Boolean useMDLGuidAsMaterialVariationID, Boolean modelOnly)
   at FlightToolkit.SceneryConverter.ConvertFSXSceneryToFlight(String fsxSceneryCfgPath, String fsxTerrainCfgPath, String outputRootPath, HashSet`1 filesToSkip, HashSet`1 vegetationGroupings, IEnumerable`1 lclookupBgls, ILogger logger, IProgress`1 progress)
   at ContentConverter.Program.Main(String[] args)

I'll be honest. I'm at the limits of my knowledge here (and perhaps a bit beyond!) - I've no idea what this is actually telling me or how to remedy it.

Any suggestions on what to try (or additional symptoms I should have reported) are very welcome.

Thank you in advance

Walter

Are you using the latest version of the Flight Toolkit? I think somebody already reported this problem and stonelance came up with a quick fix for it. You might need to run the conversion two times to make it work. Here is the download link:

Share this post


Link to post
Share on other sites

Majuh,

Oops, yes, sorry, I should have provided that kind of information. My bad.

I was using Flight Toolkit 1.1.31 - hence I didn't realise that a thread specifically named "Flight Toolkit 1.1.30" would be relevant

Now that I know there is a 1.1.32 (not mentioned on the flighttoolkit.com page) I'll try uninstalling 1.1.31, installing 1.1.32, and report back.

Thank you for your very prompt response - much appreciated.

Walter

Share this post


Link to post
Share on other sites

Reporting back, as promised.
Success!

The converter stills shows some individual lines of errors but it ends with a 'completed' message, and I get a big .FlightAddon file as output.
AddonManager can then take this in, and Flight itself eventually swallows all 5+ GB of it.
And then ... well, let's just say I've already been exploring. Even picked up a wholly unexpected aerocache while wandering among the skyline of Barcelona!

Now that I know this community exists, I hope I can stay around long enough to learn to make contributions to the forum, rather than just asking basic questions. Thank you again for the solution.

Walter 

  • Upvote 2

Share this post


Link to post
Share on other sites

I have the latest version of flight tools (1.1.32) but I'm having no luck converting FSX scenery into Flight, so I'm doing something wrong.

First of all, I'm using Windows 10. To get the command prompt I've been using Windows Power Shell. Is this correct, or is there some other way to get the command prompt?

Second, flight tools is installed in C:/Program Files (x86)/Flight Tools/Flight Toolkit. Power shell keeps telling me that it doesn't recognize (x86) as a proper command. 

Third, my FSX is installed in C:/Microsoft Games/Microsoft Flight Simulator X.

Fourth, I have created a temporary file to put the converted files into. It is C:/TEST

I've entered every string of commands that have been posted here and on FS Developer, but none work. What should I be entering?

Thanks for the help! I'd really like to be able to use world scenery.

Share this post


Link to post
Share on other sites

Hi tl,

I'm not familiar with power shell but I recommend going into a folder  (e.g Flight Toolkit) and while holding Shift, right click in the folder and select "Open Command Window here".

From the info you provided it seems that the correct command would be:

ContentConverter.exe fsx /i:C:/Microsoft Games/Microsoft Flight Simulator X /o:C:/TEST

I'm just getting back into this and I may just start from scratch after installing a fresh copy of FSX  Let me know how things go.

Jim F.

Share this post


Link to post
Share on other sites

Hi again tl,

I got to thinking about this and suspect that the source and destination folders should be encased in quotes. Seems like ContentConverter.exe fsx /i:"C:/Microsoft Games/Microsoft Flight Simulator X" /o:"C:/TEST" might be the correct syntax.

Share this post


Link to post
Share on other sites
17 hours ago, tlorey said:

First of all, I'm using Windows 10. To get the command prompt I've been using Windows Power Shell. Is this correct, or is there some other way to get the command prompt?

In Windows 10 you just click in the "search windows" field and type "cmd" then press enter. That should open the command prompt.

Share this post


Link to post
Share on other sites

I sure appreciate the help, but its still not working. I typed in what you suggested, but was told the following:

ContentConverter.exe : The term ‘ContentConverter.exe’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:2

+ ContentConverter.exe fsx /i:”C:/Microsoft Games/Microsoft Flight Sim…

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : ObjectNotFound: (ContentConverter.exe.String) [], CommandNotFoundException

+ FulllyQualifiedErrorId : CommandNotFoundException

Suggestion [3,General]: the command ContentConverter.exe was not found, but does exist in the current location. WindowsPowerShell does not load commands from the current location by default. If you trust this command, instead type: “>\ContentConverter.exe”. See “get-help about_Command_Precedence” for more details.

Do you have any ideas about where I can go from here?

Ted

 

 

Share this post


Link to post
Share on other sites

Hi tl,

I'm not sure who your responding to or what exactly you tried.  Did you open the CMD window in the Flight Toolkit folder and did you include the quotes?

Share this post


Link to post
Share on other sites
3 hours ago, tlorey said:

I sure appreciate the help, but its still not working. I typed in what you suggested, but was told the following:

ContentConverter.exe : The term ‘ContentConverter.exe’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:2

+ ContentConverter.exe fsx /i:”C:/Microsoft Games/Microsoft Flight Sim…

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : ObjectNotFound: (ContentConverter.exe.String) [], CommandNotFoundException

+ FulllyQualifiedErrorId : CommandNotFoundException

Suggestion [3,General]: the command ContentConverter.exe was not found, but does exist in the current location. WindowsPowerShell does not load commands from the current location by default. If you trust this command, instead type: “>\ContentConverter.exe”. See “get-help about_Command_Precedence” for more details.

Do you have any ideas about where I can go from here?

Ted

Try this command:

"C:\Program Files (x86)\Flight Tools\Flight Toolkit\ContentConverter.exe" fsx /i:"C:\Microsoft Games\Microsoft Flight Simulator X" /o:"C:\TEST"

You might need to run the command a second time so it successfully completes the conversion.

Share this post


Link to post
Share on other sites

Thanks so much majuh!!! I ran your suggested command twice and now have the files in my TEST folder.

Now my question is: How do I install these files into flight? I opened my flight addon manager, chose install files, and went through everything in my TEST folder but was told that there was nothing in them to install.

Share this post


Link to post
Share on other sites

Hi tl,

Did you try what I suggested?  I don't like to provide information that doesn't work and would appreciate feedback on this.  Typing is not my favorite thing is why I suggested opening the CMD window in the Toolkit folder.  By doing this it should not be necessary to enter the full path to ContentConverter.exe.  If you just chose to ignore my suggestion I'd appreciate hearing why.  I don't like the feeling that I'm wasting my time trying to help someone.

Jim F.

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...