Military AI Works • Failed to create MDL file...
Page 1 of 1

Failed to create MDL file...

Posted: 23 Feb 2017, 16:06
by mins
Hello.

I am planning to make a model for fs 9 AI.

I use fsds 3.5. And the parts are polgon smoothing.

Then the model is Failed to create MDL file.

If other models are polgon smoothing, There seems to be an error.

I don’t' know the reason. Ask for a kindly reply.

Re: Failed to create MDL file...

Posted: 23 Feb 2017, 19:23
by MIKE JG
Cool! Is that what I think it is??

I would use the MakeMdl GUI to compile your models directly from MakeMdl instead of trying to let FSDS do it for you.

I assume that you have the MakeMdl FS9 SDK installed??

If so you can save your model as a .x file from within FSDS.

With you model showing in the FSDS window, select File/Export .x File and save that file somewhere where you will remember to find it.

Open MakeMdl, and from the 'Main' tab, select your saved .x file from the input selection screen. Also select a place to save it via the Output file selection. Select 'Start' and it should compile your model file.

It's a simple process once you know how to do it and seems to work much better than trying to compile the model directly from within MakeMdl.

Re: Failed to create MDL file...

Posted: 25 Feb 2017, 10:14
by mins
Thank you. Mike.

Models are now well constructed. It was a matter of texture.(Normal)

There is one more question.

What is the way in which a pilot can only appear during a flight in a FSDS program?

Thank you.

Re: Failed to create MDL file...

Posted: 25 Feb 2017, 13:01
by VulcanDriver
mins wrote: 25 Feb 2017, 10:14 Thank you. Mike.

Models are now well constructed. It was a matter of texture.(Normal)

There is one more question.

What is the way in which a pilot can only appear during a flight in a FSDS program?

Thank you.

You need to tie the pilot to some XML code so he appears when "something" happens in FS.

For example:

<part>
<name>pilot</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT NAV,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>

This will cause the pilot to appear when the Nav lights are turned on and disappear when they are off.

This needs to be added to the MakeMDL.parts file which is in the MakeMDL_SDK folder

Cheers

Re: Failed to create MDL file...

Posted: 25 Feb 2017, 14:24
by John Young
Just to add to what John has said, in the example given, the FSDS part must be called "pilot", to link it to the xml code. The pilot will then only be visible when the Nav lights are on.

John

Re: Failed to create MDL file...

Posted: 25 Feb 2017, 18:29
by MIKE JG
To add to what both John's have said, you will need to edit the file inside the MakeMdl folder called "MakeMDL.parts.xml" MAKE A COPY OF IT BEFORE YOU EDIT IT AND SAVE IT IN A SAFE LOCATION!

That is the file that we use to control all sorts of parts visibilities and animations. The possibilities are almost unlimited.

So in the example above, you would insert that code below the line that says: <part_dictionary>

Basically you can make a part appear or disappear pretty much whenever you want using some aircraft parameter to trigger its visibility.

For example, you can use things like the status of lights (on/off), speed values, height values, time of day, etc.

For you model above you could add "Remove Before Flight" banners to the pitot tubes, etc. You could add pilots that only appear when the model is ready to go. You could add flaps that are triggered off of airspeed, etc.

There are certain things on an AI model that the actual AI model engine is better used to control, for example landing gear up and down.

Please keep asking questions, we can help you with just about anything you want to do with the model.

Re: Failed to create MDL file...

Posted: 26 Feb 2017, 05:48
by mins
Thank you for all your kind replies.

I will work hard and repay you with a wonderful model.^ ^

Re: Failed to create MDL file...

Posted: 26 Feb 2017, 16:38
by mins
I will do only two final questions. :smt022

First, the pilot Head and Warning tape moves ...

second is how the plane makes objects disappear at the start of the flight.

Thank you for your response. :smt023

Re: Failed to create MDL file...

Posted: 26 Feb 2017, 21:28
by Weescotty
@mike and john...

I think we could post some of the more generic XML coding we use?
Would just make it easier for our budding modellers, and a lot of it is available on other sites.
Just the basic visibility etc?

What you think?

Maybe a seperate thead that all our users can visit?

Re: Failed to create MDL file...

Posted: 26 Feb 2017, 21:34
by Weescotty
Will answer the pilots head and flags moving....

You use tick18...

For eg if you called the part
tick18.warningflag
You can then animate up to 1024 keyframes (we typically use a lot lot less)
The ONLY must is the last keyframe MUST be identical to the first keyframe in rotation and position.

tick18 animations run continuosly in a loop.

We use the same method for the pilots head.

Re: Failed to create MDL file...

Posted: 26 Feb 2017, 22:52
by VulcanDriver
Weescotty wrote: 26 Feb 2017, 21:28 @mike and john...

I think we could post some of the more generic XML coding we use?
Would just make it easier for our budding modellers, and a lot of it is available on other sites.
Just the basic visibility etc?

What you think?

Maybe a seperate thead that all our users can visit?
Seems a good idea to me Kevin.

Re: Failed to create MDL file...

Posted: 27 Feb 2017, 02:00
by MIKE JG
Agreed.

Might also include a basic explanation of how the code works. It's still mostly Greek to me.

Re: Failed to create MDL file...

Posted: 27 Feb 2017, 02:13
by mins
Thank you very much.

The head of the pilot moves well.

However, I wonder how the wheelblock and the warning flags disappear.

Re: Failed to create MDL file...

Posted: 27 Feb 2017, 08:03
by John Young
Very similar to the pilot code mins, but the opposite way round of course.

Mins, this block will make parts like chocs and flags disappear when the beacon light comes on, ie at departure:

<part>
<name>parked_part</name>
<visible_in_range>
<parameter>
<code> (A:LIGHT BEACON, bool) (A:VELOCITY BODY Z, knots) 0 != || </code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>

This block does the same thing, but when the Nav lights come on, ie 15 minutes before departure.

<part>
<name>parked_part_Nav</name>
<visible_in_range>
<parameter>
<code> (A:LIGHT NAV, bool) (A:VELOCITY BODY Z, knots) 0 != || </code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>

I agree Kevin, having a public reference of basic xml code blocks would be useful. Would you like to set it up, or should I send you a draft? I'm not sure if we should include FSX code - that's a bit more complicated.

John

John

Re: Failed to create MDL file...

Posted: 27 Feb 2017, 08:18
by mins
Thank you very much. John...

Only one problem is the problem.

The warning flag moves but does not disappear when the plane starts to move.ㅜㅜ

Tick18(pilot head move , flag move) seems like a problem, but I don't know.

-----------------------------------------------------------------------------------------------------
<part> ---->pilot
<name>pilot</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT NAV,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>

<part> ---->pilot head move
<name>tick18</name>
<visible_in_range>
<parameter>
<code>
(A:LIGHT NAV,number)
</code>
</parameter>
<minvalue>1</minvalue>
<maxvalue>1</maxvalue>
</visible_in_range>
</part>

<part> ----->flag, block
<name>ground</name>
<visible_in_range>
<parameter>
<code> (A:LIGHT BEACON, bool) (A:VELOCITY BODY Z, knots) 0 != || </code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>

<part> ------>flag move
<name>tick18.1</name>
<visible_in_range>
<parameter>
<code> (A:LIGHT BEACON, bool) (A:VELOCITY BODY Z, knots) 0 != || </code>
</parameter>
<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>
</visible_in_range>
</part>

Re: Failed to create MDL file...

Posted: 27 Feb 2017, 09:17
by Weescotty
I 'think' what is happening is......

You have a block of code with a part named tick18 even though the later block part is called tick18.1 it is being controlled by the first block.

Eg
block, block.1, block.2, block.other, block.this
Would all be controlled by a single block of code with a part name of block

The way around this is -
You create a parent poly, and link all the tick18 flags to it.
You then apply the visibility code block to the parent poly. If it 'disappears' everything attached to it disappears also.

NOTE - You will need to redo the flag animation as the reference point for the animation will change.

Re: Failed to create MDL file...

Posted: 27 Feb 2017, 11:21
by gavinc
John Young wrote: 27 Feb 2017, 08:03 Very

I agree Kevin, having a public reference of basic xml code blocks would be useful. Would you like to set it up, or should I send you a draft? I'm not sure if we should include FSX code - that's a bit more complicated.

John

John
Hi,
This would be great if you could set it up. Learning xml is much easier if there are code examples to study. Please include FSX code if possible.

thanks
Gavin