1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

P3D v3 Animation Lag issue

Discussion in 'ModelConverterX' started by kanoasurf, 10 Jun 2017.

  1. kanoasurf

    kanoasurf

    Joined:
    18 Mar 2007
    Messages:
    109
    Country:
    unitedkingdom
    Hi

    I'm adding a lag time to a custom animation for the elevators drop when the aircraft is powered off, pretty simple.
    The problem is that when I convert the model with MCX, no lag is applied and when I check the modeldef.xml created in the model folder, the animation code shows up but the lag line has been removed from the code. I have attached the code but note that I have used different lag values, all showing the same behaviour.

    Thank you

    Kano
    Code:
      <Animation name="elevator_drop_mine_TGGK_lag_40" guid="05eab582-dc6d-48a1-b158-a2b8b804d9c4" length="200" type="Sim" typeParam2="elevator_drop_mine_TGGK_lag_40" typeParam="AutoPlay" />
      <PartInfo>
        <Name>elevator_drop_mine_TGGK_lag_40</Name>
        <AnimLength>200</AnimLength>
        <Animation>
          <Parameter>
            <Code>
         (A:GROUND VELOCITY,knots) 0 !=
         (A:LIGHT BEACON,bool) or
         if{ 200 } els{ 0 }
             </Code>
             <Lag>40</Lag>
            </Parameter>
        </Animation>
      </PartInfo>
     
  2. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28 May 2004
    Messages:
    24,327
    Country:
    netherlands
    Hi,

    I think MCX doesn't support the lag value, I haven't seen it before. Let me check the code.
     
  3. kanoasurf

    kanoasurf

    Joined:
    18 Mar 2007
    Messages:
    109
    Country:
    unitedkingdom
    Arno, a line <code>#40# means that the lag is working? because sometimes I get it, not always..
     
  4. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28 May 2004
    Messages:
    24,327
    Country:
    netherlands
    I don't know what you mean there, sorry.
     
  5. kanoasurf

    kanoasurf

    Joined:
    18 Mar 2007
    Messages:
    109
    Country:
    unitedkingdom
    That the line
    <Lag>40</Lag>
    disappears, but instead, a #40# comes up after the first <code> line looking like
    <code>#40#
     
  6. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28 May 2004
    Messages:
    24,327
    Country:
    netherlands
    Ah ok, now I understand. I think the lag information is parsed wrong. I'll check.
     
  7. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28 May 2004
    Messages:
    24,327
    Country:
    netherlands
    Hi,

    I have added support for the Lag attribute now, hopefully that fixes your problem. This bug should only affect the situation where you read the animation from a MDL and it is not defined in the modeldef.xml that MCX uses yet. It should now be reconstructed with a Lag attribute.

    The new build will be online in 10 minutes or so.
     
  8. kanoasurf

    kanoasurf

    Joined:
    18 Mar 2007
    Messages:
    109
    Country:
    unitedkingdom
    Thank you very much indeed Arno

    kano
     
  9. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28 May 2004
    Messages:
    24,327
    Country:
    netherlands
    Let me know if there are still issues. I tested with sim and code animations so hopefully the implementation is robust now.
     
  10. kanoasurf

    kanoasurf

    Joined:
    18 Mar 2007
    Messages:
    109
    Country:
    unitedkingdom
    I still have the issue. I,ve tried in AI aircraft, keeping in the folder just the fs9 MDL, the current converted MDL, and the rest of the normal AI files. So no mcx modeldef present, .x or .xanim present. I made sure the sdk modeldef has the animation with the lag line.
    I imported the fs9 aircraft and for the sake of saving time, isolated the elevators, applied the animation with the lag, then exported it. Opened the converted aircraft mdl and merged the new elevators. Then finishing exporting it again.

    The new mcx modeldef created in the last export still presents the same issue: it has changed the name of the animation, the lag sentence disappears and an 10 shows up in the <Code> line as before (<Code>#10#) Note the lag value was 40

    Any views?
     
  11. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28 May 2004
    Messages:
    24,327
    Country:
    netherlands
    Do you have an object to test with? The changes I made are for FSX only I think. So maybe because you start with FS2004 has an influence.

    Do you have a small test object that shows the wrongly read animation?
     
  12. kanoasurf

    kanoasurf

    Joined:
    18 Mar 2007
    Messages:
    109
    Country:
    unitedkingdom
    the FS9 ai mdl is the only thing I have but before I convert it I isolate the elevator, so is just a small object what I convert, and I do it to P£Dv2 format. This what the sdk modeldef has:
    Code:
      <Animation name="elevator_drop_mine_TGGK_lag_40" guid="05eab582-dc6d-48a1-b158-a2b8b804d9c4" length="200" type="Sim" typeParam2="elevator_drop_mine_TGGK_lag_40" typeParam="AutoPlay" />
      <PartInfo>
        <Name>elevator_drop_mine_TGGK_lag_40</Name>
        <AnimLength>200</AnimLength>
        <Animation>
          <Parameter>
            <Code>
         (A:GROUND VELOCITY,knots) 0 !=
         (A:LIGHT BEACON,bool) or
         if{ 200 } els{ 0 }
             </Code>
             <Lag>40</Lag>
            </Parameter>
        </Animation>
      </PartInfo>
    and this is what shows up in the mcx modeldef:

    Code:
      <Animation name="elevator_drop_mine_TGGK_lag_40" guid="05eab582-dc6d-48a1-b158-a2b8b804d9c4" typeParam2="elevator_drop_mine_TGGK_lag_40" length="200" type="Sim" typeParam="AutoPlay" />
      <PartInfo>
        <Name>elevator_drop_mine_TGGK_lag_40</Name>
        <AnimLength>200</AnimLength>
        <Animation>
          <Parameter>
            <Code>#40#
         (A:GROUND VELOCITY,knots) 0 !=
         (A:LIGHT BEACON,bool) or
         if{ 200 } els{ 0 }
             </Code>
          </Parameter>
        </Animation>
      </PartInfo>
    I could send you the AI mdl if you want or the converted elevators only

    Kano
     
  13. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28 May 2004
    Messages:
    24,327
    Country:
    netherlands
    That's similar to an animation I tested.

    Is MCX pointed to the modeldef.xml with this animation added?
     
  14. kanoasurf

    kanoasurf

    Joined:
    18 Mar 2007
    Messages:
    109
    Country:
    unitedkingdom
  15. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28 May 2004
    Messages:
    24,327
    Country:
    netherlands
    I'll try to reproduce it here one more time.
     
  16. kanoasurf

    kanoasurf

    Joined:
    18 Mar 2007
    Messages:
    109
    Country:
    unitedkingdom
    Arno

    I've tried in another model and it is working properly it does not present that problem. May be a corrupted file in the model I was working? I may have wasted your time... if so I'm deeply sorry.

    Kano
     

Share This Page