P3D v3 .mdl file corruption from AIFP3

#1
I converted several old FS9 and FSX aircraft for use in P3D as AI. When inputting these aircraft in AIFP3, it sometimes notifies me that no model radius was included in the .mdl file or that the .mdl file was inaccessible. I entered a radius and and clicked on the "Update Aircraft config/Sim config" button. When I did that, the existing .mdl file for the aircraft became corrupted and the aircraft wouldn't render in P3D. It would do everything it was supposed to do, produce sound, move around, takeoff and land, but it was invisible.

I know the .mdl file was corrupted because it opened without warnings in MCX prior and it rendered properly in P3D. After trying to update the model radius in AIFP3, the .mdl file would return a warning (unsupported RIFF) when opened in MCX and become invisible in P3D.

I didn't have time to search the threads here. Is this a known problem?
 

gadgets

Resource contributor
#2
Without knowing what you did to "convert" a FS9 model for use in P3D, I can't comment beyond stating that no one has ever reported that AIFP corrupts aircraft .mdl files.

I'm travelling at the moment and will be away from my development system for a few more days. If you want me to investigate, please e-mail me (address in user manual) the original aircraft folder - I only need one texture set - and the "converted" model together with a summary of what you actually did to the model with AIFP.

Don
 
#3
I am currently away from my main computer for at least a week. I will put together some documentation for you when I return. The fact this has not been previously reported makes me think that I might be doing something else to cause the problem. I will get back to you in a few days.
 
#4
So, here is the scenario. I took an old FS9 airplane and converted it to AI (changed sound to soundai, etc.) This particular airplane, the ISDT Super King Air, did not require any modification of the .mdl file. It worked fine as AI as shown in this screenshot.
Before.jpeg

When inputting the airplane into an AI flight using AIFP3, the program asks for a model raduis, shown here.
Unable.jpg
I enter a radius and select the "Update aircraft.cfg/sim.cfg" button.
Update cfg.jpg
After compiling the traffic file with the new radius setting, the airplane will not render as AI. The aircraft lights are there and the airplane is working correctly, it just won't render.
After AIFP3 Update.jpeg
Here is the original model opened in MCX. Note no errors.
Original mdl.jpg
Here is the model updated by AIFP3 opened in MCX. Note the "unsupported RIFF" warning.
Mdl after AIFP3.jpg
The original and after .mdl files are attached.

The workaround is to NOT update the model radius. Easy enough. But the option to put yourself into some deep quicksand is there and it took me quite a while to find a solution. Just didn't want others to go through the same thing.
 

Attachments

gadgets

Resource contributor
#5
Thanks. I'll have a look at this on the weekend. Incidentalky, what does the "etc." in
an old FS9 airplane and converted it to AI (changed sound to soundai, etc.)
include. (your initial report said:
I converted several old FS9 and FSX aircraft for use in P3D as AI.)
)

Don
 

gadgets

Resource contributor
#6
I had a couple minutes to spare, so thought I'd take a quick look. I discovered a couple interesting facts:
  1. the model you sent me is a FSX model, not FS9 (AIFP does not modify FSX .mdl files; the model radius, i.e., wingspan for FSX/P3d models, is stored in the aircraft.cfg file); and
  2. the before and after models you sent are identical.
I'm happy to try and discover what went wrong for you, but to do so, I do need the files you used and a full disclosure of what you did to convert a FS9 model for AI.

Don
 
#7
The AI "conversion" process is nothing more than changing the sound folder to "soundai", changing the sound.cfg to soundai.cfg, throwing out the panel, and throwing out any interior model. Also, some minor changes are made to the aircraft.cfg to make the AI version fly better. The more I look at the issue, it is independent of the origin of the model. It happens anytime the radius is entered when prompted by AIFP3.

The model files provided are not identical in the eyes of MCX. The original shows no errors while the after shows the "Unsupported RIFF" warning and will not render in P3Dv3.4.

Here is the scenario with a totally unmodified airplane. It's a Spartan Executive widely available as freeware. I inserted it into a traffic file with AIFP3, but did not add a radius when prompted by AIFP3.
2017-1-26_16-52-11-99.jpeg
Then, again, when prompted the next time I used it in AIFP3, I inserted a model radius. (The aircraft.cfg file had a wingspan entry, but AIFP3 prompted for a model radius.)
Spartan AIFP3 before.jpg
I inserted a radius.
Spartan AIFP3 after.jpg
I compiled the traffic file and this was the result.
2017-1-26_16-57-25-166.jpeg
All changes to make the airplane into an AI were completed before any of this process started. I changed the sound files to AI configuration, threw out the interior model, and threw out the panel all before I used AIFP3.
Again, here is the MCX error log with the model file before the radius was entered in AIFP3 showing no RIFF warning.

Spartan Model Before.jpg
And here is the model after the radius was entered showing the RIFF warning.
Spartan Model After.jpg
The airplane is unmodified by me an any way other than what I stated above. If the "spartan7w.mdl" file is used (original) the airplane renders perfectly in P3Dv3. If the "spartan7w_After.mdl" file is used, the airplane will not render in P3Dv3.

None of this is a big deal to me now that I know what to avoid, so please don't think I'm pushing for massive changes or anything like that. I just wanted to point out a possible problem that can be addressed or not addressed. I love AIFP3 and your other great software and will continue to use all of it. Keep up the good work!
 

Attachments

Last edited:

gadgets

Resource contributor
#8
What you are seeing in an unexpected side effect of a change to the Aircraft Editor in the previous general release. I'll will be fixed ASAP.

Thanks for reporting.

Don
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#12
The model files provided are not identical in the eyes of MCX. The original shows no errors while the after shows the "Unsupported RIFF" warning and will not render in P3Dv3.4.
They are not identical if you check them with a hex editor. The MDLG header name (name of the GUID section) has been overwritten by some numbers. This will make the MDL file invalid and that might explain why FS doesn't read it.

It almost looks like an attempt to update the RADI section in the MDL, except that this model has no RADI section. Although the value in there doesn't make much sense for a float radius value.
 

gadgets

Resource contributor
#13
Hi Arno. Due to a coding oversight in a recent edit, AIFP reported not being unable to retrieve the .mdl file for some aircraft. Complicating matters was that AIFP didn't envisage a case where a user would attempt to change the model radius after being told the .mdl file was not accessible.

As for being identical files, I was using ExamDiff which does a byte-by-byte comparison. Problem was (I'm embarrassed to admit) the same file was loaded into both sides of the compare. Since the user declared initially he was "converting" FS9 aircraft but the file he sent me was an FSX .mdl, I quickly assumed he'd sent me the wrong files and left it at that.

Don
 
#14
I'm having a problem which I think is related to this thread--but maybe not.

Currently using version 3.2.04 (o) and n before that, but maybe "j" or so before that
Win 10, FSX deluxe

Many of my ai aircraft are FS9, but they seem to work well. With the last couple of development release, there is a problem with the aircraft editor--and it's stopped working with (n)

With recent updates (3 weeks??) when I open the editor (usually to add a tail number) I'd receive the first message (fs9 mdl error_before ver 0). At least I think that was the message, since I'd found a workaround..... There was no radius in the circled entry as shown on the "missing radius" image. If I entered a radius, I could update the tail number, and the .cfg file updated

With verion o (and this was not the case with version n 48 hours ago) even if I fill in the radius, I get an error (message with version o).

NO MAJOR DEAL. I can still add a tail number on the flight plan itself, but can't seem to update the cgf file using the AIFP aircraft editor any longer. Haven't tried going into one of the config files manually with notewriter to see if that would fix it.

I can if that helps with your trouble shooting at all

But mostly, thanks so much for a great program (this and others). I have slwoly added few thousand AI flights over the years, and they make my little airport projects alot more enjoyable

Thanks much
Gary
 

Attachments

gadgets

Resource contributor
#16
Please download and install development release 3.2.04(q) from http://stuff4fs.com.

Turns out I did develop a fix for this issue in version (n) but failed to fully implement it. This partial implementation result not only in a partial fix for the problem but also resulted in being unable to save changes to FSX/P3d aircraft.

It should all work now. You will also notice that the Model Radius textbox is now disabled for all but FS9 aircraft. Model radius in FSX/P3D aircraft is not relevant to minimum parking radius which depends solely on the wingspan entry in the aircraft .cfg file.

Don
 
Top