• 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:SE Animation only works in exterior model

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Hello friends,

I have this wee problem with one of my custom animations. Consider this animation:
Code:
  <PartInfo>
    <Name>door_cp</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:DOOR CP HOLD,bool) 0 ==
          if{
            (L:DOOR CP GOAL,number) (L:DOOR CP POSITION,number) - 0.1 *
            (L:DOOR CP POSITION,number) + 0 max (&gt;L:DOOR CP POSITION,number)
          }
          (L:DOOR CP POSITION,number)
        </Code>
      </Parameter>
    </Animation>

    <MouseRect>
      <Cursor>Hand</Cursor>
      <MouseFlags>LeftSingle+LeftDrag+LeftRelease</MouseFlags>
      <CallbackCode>
        (M:Event) 'LeftSingle' scmp 0 ==
        if{
          (M:Y) (&gt;L:MOUSEPOSY,number)
          1 (&gt;L:DOOR CP HOLD,bool)
          quit
        }

        (M:Event) 'LeftDrag' scmp 0 ==
        if{
          (M:Y) (L:MOUSEPOSY,number) - (&gt;L:MOUSEPOSDELTA,number)
          (M:Y) (&gt;L:MOUSEPOSY,number)

          (L:DOOR CP POSITION,number) (L:MOUSEPOSDELTA,number) 0.5 * - 0 max 100 min (&gt;L:DOOR CP POSITION,number)
        }

        (M:Event) 'LeftRelease' scmp 0 ==
        if{
          0 (&gt;L:DOOR CP HOLD,bool)
          
          (L:DOOR CP POSITION,number) 99 &lt;
          if{
            0 (&gt;L:DOOR CP GOAL,number)
          }
          els{
            100 (&gt;L:DOOR CP GOAL)
          }
        }

      </CallbackCode>
      <TooltipText>
      </TooltipText>
    </MouseRect>
  </PartInfo>

This is the little upwards-swinging door behind the pilot. The idea is that You can click and drag the door open. If you release the mouse button when the top position (>99) is reached, it locks in place, otherwise it comes back down. The thing is that the animation doesn't show up in the interior cockpit. I can interact with the door with the mouse (click&drag), but nothing happens. I have the same script attached to the door in the exterior model and when I click and drag it in the interior model, the open-state shows up in the exterior model.

Any clues what the problem might be?
 

Heretic

Resource contributor
Messages
6,830
Country
germany
Animation not assigned via animation manager?
Undesired scaling applied to the part in the interior model?
Accidentially removed the animation keyframes?
 

Heretic

Resource contributor
Messages
6,830
Country
germany
Delete the part and replace it with the one from the exterior model?
 
Messages
16
Country
brazil
isolate the part in exterior model, and save as x file, open the interior model, delete the non-animated part, and merge with the X file?
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Delete the part and replace it with the one from the exterior model?
Just tried that, same result
Are you using the same model for exterior and interior? or two different models?
Interior and exterior model are seperate.
isolate the part in exterior model, and save as x file, open the interior model, delete the non-animated part, and merge with the X file?
I did the merging of the parts like Heretic suggested, the effect should be the same. Unfortunately it doesn't work.

I do have a similar problem with one of my visibility tags. The Vega has wheel chocks and tie-downs. I never got both to work at the same time and it doesn't seem to be a coding issue. Is there a limit how many animations/visibility tags you can use? Is there a way to use Arno's modelconverter to add an animation code to a part?
 

=rk=

Resource contributor
Messages
4,450
Country
us-washington
Yes, conditionally. An animated part must already have an animation tag, you can change the tag. I do not believe you can tag an unanimated part, but you can assign a visibility condition.
OPeWjf9.jpg


Visibility conditions in the Hierarchy Editor are linked to animation states.
 
Messages
10,088
Country
us-arizona
If you have identical names, animations go south. Make sure the second part is something like (bad naughty part001) so that it functions.

Why not do one model for both interior and exterior? Its no longer the days of FS2004. ;) With your plane, its not too complicated. You shouldnt have issues in frame rates with that route, unless the model is already so built up that you would need a week to make them 'one' model... Just a suggestion though. I do all my models with 1 model being both interior and exterior.
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Bill, I build one full model these days, but export as separate models still. What I do is arrange objects into Max "Layers" so that I can for example, omit the landing gear for the 'interior model' because you can't see them anyway from the VC.

Doing it this way means I no longer have to update two separate Max files to keep the objects in synch.
 
Messages
10,088
Country
us-arizona
Bill, I build one full model these days, but export as separate models still. What I do is arrange objects into Max "Layers" so that I can for example, omit the landing gear for the 'interior model' because you can't see them anyway from the VC.

Bill,

Could you expound on this workflow during a export when you get a chance? I would like to know how thats done. There isnt a possibility of losing things when doing layers? I remember Gmax had issues with parts put into sections or compartments. I do not remember what the system was called though. I am sure its not Layers.

What I do with 'model types' (long nose, short nose, pilots in and out, is making a central node for those sections and then deselect them on the Hierarchy trees when I export them so that I have the model I want. Usually like AAA_Pilots, or AAA_Cargo, etc, and the nodes are near the top so that I can find them faster. I havent worked in Layers. Going to look that up as soon as possible.

Bill
LHC
 
Messages
683
Country
us-california
Make a dummy node and locate it at 0,0,0. Link your part to it and see if it works.
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
havent worked in Layers. Going to look that up as soon as possible.
You are remembering "Groups" from GMax, which are indeed problematic. "Layers" on the other hand are simply a named collection of parts that are associated, such as "ext glass" in this example. Whatever I don't want to include in an export is easily "Hidden" using the "Layers" GUI. I can then Select All parts that are not "Hidden" and "Export As." Easy!

NB: this a current project and not all objects have been given "rational names" yet! :laughing:
AtkeD.png
 

Heretic

Resource contributor
Messages
6,830
Country
germany
You are remembering "Groups" from GMax, which are indeed problematic. "Layers" on the other hand are simply a named collection of parts that are associated, such as "ext glass" in this example. Whatever I don't want to include in an export is easily "Hidden" using the "Layers" GUI. I can then Select All parts that are not "Hidden" and "Export As." Easy!

NB: this a current project and not all objects have been given "rational names" yet! :laughing:

Need to try this. Hiding parts in the hierarchy things is kind of a PITA since you have to select child objects separately.
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Note that you can also individually 'hide' and/or freeze objects within the Layer as well. :teacher:
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Here's an update on my problem: I found the problem and it is a very peculiar one. This is what the hierarchy of the part was:
Code:
wall
  door_cp_hinge
    door_cp
      door_cp_handle
The wall is just the inner structure of the plane, the hinge was a static part containing a bit of geometry to represent the hinge of the door. I merged those two parts and made the door_cp a child of the wall and TADAAAAA! It solved the problem. As far as I can tell, the lesson learnt here is:
Don't use the animation's name for the parent object of the part that is to be animated!

Does this make any sense? No.

And to answer Bill's question: yes, I use two separate models and I think it does help with the overall performance. The cockpit is simplified in the exterior model with no needle animations (saving on drawcalls) and I deleted half of the fuselage, wings, the tail etc. for the interior model. I do believe it makes a noticeable difference in performance, but I haven't done any serious testing to back up that claim.

I'm still having issues with the visibility of the tie downs, but it seems to be a coding problem rather than something related to the geometry.

Thanks for all your help guys!
 
Messages
10,088
Country
us-arizona
Glad you got it working. Nice...

I hate complications. :(

I think I started using the interior for the exterior models when I was using a 'walk around' style program back in the day, early in the FSX release days. You could roam around on the plane easily, walking down halways and things. With FSX factory planes, they of course had all the polygons not visible to the pilots seat deleted. Also, outside views from the VC with deleted polygons also killed those views. Since then, I have made my exteriors the same model as the interiors. I never saw a huge loss, but I am sure there is a huge gain if you have a very low performance rig. Mine isnt special, though it has 16 gigs of RAM.

Perhaps someday, I'll start making special versions for exterior models. With Bill Leamings 'Layers' export system, this could be easier now then previously known.
 
Top