• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Problems adding new objects

Messages
9
Hello, First of all sorry for my English but I'm from the Basque Country and I'm not very fluent in it.

I'm new using AFLT and I have to say that it is an interesting and very usueful tool, but now i have a problem with it at the point of adding a new object. I will put here the step by step process in order to make easier the way to solve the problem:
- Firstly I created the object with sketchup and then I converted it to a FSX and FS9 models (with Model Converter X) in orther to put those models in the suitable folder of AFLT. Maybe here is the problem cause I think that it's necessary to create an object with 2 or more LODS and some other important things that I am maybe doing wrong.
- I also attach (with MCX) and empty attachpoint
- Then I create all textures in DDS and DXTBMP format in orther to put in the proper texture folder of AFLT.
- When the objext and textures are properly situated I put a new sentence in Types.txt as follows:
Biarritz_fokoak|Biarritz_fokoak|APPROACH | 1 | 90 | 45 | | True | F | -12/0/0; -6/0/0; 0/0/0; 6/0/0; 12/0/0
- Then I started the AFLT app and I made and array with this new object (in orther to try it) but when I am going to compile the array I get this error menssage:

System.ArgumentException: The target array is not long enough to copy all the items in the collection. Check array index and length.
en System.BitConverter.ToInt16(Byte[] value, Int32 startIndex)
en AFLT.MakeModels.GetSceneForAttachpt_FS9(Int32& nTRAN)
en AFLT.MakeModels.AdjustBaseModel(Int32 fFSVer_FS)
en AFLT.MakeModels.MakeModels(Model model_, Int32 fFSVer_Models, Int32 fFSVer_FS)
en AFLT.MakeArray.MakeArray(String sPath_Def)
en System.Windows.Forms.Control.OnClick(EventArgs e)
en System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
en System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
en System.Windows.Forms.Control.WndProc(Message& m)
en System.Windows.Forms.ButtonBase.WndProc(Message& m)
en System.Windows.Forms.Button.WndProc(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Thank you,

Gontzal
 
Gontzal, without knowing what version of AFLT you are using and not having either your AFLT Library folder or your custom model .mdl file, I can only guess.

The exception occurred when AFLT was trying to determine which SCEN block in the .mdl file was related to the attachpoint. That area of code contains only six lines, so there's not much to go wrong so long as the attachpoint data is in the expected format. So, I an only conclude there's something wrong/unexpscted in the ATTA block of the .mdl file.

I'm happy to investigate further if you send me the noted information.

Don
 
I have sent the noted information to your gmail. I supposed that it would also appear here but I was wrong. Have you received it?
 
Last edited:
I don't have a gmail account. Please either attach it to a post or e-mail it to me: don at stuff4fs dot com.

Don
 
Hi Don, thank you very much for replying so quickly. The version I am using is AFLT1100. I have also sent to your e-mail my AFLT library folder and the model .mdl file (the name of the model is Biarritz_fokoak.mdl and it is in the suitable folder of the AFLT app folder. I have also delete all .exe because it is not possible to send them via gmail). If you need any other thing, please let me know.

Thanko you very much.
 
Gontzal, the problem is that the attachpoint does not have the correct name. It MUST be named "attachpt_Light". In your model, it is named "attpt_Light". (It needs a fixed name because the model may include other attachpoints.)

AFLT should have not thrown an exception but, rather, told you what was wrong. That will be fixed. In the meantime, change the attachpoint name and all should be well.

Don
 
This issue has been addressed in Development Release 1.1.01(a), available from http://stuff4fs.com.

AFLT now issues a warning message and aborts the operation in an orderly manner.

Don
 
Hi Don,

Thats right. This problem solved by writing the correct attachpoint name, but now I have another issue with the model. When I put this new model in an array and compile the library array or when I create an element I get an error with the model.

Creating a library array I get this error:

"DayGo texture not found for base model "Biarritz_fokoak". Conitnue?" (I suppose that this is logical as I dont have any dayGo texture for my textures), but then I get,

"Unable to interpret .mdl file %Biarritz_fokoak_argi_zuri_berdeak27". I click Ok and when the compile finish I get this:

Parsing document: E:\Instalatutakoak\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Biarritz_argiak\pistakoak\pistako_ertzak_Bases_FS9.xml

ERROR C2014: Failed to load model data in file: E:\Instalatutakoak\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Biarritz_argiak\pistakoak\Bases\FS9\%Biarritz_fokoak_argi_zuri_berdeak27.mdl
ERROR C2149: Failed to load model data!
ERROR C2340: Failed to finalize MODEL_DATA!
ERROR C2034: XML Parse Fatal Error (line, column, error)

ERROR: 18, 119, One or more arguments are invalid

ERROR C2470: Unrecoverable error parsing XML!
ERROR C2006: Parse failed (0x80004005)
ERROR C2003: Failed to process file: E:\Instalatutakoak\Microsoft Games\Microsoft Flight Simulator X\Addon Scenery\Biarritz_argiak\pistakoak\pistako_ertzak_Bases_FS9.xml

And creating a single element I get this:

"DayGo texture not found for base model "Biarritz_fokoak"
As in the other case

"Unable to interpret .mdl file "fokoa"."



I have attached the fs9 model.

Thank you,

Gontzal
 

Attachments

Since all my models have day-glo textures, it's possible there's a bug lurking in the code for models that don't have dayglo. I'll check it out.



Don
 
That is a most unusual model. It appears to have 8 LOD calls using the same LOD value. However, I don't think that has anything to do with the problem.

The .mdl file is not in the format expected. I suspect its the way MCX adds attachpoints. (I'm not suggesting there's anything wrong with the way MCX add attachpoints, only that the resulting .mdl file is different than if the attachpoint were integrated into the model by Gmax and, hence, different from what AFLT expects.

I may be able to fix this, but doing so will take some time. For the present, if you want to use custom models, their .mdl files must conform to the format that would exist had the model been created in Gmax with an integral attachpoint not subject to LODs. Resolution of this will require significant investigation on my part to understand what formats might be encountered (there's no point in fixing just this situation if there are others likely to be encountered) and I've got a couple other projects "on the go".

Don
 
If that doesn't work, please let me know and send me the FS9 .mdl file. (I don't have 3DS.)

Don
 
There was a little "boo-boo" in yesterday's development release. Anyone who downloaded that release should update to Development Release 1.1.01(b), now available at http://stuff4fs.com. (The new release won't affect your situation, Gontzal.)

Don
 
Hi Don,

It is not possible to create an attach point in my 3ds max version as there isnt any flight simulator friendly tool. But i attached a point with gmax and I have got the same error. "Unable to interpret the model". So the problem could be the model (I did the model with sketchup and converted it with MCX), maybe the LODS, I dont know. I have attached two versions (fs9 and fsx) of the model done with gmx.

Thank you,

Gontzal
 

Attachments

I've discovered why that message is being issued with your file, and I MAY be able to avoid it. But, even if I do, I doubt you'll get the desired result with this model. As noted in the manual, custom models must use AFLT's light texture obj_AF_Light. Your model doesn't use that texture. Even if you don't use that texture, it must be included and, I just discovered, it must be assigned as texture index 0 - at least for FS9 and perhaps also for FSX. (The user manual has been updated for the next release.)

Please understand, AFLT is not a general purpose .mdl analyser. It makes some assumptions about the format of the .mdl BGL block and tweaks based on those assumptions. That's why the user manual places those restriction on custom models. AFLT "manipulates" the use of the texture in slot 0. If it's not the expected texture, it will be interesting to see what happens.

Don
 
I know that its a lot of work but it should be very interesting an step by step example of adding a new simple object in the documentation in orther not to make mistakes:). Nevertheless I will continue searching for the error.

Thanko you Don,

Gontzal
 
Gontzal, the User Manual, SUBSTITUTION/ADDITION OF BASE MODELS, covers this now. The specification is clear. What I hadn't realized until you raised the issue is that custom models could have subtle variation in formats.

Yours is not a simple object, at least not from a .mdl interpretation perspective - and it did not comply with the specification in the user manual. (Admittedly, that non-conformance highlighted a previously undiscovered issue.) Other users have successfully added custom models but, like me, they must have used Gmax to create the models in their entirety. Now that it's clear AFLT can't rely on Gmax formatting, I plan to try a couple of things to see if I can make the interface more flexible.

That being said, I do not wish to promote the use of custom lights. I've provided a set of stock lights that should be adequate for most applications. I purposely limited the "how to" information in the noted section of the manual to the essentials to discourage attempts to use custom lights by neophyte users (not meaning you).

Don
 
Hi,

I finally got what I want. It seems that its very important to do all the model via Gmax (as I 've done) and also placing in the first slot the obj_AF_Light texture as you said. Then add an attachpoint with the correct name and It's already done. I have noticed that if you put "all-in-one" option then the lights will appear under the model when placing in FSX. But nothing more.

I have attached some screenshots.Thank you very much.

Gontzal
 

Attachments

  • 2014-10-24_0-9-50-612.jpg
    2014-10-24_0-9-50-612.jpg
    91.6 KB · Views: 538
  • 2014-10-24_0-17-7-429.jpg
    2014-10-24_0-17-7-429.jpg
    90.7 KB · Views: 510
  • 2014-10-24_0-17-23-74.jpg
    2014-10-24_0-17-23-74.jpg
    93.6 KB · Views: 614
Looking Good!!

I have noticed that if you put "all-in-one" option then the lights will appear under the model when placing in FSX. But nothing more
. Not sure what you mean by "nothing more". All-in-one implies both the model and light are integrated into a single file. But, there should be no visible difference.

Don
 
Back
Top