• 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 Ship Animations

Messages
735
Country
us-texas
I am working on animating the two well deck doors opening and closing, and the idea is that I'll be coming and going from a helicopter or otherwise interacting with the ship as an AI object, and not driving it. I have started my learning curve with making a basic ambient animation, working in blender, and it worked (see below). But I want to trigger my AI ship animation from the player aircraft.

LPDapproach1.png


So with that in mind, I am really wondering which type of command should I use to trigger this animation. Obviously I do not want the well deck opening and closing just at some regular interval.

I would like for it to be a toggle command like - landing gear or open/close door. Will that work? Other than the carrier-specific jet blast deflector platform commands, there doesn't seem to be a lot of choices of commands that are aimed at something outside ones own aircraft. Or does it even matter?

I guess the Conditional Animation Tool is out since I'm not building this for FS9. Have I understood that correctly?

Appreciate any guidance I can get on this.
 
Last edited:
Essex I know that you and I have visited a little on this subject but I want to revisit this discussion. I did review the example of the HMS Victorious from flying stations.

The trick here is in the gauge:

=================================

To raise and lower the crash barriers it's necessary to include the following line in the [VCockpit01] section of the aircraft's Panel.cfg:
gaugeXX=FlyingStations!Hook.xml, 0,0,0,0
Replacing XX with the next number in sequence.

For developers the gauge merely converts the aircraft's hook state to a local variable - (L:HookPosition, number), 100 being down, 0 up.

==================================

The gauge requires that the user aircraft have a tailhook. Flying a helicopter does not work here, since it does not have a tailhook.

So the solution would be to rewrite the gauge somehow so that it is reading something specific to a helo. Trying to figure out how to do that.
 
Taking a closer look at this gauge now -- I have opened the xml file titled hook, which is the sitting in the gauges folder:

<Gauge Name="Tailhook" Version="1.0">

<Element>
<Select>
<Value>
(A:TAILHOOK POSITION, percent) 5 &gt;
if{ 100 (&gt;L:HookPosition, number) }
els{ 0 (&gt;L:HookPosition, number) }
</Value>
</Select>
</Element>
</Gauge>


OK so this part looks to be reading a sim variable, yes?

(A:TAILHOOK POSITION, percent)

I would imagine that I could change this so that it is reading another sim variable, something that is specific to a helo... am I on the right track here?
 
I am revisiting this again.

I will try to recount what I think I have learned here. This ship referenced above is using a custom animation tag. I can see the references to this animation tag in the MDL file, but I do not have the code for the animation tag itself. I do know some of it's components however, such as name of the tag, GUID and key frame length.

The gauge above reads the user's aircraft to see the A variable (tailhook up or down) and sets that as a corresponding LVAR called Hook Position.

Unfortunately I have not been able to trigger this animation in FSX -- have been using Dino's T-45. Maybe I should test another aircraft to see if that works.
 
Unfortunately I have not been able to trigger this animation in FSX -- have been using Dino's T-45. Maybe I should test another aircraft to see if that works.
Can you be more specific? The default F-18 hook will activate the arrestor cable, setting the launch bar will activate the blast door and releasing the launch bar will activate the catapult. You can disengage the launch bar without activating the catapult also. I would think you would have better luck linking your conditional animation as a blast door, to the launch bar and then simply add a small animation to the helo model and tag it as a launch bar. Here is my blast door animation activated by Dino's F-35's launch bar:

shot.jpg
 
Rick I am referring to the HMV Victorious example that Essex pointed out. I've not gotten that custom animation to work yet. Might be the T-45, so I am trying other aircraft.

I am familiar with the carrier tags and in fact I have been able to get mine to work on my carrier model. Perhaps this launchbar tag animation could be used for my well deck doors on my other ships, but I would need to be able to add a launch bar to whatever helo or MV-22 that I will be flying to/from those ships. That might be more problematic than just mastering the gauge+custom animation tag solution (which has been used with success in at least two separate cases that I am aware of).
 
That might be more problematic than just mastering the gauge+custom animation tag solution (which has been used with success in at least two separate cases that I am aware of).
Well it is worth investigating. For example if the "launch bar" is actually a gauge, I don't know because it never applied to my situation - but it seems logical that both the launch bar animation itself and the related blast door are both triggered by the same "switch" - which would correspond to a gauge, in reasonable likelihood. In that case you would only need to add the gauge to the aircraft's 2d panel, for example.
 
What variable or event are you using to drive the animation itself on the AI ship?
 
Rick I am referring to the HMV Victorious example that Essex pointed out. I've not gotten that custom animation to work yet.

Assuming you have the FlyingStations gauge installed, have a Tailhook entry in the Aircraft.cfg and are using the Victorious's custom animation, then the animation should work AFAIK.

I agree that as it will be necessary for every aircraft to have special gauge added anyway, it's probably best to use a custom click-spot controlled variable (no Tailhook entry required), have you looked at the RFN tacan gauge variables? Not that I would know how to implement this.
 
What variable or event are you using to drive the animation itself on the AI ship?

Haven't made that determination yet. The 'tailhook' is used in the above example, as Essex has pointed out. Once I get the tailhook gauge to work with the ship (listed above) I will test some other events -- ideally something that does not need to be added to helicopters.

Probably something that toggles on or off would work best.
 
Last edited:
Assuming you have the FlyingStations gauge installed, have a Tailhook entry in the Aircraft.cfg and are using the Victorious's custom animation, then the animation should work AFAIK.

I agree that as it will be necessary for every aircraft to have special gauge added anyway, it's probably best to use a custom click-spot controlled variable (no Tailhook entry required), have you looked at the RFN tacan gauge variables? Not that I would know how to implement this.

Right. So far it does not work with the T-45. Gauge is in there and so is the entry in the panel.cfg of the aircraft (pretty sure that is what you meant). Still no go.

Maybe this is not the best aircraft to use for this testing. Testing it now with other carrier-based aircraft (eg., with tailhooks).

Without a doubt the best solution here is to get integrated into the RFN gauge, for a variety of benefits, but I would need the involvement/assistance of that team for that.

EDIT: tried it again with another aircraft and still cannot make it work. Hmmm.
 
Last edited:
I have to confess I know next to nothing about modelling - I program gauges. The idea of controlling dynamic scenery from within the user aircraft intrigues me a little, which was why I was asking. What I was getting at with the question was what is going on inside the model? Can you use L:Vars within an AI model or do you have to use standard simulation variables?
I'm pretty certain we can send events to the AI objects with SimConnect. In the case of the ship you are working on, you could animate the well deck doors based on the Exit variables and then use the SimConnect_SetDataOnSimObject call to set the values of these variables.
Sorry for the noob questions... just hoping to understand if I might be of some help on this.

Doug
 
OK wait it does work. Cool!

I was expecting some other parts of the ship to move as part of the animation, but that must be something else (I notice that the author used ground speed as an animation condition, very interesting given that this is an FSX model).

Well, alrighty then. Where was I going with this again?
 
Doug, what you see there is the whole gauge.

That event drives the animation tag --> L:HookPosition

Keep in mind I don't have the custom animation tag written up for me, but I think I can back into it, based on what I see in the animation file (obtained from MCX).

Doug, thanks also. I meant to say that earlier. Also to you, Rick.

I do like the EXIT OPEN event as a solution. That would work, as our player/pilot would likely be on the deck when he triggers the door opening/closing, and similar to the tailhook command, it uses the same percent syntax. I might start with that one.
 
Last edited:
Doug, there are basically two types of animations, key frame and motion capture. Since mocap also devolves into frames, it's inconsequential. It might be useful if you want your barn door to wave like an arm. Ok, so I create an animation by taking a basic model, lets use a tire mounted on a rim. I record my first key frame with the tire at rest, next key frame tire at 90°, next key frame tire at 180°, next key frame tire at 270°, final key frame tire at original position. Now when I link this animation with the r_tire_still tag, it will rotate at a relatively accurate rate for a wheel on the right side of the model any time the model is in motion and within the wheels suspension range of the ground. Other animations are triggered by specific actions, for example the landing gear.
I have worked with a developer that uses models with standard animations and then he uses an outside process, of which I am only an end user, to manipulate and position the models and in some cases trigger the animations; although I think actually all required animations are linked sequentially and the software calls specific frame ranges - of this I am only speculating.

Heres a list of standard animation tags.
 
Sorry for the noob questions... just hoping to understand if I might be of some help on this.

Now that's funny -- pretty sure I'm the noob here.

And Rick you may be correct in thinking that we could 'get away' with using a standard animation -- certainly that would be my preference. But in the only two working examples I have seen, they both used custom animation tags, so that fact alone makes wonder why they would do this if they didn't have to.
 
So I basically plagiarized this guy's gauge -- changing only the name of the A: variable, and the name of the gauge in the first line.



<Gauge Name="ExitDoor" Version="1.0">


<Element>
<Select>
<Value>
(A:EXIT OPEN, percent) 5 &gt;
if{ 100 (&gt;L:HookPosition, number) }
els{ 0 (&gt;L:HookPosition, number) }
</Value>
</Select>
</Element>

</Gauge>

Now instead of dropping your hook, you open your main exit and that sets the LVAR. So I guess you can name LVAR just about anything, as long as it matches the trigger code in your custom animation tag.
 
OK so now we know that works. Now let's see if we can make this work using a regular animation tags (door_0).
 
Back
Top