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

MSFS How do cockpit "manipulators" work?

Messages
8
Country
unitedstates
I come from the X-Plane background, so I'm new to ESP development. One big question I have is how are manipulators made? In X-Plane, manipulators are made in blender and put into cockpit.obj. These manipulators are basically click regions that change datarefs, or they can be used to UV map panels onto the objects. My question is, how does this work in MSFS? Also, could you make 3D gauges like this? In XP you would set an animation to an object that changes based on the dataref.
 
Last edited:
Messages
392
Country
australia
Hey @frazer380 Having done some XP dev myself I understand the confusion, they're both very different platforms in how they do things. But it's KINDA the same.
With MSFS there is the 3D asset and an XML file. This XML file defines the "ModelBehaviours" for the different parts and animations in the 3D Asset. And since MSFS is based on the original FSX it still supports the older way of defining things so reading through old tutorials on ESP development (the underlying platform for FSX/P3D) will go a LONG way to helping you undertanding to develop for MSFS. That said, a LOT has changed and the current official documentation is quite lacking and community resources are taking time to develop as we all scramble to figure out how to do things.

https://docs.microsoft.com/en-us/previous-versions/microsoft-esp/cc526949(v=msdn.10) this is the link to the original documentation that might fill in some gaps.

What I would also do is open the SampleAircraft and GaugeAircraft gltf files into Blender so you can look at how things are done there. You'll need to look at the accompanying XML file in the same folder.

What are you going to make?
 
Messages
8
Country
unitedstates
I want to make an A-1B Husky
I tried to open the .gltf in Blender, but I just got an error
 

Attachments

  • blender_MSPQFDtO1y.png
    blender_MSPQFDtO1y.png
    114.3 KB · Views: 230
Messages
392
Country
australia
I want to make an A-1B Husky
I tried to open the .gltf in Blender, but I just got an error
Ohhh a Husky with floats?? :D That'd be so nice to go with the Cubs we have already.

Hmm Have you got the MSFSToolkit installed in Blender?
 
Messages
8
Country
unitedstates
Ohhh a Husky with floats?? :D That'd be so nice to go with the Cubs we have already.

Hmm Have you got the MSFSToolkit installed in Blender?

Yes, I do, is there a separate importer?
 
Messages
392
Country
australia
Hmm no, I had just seen other folks were able to import with no problems.

OK Quick and dirty 1-oh-1 to the XML file. There are three main sections, LODS, Animations and PartInfo. I wont cover LODs here as I want to focus on the other two.

The animation section declares all of the animation names which will be the same as the partinfo later. See this example:

XML:
  <Animation name="lever_cowl_flaps" guid="218138bb-f40a-48a6-b2f8-3207745799f9" length="100" type="Sim" typeParam2="lever_cowl_flaps" typeParam="AutoPlay" />
  <PartInfo>
    <Name>lever_cowl_flaps</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Sim>
          <Variable>RECIP ENG COWL FLAP POSITION:1</Variable>
          <Units>percent</Units>
        </Sim>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <HelpID>HELPID_GAUGE_COWL_FLAPS_SWITCH</HelpID>
      <TooltipID>TOOLTIPTEXT_COWL_FLAPS_PERCENT</TooltipID>
      <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
      <CallbackJumpDragging>
        <YMovement>
          <Delta>30</Delta>
          <EventIdInc>INC_COWL_FLAPS1</EventIdInc>
          <EventIdDec>DEC_COWL_FLAPS1</EventIdDec>
        </YMovement>
      </CallbackJumpDragging>
    </MouseRect>
  </PartInfo>

So this is for the Cowl Flaps lever in the cockpit. The Animation and PartInfo must have the same name and animation length.

You'll note also there is a MouseRect section, this is the maniuplator section from XP.

I've attached a modeldef.xml that I've used with some of my projects that has almost everything listed.

In Blender you name the animation the Animation name and name the object with the PartInfo.
 

Attachments

  • modeldef.zip
    67.6 KB · Views: 216
Messages
8
Country
unitedstates
Okay, I think I understand.
So if I name the animation "battery_switch" in Blender and set the name in Animation="battery_switch" that will work?
Also what do I set for the guid? And then length is just the length of the animation in Blender?
And the mouse rect is the "click region" / "manipulator", so when I hover over it will be a mouse hand? Also, do I need an animation to have a click region?
And one last thing, when I click it, the variable I want to edit is this?
XML:
<Sim>
    <Variable>RECIP ENG COWL FLAP POSITION:1</Variable>
    <Units>percent</Units>
</Sim>
Does it just toggle between two values when I click it? Thanks.
 
Messages
392
Country
australia
Okay, I think I understand.
So if I name the animation "battery_switch" in Blender and set the name in Animation="battery_switch" that will work?
Yes

Also what do I set for the guid? And then length is just the length of the animation in Blender?
GUID's must be unique, use an online creator site like: https://www.guidgenerator.com/

And the mouse rect is the "click region" / "manipulator", so when I hover over it will be a mouse hand? Also, do I need an animation to have a click region?
Only if you want the mouse to do something e.g. you would not have a mouserect on a landing gear part (usually)


And one last thing, when I click it, the variable I want to edit is this?
XML:
<Sim>
    <Variable>RECIP ENG COWL FLAP POSITION:1</Variable>
    <Units>percent</Units>
</Sim>
Does it just toggle between two values when I click it? Thanks.
The good thing is that there is already a FULL example for the Master Batter in that XML file I attached :D
Search for:
switch_master_battery

Look at all of the pre-made ones there to get an idea. Even use those already there! The thing that's REALLY going to melt your brain though is getting used to Reverse Polish Notation.

If I want to add: X+7
I would right: X 7 +

Takes a while, hurts the brain and then it just snaps and you "get it"
 
Messages
8
Country
unitedstates
Alright, I'll try it out, So the GUID is just a random generated number? No need for it to be set in Blender? Thanks
 
Messages
201
Country
unitedstates
I want to make an A-1B Husky
I tried to open the .gltf in Blender, but I just got an error

Hi there, did you or anyone else manage to import/open glTF files in Blender? If so, mind sharing how? I've tried the stock importer along with a couple others on the net with no luck, I get the same error you do.
 
Messages
392
Country
australia
Hi there, did you or anyone else manage to import/open glTF files in Blender? If so, mind sharing how? I've tried the stock importer along with a couple others on the net with no luck, I get the same error you do.
Compiled glTF cannot be imported as Asobo do some crunching on them so they are non standard
 
Messages
392
Country
australia
Thanks for the reply. Do you know if this is something that would be possible down the line? Perhaps even be a part exporter?
By it's nature, an exporter, exports and does not import :)

What are you wanting to do by importing an existing compiled glTF?
 
Messages
201
Country
unitedstates
By it's nature, an exporter, exports and does not import :)

What are you wanting to do by importing an existing compiled glTF?

Indeed. I was thinking along the lines of what the Blender2XP tool did, the ability to both import and export specific sim format types. I'm simply looking to modify a couple things in one of the cockpits. More importantly, I'm trying to be able to export out of Blender in .FBX format to re-texture in substance painter. That's really the end goal.
 
Messages
392
Country
australia
Indeed. I was thinking along the lines of what the Blender2XP tool did, the ability to both import and export specific sim format types. I'm simply looking to modify a couple things in one of the cockpits. More importantly, I'm trying to be able to export out of Blender in .FBX format to re-texture in substance painter. That's really the end goal.
Well that only worked in a very old version :) As for getting a proxy to use in SP, i believe there's quite a bit of discussion about that currently. Lots of implications.
 
Messages
6
Country
unitedstates
So there is no way to import GLTFs into Blender, correct?

If so, it is very sad :(
I'm simply looking to modify a couple things in one of the cockpits.
I was looking to replace some avionics in some airplanes and after poking around a bit it appears that without a way to modify *_cabin_LODxx.gltf it is not going to work. It appears that most avionics is "hardcoded" into model (steam gauges especially). Or do I miss something?

It is sad that there is no tinkering with panels with FS2020 especially that Asobo's "updates" breaks more than they fixes. FS2020 is so half-baked!
 
Messages
201
Country
unitedstates
So there is no way to import GLTFs into Blender, correct?

If so, it is very sad :(

I was looking to replace some avionics in some airplanes and after poking around a bit it appears that without a way to modify *_cabin_LODxx.gltf it is not going to work. It appears that most avionics is "hardcoded" into model (steam gauges especially). Or do I miss something?

It is sad that there is no tinkering with panels with FS2020 especially that Asobo's "updates" breaks more than they fixes. FS2020 is so half-baked!

A Blender importer for MS2020 gltf's is now available on flightsim.com.

Glad someone stepped up to the plate. Have fun.
 
Top