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

3DSMax: Animation definition not accepted

Discussion in '3D Objects General' started by Horst18519, 21/3/07.

  1. Horst18519

    Horst18519 Moderator Staff Member Resource contributor

    Joined:
    7/4/05
    Messages:
    2,183
    Country:
    germany
    I animated a scenery object in 3DSMax and exported it to FSX.

    Now, if I use a predefined animation name from the modeldef.xml all works well. But if I use a new entry I put into the modeldef.xml 3DSMax says the animation is not defined.
    Maybe the problem is that each time I go to the animation tool I have to select the folder? Isn't there an option that 3DSMax remembers the path to the modeldef.xml?
    And why do all animation names work fine but not mine? Syntax and everything is correct - GUID is unique. :confused:
  2. n4gix

    n4gix Resource contributor

    Joined:
    26/9/06
    Messages:
    9,405
    Country:
    unitedstates
    Thorsten, can you edit and save the modeldef.xml file with Max open?

    If so, then you are not editing the file that Max is reading! :eek:

    In both Max and GMax, when the bootstrap.ms script runs, the modeldef.xml file is opened for reading. Since the file remains open until Max/GMax is shut down, it therefore remains LOCKED, and no changes may be made.

    The path for the modeldef.xml file that is normally used if the SDK is installed properly is ..\SDK\Environment Kit\Modeling SDK\bin\modeldef.xml ...
  3. Horst18519

    Horst18519 Moderator Staff Member Resource contributor

    Joined:
    7/4/05
    Messages:
    2,183
    Country:
    germany
    I changed that directory and moved the xml to another folder. But if I navigate to the correct path it should work, shouldn't it? Can I tell Max the new path? Somewhere in an ini?

    Actually, my entry of the new animation is stored in the xml, that's not the problem. But it seems that Max, even after a restart, doesn't accept that new entry. :confused:
  4. Horst18519

    Horst18519 Moderator Staff Member Resource contributor

    Joined:
    7/4/05
    Messages:
    2,183
    Country:
    germany
    Ok, the path in the animation.ms was incorrect. The sdk-path was E:\SDK and then in the script it was added SDK\enivronment kit\... - so the 'SDK' was dobuled.

    Anyway, now I don't have to reset the path to the modeldef.xml, and I even use the original in the bin-folder now, but still, allthough everything is set correctly, at export MAX tells me thet the animations have no definitions.
    Again: If I replace them with other animations like oilrigexplosion everything is ok.

    I don't understand that...

    My new entry:
  5. n4gix

    n4gix Resource contributor

    Joined:
    26/9/06
    Messages:
    9,405
    Country:
    unitedstates
    Where are you placing the <Animation>...GUID...</Animation> entry?

    Did you in fact create a new <PartInfo>...</PartInfo> entry for the animation as well?

    You really do need both before it will work...

    For example, I put all my custom <Animation> entries after the last "default" entry:

    Code:
        <Animation name="wing_fold_right" guid="AF28026F-B905-4856-DFAF-50B71893F3F2" length="100" type="Sim" typeparam2="wing_fold_right" typeparam="AutoPlay" />
    
    [COLOR="Red"]<!--     ESDG Custom Animations  -->
        <Animation name="refreshment_center_door" guid="1D7F7013-28B4-4316-8947-12B3A5ABD8D0" length="100" type="Sim" typeParam2="refreshment_center_door" typeParam="AutoPlay" />
        (lots more of them snipped for brevity>
    <!--     END ESDG Custom Animations  -->[/COLOR]
    
      <AnimationGroup name="GroupTests" guid="0xB331C7EF,0xE2BA4276,0x84C433B2,0xBA9781B2">
            <AnimationRef guid="40A98760-2FCB-4422-A469-7001DBAAB766"/>
            <AnimationRef guid="23FBBCC2-C861-41b4-90D2-051AC1BCA338"/>
      </AnimationGroup>
    
    Then, I add the new <PartInfo> entries at the TOP of the existing "default" entries, like this:

    Code:
    [COLOR="Red"]<!--     CJ1 Custom Animations  -->
    
        <PartInfo>
            <Name>refreshment_center_door</Name>
    	  <AnimLength>100</AnimLength>
            <Animation>
                <Parameter>
                    <Code>
                        (L:RefreshDoor,number) 100 *
                    </Code>
    		    <Lag>40</Lag>
                </Parameter>
            </Animation>
            <MouseRect>
                <Cursor>Hand</Cursor>
    		<TooltipText>Refreshment Center</TooltipText>
    		<CallbackCode>(L:RefreshDoor,number) ! (&gt;L:RefreshDoor,number)</CallbackCode>
            </MouseRect>
        </PartInfo>
    
    <!--     END CJ1 Custom Animations  -->[/COLOR]
    
        <PartInfo>
            <Name>wing_fold_left</Name>
            <AnimLength>100</AnimLength>
            <Animation>
                <Parameter>
                    <Sim>
                        <Variable>FOLDING WING LEFT PERCENT</Variable>
                        <Units>percent</Units>
                        <Scale>1.0</Scale>
                        <Bias>50</Bias>
                    </Sim>
                </Parameter>
            </Animation>
        </PartInfo>
    
    By doing it this way, all my new entries will appear either at the TOP of the picklist in the "Animation Tool" or the BOTTOM of the picklist in the "Attachpoint Tool".

    Also, if there's a problem with the code, it's easier to find and edit in that huge modeldef.xml file... :D
  6. Horst18519

    Horst18519 Moderator Staff Member Resource contributor

    Joined:
    7/4/05
    Messages:
    2,183
    Country:
    germany
    I did not include an entry for the partInfo. As far as I understood the SDK this is not necessary for scenery objects animations.
    If you take for example the animations for the mission objects, they don't have a partInfo either:
    That can't be the problem, can it?
  7. n4gix

    n4gix Resource contributor

    Joined:
    26/9/06
    Messages:
    9,405
    Country:
    unitedstates
    Honestly, I don't have a clue. I'd noticed that myself and had wondered about it. Surely the "animation movement" must be defined SOMEWHERE!

    It seems that the SDK is - once again - woefully incomplete, since there's nothing that addresses this issue... :wave:
  8. Horst18519

    Horst18519 Moderator Staff Member Resource contributor

    Joined:
    7/4/05
    Messages:
    2,183
    Country:
    germany
    Well, it seems like... :(

    There must be people out there who did this already. Hello?! :D
  9. pks1414

    pks1414

    Joined:
    28/6/04
    Messages:
    286
    Apologies for jumping in on this thread but I am trying to find out about this as well. I have just finished making a small castle in 3dsMax8 that exports great, however I also created a flag flying on one of the turrets. I used the skin modifier and bones in order to create it (the same as in the MS oli rig sample for Gmax)however what I do to get it to work in FSX is absolutely baffling me.

    I have created a small desktop icon for my xtomdl function as per the Wiki here...how do I get the animation in the same scenery to work. I have read the SDK over and over and it just ain't sinking in, it may as well be Latin.

    I would be really grateful too if someone could explain this in the simplest terms.

    Many Thanks


    Paul
  10. Horst18519

    Horst18519 Moderator Staff Member Resource contributor

    Joined:
    7/4/05
    Messages:
    2,183
    Country:
    germany
    Which animation name do you use?

    Did you include the /xanim in the command line?
  11. pks1414

    pks1414

    Joined:
    28/6/04
    Messages:
    286
    Animation name? told you I was new at this. Two things though, where do I indicate or give my flag an animtion name, and how do I add xanim in the command line? My Icon on the sesktop simply works as per the Wiki instructions on this site, do I have to add it in there?

    Thanks for coming back to me by the way

    Cheers


    Paul
  12. Horst18519

    Horst18519 Moderator Staff Member Resource contributor

    Joined:
    7/4/05
    Messages:
    2,183
    Country:
    germany
    Did you read the SDK regarding the animation-tool for 3DSMax? You have to assign an animation with that tool in Max before export.

    The target to the shortcut should look like this:

  13. pks1414

    pks1414

    Joined:
    28/6/04
    Messages:
    286
    I saw that part however I created a Flag to sit on top of a tower as a separate Max object. I didn't do any exporting at that stage but merged it with the main project in order to position it on top of the tower. From this point on I am lost :confused:

    Do I simply change my xtomdl icon to incorporate the xanim permanently (i.e. it will not make any difference to exports without animation) then add the respective animation code to the modeldef.xml

    God I'm confused:(
  14. Horst18519

    Horst18519 Moderator Staff Member Resource contributor

    Joined:
    7/4/05
    Messages:
    2,183
    Country:
    germany
    Erm, step by step!

    First you'll have to create the animation in Max with keys, then you go into the animation-tool in Max - did you get that to work?
    The rest will follow. ;)
  15. pks1414

    pks1414

    Joined:
    28/6/04
    Messages:
    286
    Well I got the animation to work by using keys but what is the animation tool...all I did was move each bone then created a key. I told you I was new at this:D
  16. Horst18519

    Horst18519 Moderator Staff Member Resource contributor

    Joined:
    7/4/05
    Messages:
    2,183
    Country:
    germany
    I cannot help you if you don't read the SDK. ;)

    Please install the animation-tool for 3DSMax as stated in the SDK.

Share This Page