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

P3D v2 AI MCX conversion - Elevator animation code problem

Messages
130
Country
unitedkingdom
Hi

I am playing around with a conversion from a FS9 model to P3D with MCX.

The problem I have is that the elevators and the ailerons in the original AI model are down by default (see pic attached).

The standard animations do no work when I export into P3D, so I decided to code an animation for that linking it with the beacon light (if it's off, elevator deflected)
Code:
  <Animation name="My_elevator_deflection_pct" guid="428e6101-cbc7-4e6a-bef0-d1e22e9f2a9f" typeParam2="My_elevator_deflection_pct" length="100" type="Sim" typeParam="AutoPlay" />
  <PartInfo>
    <Name>My_elevator_deflection_pct</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>
     (A:LIGHT BEACON,bool) 0!= if(A:ELEVATOR DEFLECTION PCT, percentage) 100
    </Code>
      </Parameter>
    </Animation>
  </PartInfo

But it doesn't work, I've chaded 0! for == as well.

I wonder if the problem is that the elevator is already deflected and the animation should brig it to 0 degrees instead... I don't know, I'm a bit confused.

I guess that whatever that works for the elevator, should be easily adapted to the aileron.

Thanks in advance.

Kano
 

Attachments

  • elevator aliron.JPG
    elevator aliron.JPG
    16 KB · Views: 373
I doesn't work because your XML syntax is junk.

Code:
  <Animation name="My_elevator_deflection_pct" guid="428e6101-cbc7-4e6a-bef0-d1e22e9f2a9f" typeParam2="My_elevator_deflection_pct" length="100" type="Sim" typeParam="AutoPlay" />
  <PartInfo>
   <Name>My_elevator_deflection_pct</Name>
   <AnimLength>100</AnimLength>
   <Animation>
     <Parameter>
       <Code>
    (A:LIGHT BEACON,bool) 0 != if{ (A:ELEVATOR DEFLECTION PCT, percent) } els{ -100 }
   </Code>
     </Parameter>
   </Animation>
  </PartInfo>

You need to check the keyframes for the model to see what's an appropriate result for the evaluation. Maybe you need to change the variable as well.
 
In the Animation Manager in MCX you can set the keyframe position at 50 and fix the control surface animations. That will export the model with the control surfaces in their neutral positions.
 
Hi Milton,

LOL! I do admit it helps to be very easy going, and to have worked in an education environment for 30 years. :)
 
Tom, following your suggestion I lose the animation in the new converted model, is that what you were expecting to happen?

Bjoern's; I have tried your suggestion with the results that can be seen in the picture. I have tried some other options and with some I have achieved movement (but in the wrong direction, meaning deploying the elevator further down).

So far then
  • If I use a negative value (I've tried -50 among others) the result is the one in the pic attached.
  • If I use a positive one, the elevator goes further down (this is progress :)but in the wrong direction:()
So far I only can concluded that there may be an option but the system is pushing us hard to find it.

Thank very much for the help so far.

Cheers

K
 

Attachments

  • elevator wrong position.JPG
    elevator wrong position.JPG
    26.1 KB · Views: 332
Hi,

Yes, I was assuming you are bringing the model into a CAD program like GMAX or Blender. If not, my approach will not work.
 
Hi,

Yes, I was assuming you are bringing the model into a CAD program like GMAX or Blender. If not, my approach will not work.

I wish:)!!! I have gave it a go and tried to animate specific parts in blender, then import them to the model converted to animate, for instance, the stering wheel in models were is not, it would be a joy... but I am getting too much in trouble isolating the parts in blender in a way that, when I manage to animate the part (which I have being able to do), export it in a way that, when imported with MCX to the model converted, it fits properly.

Cheers

K
 
If a part doesn't work for me, i just lock the animation in place and live without it.

Unless flying in formation with the model, who cares about elevator movement anyway?
 
I agree, I don't really care (sort to speak) in terms of flying, it is an AI conversion. I also lock animations when they do not work and move on in terms of flying.

However, I'm using it as a learning challenge (as many of the issues I come up here with). It helps me to increase my knowledge and tomorrow may help me to either resolve a problem for which I really "care" or allow me to go an step further. In fact this is to me the most important reason to try.

Cheers

K
 
Not sure if it applies to Blender imports as well, but exporting a model from MCX as .obj and importing it into 3ds Max flips the entire model upside down, so to speak. In order to export any specific parts, I first need to mirror them vertically (in the Z axis). And flip its normals or polygons.

Although MCX has a "merge" function by now, I've never used it and simply added new/fixed parts to the .x file. Never tried animated parts though, so if you're really adventurous, study the .x and .xanim file formats and play around with them.
https://msdn.microsoft.com/en-us/library/cc526973.aspx
 
Back
Top