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

FSX modeldef.xml

Messages
1,749
Country
unitedstates
I have been using FSX gamepacks recently and have a few questions.

1. Where do i put the modeldef? location? fsx gamepacks / plugins folder like I do in fs9 gamepacks?

2. Can I add custom codes for showing and hiding parts and will this need a guid entered too? Also there are a few types of coding for each part that has a guid.
So what type would i use for non animation?

3. Can I use bones to animate parts with scaling? I take it "NO" on this one.


<Animation name="show_1chute" guid="24f0257c-246a-4954-a056-2a9eb9462316" type="Standard" typeParam=""/>


<partInfo>
<name>show_1chute</name>
<visible_in_range>
<parameter>
<code>
(A:INDICATED ALTITUDE, feet) 5000 &gt; if{ (A:INDICATED ALTITUDE, feet) 5050 &lt; } els{ 0 }
</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</partInfo>


DG:eek:
 
Last edited:
1. Where do i put the modeldef? location? fsx gamepacks / plugins folder like I do in fs9 gamepacks?

You can FIND the modeldef.xml in the FSX SDK folder under: "SDK\Environment Kit\Modeling SDK\bin\modeldef.xml"

2. Can I add custom codes for showing and hiding parts and will this need a guid entered too? Also there are a few types of coding for each part that has a guid.

yes and yes

What you do is: every new Animation/Mouserect/Visibility code (or a combination) needs a guids. Following the advise of Bill L., you can generate these numbers with this website.

I am using MS Visual Studio Express (for free!) to organize my project. Apart from the usual C++ related files, I always load aircraft.cfg, panel.cfg,... the modeldef.xml file and all XML Gauge codes into the VS project to stay organized. I also added a textfile "guids.txt" that holds ~100 GUIDs so that I don't have to visit the website all the time.

Also there are a few types of coding for each part that has a guid. So what type would i use for non animation?

Na, it's all the same. There is no type.


3. Can I use bones to animate parts with scaling? I take it "NO" on this one.

not sure. I never tried. Make the test and please report back as I am interested in the result. However if it doesn't work you can still add more bones, delete the hierarchy of them and animate-move them into each other.

Cheers,
Vitus
 
Thanks

Thanks Vitas,

I figured it out, you edit the actual one located in the bin folder. WOW, was not expecting that!

--

I have done some testing and made a part work with flaps and it moved but did not scale down in size. i have been told in the past you can't scale. But i am hoping their is a trick out there or I will use my other method.

Thanks DG,:eek:
 
Last edited:
Okay, a couple of items require clarification here...

Only <PartInfo> entries that have an <Animation> sub-section require corresponding <Animation...guid.../> entries! Period.

<PartInfo> entries with only <Visibility> and/or <MouseRect> sub-sections do not need an <Animation...guid.../> entry.

The modeldef.xml file MUST remain where you find it in the FSX SDK's ..\bin folder.

I also highly recommend using the <AnimationGroup...> to make life simpler. For example:

Code:
  <AnimationGroup name="T38 LLights" guid="0x6E72FD3B,0x9C9E3698,0x8E44F665,0xFFFF10D0">
    <AnimationRef guid="d7320a03-9c95-4d3e-bafb-bd8750a86fce"/>
    <AnimationRef guid="59fc1c01-f7d6-4012-865b-49b6741808d0"/>
    <AnimationRef guid="d41a87b2-0caa-4b11-9812-8949a075a993"/>
    <AnimationRef guid="375d4237-9461-44b8-9734-f3a04c5cea38"/>
    <AnimationRef guid="da6adecc-9a9e-455f-aba7-dc1ad85516ea"/>
  </AnimationGroup>

This simply a list of the GUIDs I've used for specific <Tags> I want to have show up as a separate entry in the Animation Manager. It makes finding my "custom tags" ever so much easier! :rotfl:
 
Last edited:
You can use skinned-bone animations, but only for length, width and height...

...which, while not "scaling" per se, achieves the same result.
 
Thanks

Thanks Bill,

I used this simple test part. I used no guid, but then it does not show in animation manager. For <Visibility> and/or <MouseRect> I just match the name right? I have this partinfo below and I named a group called show_1chute in gmax. Can I use group names? I do this a bit in fs9.

So far I can't seen to hide and show this part!

<partInfo>
<name>show_1chute</name>
<visible_in_range>
<parameter>
<code>
(A:TAILHOOK POSITION,PERCENT) if{ (A:TAILHOOK POSITION,PERCENT) } els{ 0 }
</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</partInfo>


Oh, and yes I did get the bones to make a chute fold flat. But I had to use a bunch causing to many draws and poly's. So I figured that i will use longer bones and cover more area
then morph to another chute to hide the folding blemishes. So I will post a video when it's working like magic....Thanks for the help Vitus and Bill.


Thanks DG,
 
Last edited:
I got the group method....very very nice!

test1.jpg


Thanks Bill.

So if you look I have the group named right and the code above.
Nothing working yet!

DG:eek:
 
Thanks Bill,

I used this simple test part. I used no guid, but then it does not show in animation manager. For <Visibility> and/or <MouseRect> I just match the name right? I have this partinfo below and I named a group called show_1chute in gmax. Can I use group names? I do this a bit in fs9.

So far I can't seen to hide and show this part!

You MUST respect the Capitalization of the <Tags>!!!!!

<visible_in_range> doesn't work, use <Visibility> instead.

Code:
<PartInfo>
  <Name>show_1chute</Name>
  <Visibility>
    <Parameter>
      <Code>
        (A:TAILHOOK POSITION,PERCENT) near 100 if{ 1 } els{ 0 }
      </Code>
    </Parameter>
  </Visibility>
</PartInfo>
 
Thanks

Thanks Bill.


test2.jpg



I got 1 bone to move a part today. But all these bones are added to the main chute. I assigned flaps reverse to all the bones
and assigned nothing to the main chute since it moves from the bones. Nothing works in game. it's stuck at key frame 0.

i could really use a kick start on multiple bones since the animation manager is new to me.
So I am fine at creating bones and making animation.

So my question is what gets assigned in the manager on this sample here?
Did I assign the flaps correct by only assigning the bones?

Thanks a million!

DG,:eek:
 
Last edited:
1. make sure that every vertex has a total weight of "1". Meaning that every bone is within the envelope of a bone.
2. make sure that the chute material is marked "skinned mesh"
3. make sure that you tag all the keyframe-animated-bones with the proper animation tag. (NO need to tag the mesh as well)
4. make sure that you have the "skinned mesh animation" ticked in the exporter dialog.
5. make sure that you have "advanced animations" (something like this) enabled in FSX.


And there is yet another thing: you can't use a visibility tag on a skinned mesh.
 
Working

Thanks Vitus,

I am glad you had that check list. Working great!

My mistake was I was using fs9 material caused by how I drag textures from
the file manager.

DG:eek:
 
Last edited:
And there is yet another thing: you can't use a visibility tag on a skinned mesh.

However you can link the bones to a controller node to control visibility...

The actual "skined texture" must remain at the root level of the hierarchy though.

For example, this script is used to control the "3d taxi light bones" used in most of my models:

Code:
    <Visibility>
      <Parameter>
        <Code>
          (E:Time of Day,enum) 1 !=
          (A:GEAR CENTER POSITION, percent) near 100 ==
          and
        </Code>
      </Parameter>
    </Visibility>
 
Thanks

So if i have 16 bones and 1 mesh, can I group these files and use this group as a visibility tag....?
I will read about controller nodes!


Here is the new parachute animation with no scaling.......
Works great!
http://www.youtube.com/watch?v=F4IB2-xvzxs

I am about to try this visibility tag now!

However you can link the bones to a controller node to control visibility...

I put the links in this order... chute with a skin holding 16 bones...then I attached the 16 bones to a node i created.
Then I tagged the node name: show_chute10000_01

<PartInfo>
<Name>Show_chute10000</Name>
<Visibility>
<Parameter>
<Code>
(A:FLAPS HANDLE PERCENT,PERCENT) 5 &gt; if{ 0 } els{ 1 }
</Code>
</Parameter>
</Visibility>
</PartInfo>

The chute ended up sideways! lol



Update: I just tested a simple box with fsx texture and assigned the same name as above. Plus a few other part tags too.
Nothing will hide and show. I skipped the animation manager and just tagged names.

On the other hand if I use any thing from the animation manager that's default does work.

DG:eek:
 
Last edited:
update

I got your code to work bill.

Thanks, now I will try to hide the skin next!

DG,
 
Last edited:
what?what?what? :yikes:

What do you mean by controler node? A dummy? And the visi tag goes on this part and makes the whole mesh to disappear?!


Just a tiny single polygon to which the <Visibility> has been assigned via the Attachpoint Tool...

Any objects (including bones) will show/hide based on the control node's conditional script.

What can NOT be Linked to the control node is the skinned texture...

...but that doesn't matter because without the bones on which to hang the skin, it won't show up either! :rotfl:
 
Thanks Bill! And I always tried to fold the mesh in order to hide it somewhere in the fuselage...
 
I used the attach point tool and it worked.
But only for my poly box.

Heres a photo of my parts. I linked the bones to the box that has
its tag in the properties.

test3.jpg


So what links to what. Or should I use an IK part?

PLEASE HELP!

DG:eek:
 
Last edited:
You know what? I may have confused myself by not looking more closely at the full script for my control node. Now I'm not sure whether it's the Time of Day check in the <Visibility> or in the <Animation> section that's causing the mesh to "disappear..." :confused:

Code:
  <PartInfo>
    <Name>T38_Taxi_beam_dist</Name>
    <AnimLength>1000</AnimLength>
    <Visibility>
      <Parameter>
        <Code>
          (E:Time of Day,enum) 1 !=
          (A:GEAR CENTER POSITION, percent) near 100 ==
          and
        </Code>
      </Parameter>
    </Visibility>
    <Animation>
      <Parameter>
        <Code>
          (E:Time of Day,enum) 1 != (A:PLANE ALT ABOVE GROUND, feet) 3.5 - 0.66 * 90 (A:PLANE PITCH DEGREES, degrees) - 0.01111 * * * 1000 min
        </Code>
      </Parameter>
    </Animation>
  </PartInfo>

The bones are animated such that at frame 0 they are collapsed into a very, very tiny size...

...and tucked away into the nose of the a/c!

I may well have been leading myself (and y'all) down the Primrose Path... :duck:

If that is the case, then placing the control variable in the <Animation> <Code> section might allow you to completely collapse the chute to a tiny size and hide it in the chute pack...
 
Last edited:
Back
Top