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

MSFS Animated Ground Traffic - PathFollow Animation Object

This means that the animation starts at random points along the path. So the animation should not always play at the beginning of the path.
Hi Christian, now that I succeded in my object following a path, I have some further question about animated objects. Could I write you a short PM? It´s just some general question about feasibility of some things I´d like to try.

Thanks again, Fabian
 
Thanks for posting, I watched the tutorial a few weeks ago but had the impression that a path follow animation would be different than what was shown in the video. Nevertheless, yesterday I succeeded. My mistake was that I chose the object name as the animation name, but the animation name seems to be the name of the NLA track which still hat its default name "NLAtrack" after naming the NLA track "cube" the animation played successfully.

I'm playing with this at the moment trying to get a boat to move. Just doing a normal animation moving it from one point to another with its own coordinates is buggy. It keeps disappearing.

I'm hoping a path will work better, but how does one attach the path animation to the model or vice versa for export?

When I export the model there's no animation attached, only the model. It all moves and works fine in Blender. It looks like the animation remains attached to the path, but the boat has none even though it follows the path.

I presume it's something to do with parenting, or maybe somehow transferring the animation across to the model, but I've no idea what.
 
Last edited:
I'm playing with this at the moment trying to get a boat to move. Just doing a normal animation moving it from one point to another with its own coordinates is buggy. It keeps disappearing.

I'm hoping a path will work better, but how does one attach the path animation to the model or vice versa for export?

When I export the model there's no animation attached, only the model. It all moves and works fine in Blender. It looks like the animation remains attached to the path, but the boat has none even though it follows the path.

I presume it's something to do with parenting but I've no idea what.
I'll try to send you some Screenshots the next days with a step by step guide. It took me days until I found the correct way to export simple animations
 
I'll try to send you some Screenshots the next days with a step by step guide. It took me days until I found the correct way to export simple animations

Cool. Thank you.

I don't have any problems exporting with a model with its own animation, just simple stuff, it's transferring the path animation to the model I'm not sure about. I just tried pressing bake animation and nothing much happened.

That's the test subject in question - https://www.mediafire.com/file/04bl71hwh2od021/Circle+Path.zip/file
 
Last edited:
Hi, I had a look at your blend file. It seems you somehow tied the animation to the circle and parented the boat to the circle, this won´t work because MSFS doesn´t recognize curve objects - I created a new file with a path follow animation and exported it into the gltf format, I also added a MSFS material to your sailing boat because the principled shader procedural material won´t show up in MSFS. I´ll try attach the file so you can see what I did.

In general, you need a scene with your object that you want to animate. then add a curve object, a bezier curve, circle or whatever, and shape it to your liking. Then select your object that you want to follow the path, choose "constraints" in the outliner and select "PathFollow". Then select your curve as the target and check "Follow Curve", you might need to change the Front Axis so that the Obejct doesn't move sideways. THen click on "Animate Path". Now you should see your object follow the path but the animation will only run for 100 frames. To correct this, choose your curve object, select the Curve Properties and under "Path Animation" choose the number of frames you want. The standard framerate is 25 / second so if you choose 250 frames it will take your object 10 seconds to complete the path once. Whatever number you set here be sure that the animation duration in Blenders animation editor is the same. Now your animation runs correctly, you need to Bake it to the model itself. Choose your animated object, select "Object --> Animations --> Bake Action and check the first 4 of the 5 available checkboxes. As frame step I usually selct something between 1 and 5 for short and 5 to 20 for long animations, the smaller the framestep the smoother your animation runs but it will also take longer to bake. Press "OK" and wait for the baking to finish. When it´s done, delete your curve and see if the animation still runs, if it baked correctly you will see the same animation without the curve. Now, go to the animation Tab and choose the "Nonlinear Animation Editor". Next to the Action click "Push Down" to create an NLA Track. Now choose a Name for that track, THAT WILL BE THE ANIMATION NAME in the xml file later, so be careful to use the exact same name in the xml as in the NLA Track. The name of the track itself doesn´t need to be the same as the object your can name it pancake or beverlyhillscop if you want as long as the xml contains exactly that name. Now select your object and export as usual, let the export tool generate an xml for you. Now edit the xml with Notepad++; use the following code:

<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo version="1.1" guid="{The GUID number generated for your model by the export tool}">
<Animation name="name of the xml track" guid="any random guid you can get one from guidgenerator.com" type="Standard" typeParam="AutoPlay" />
</ModelInfo>


Save the xml, add the model to your model Lib and compile as usual, see if the model shows correctly when placed in developer mode.


Cheers, Fabian
 

Attachments

  • test.zip
    2.3 MB · Views: 148
Some screenshots of the workflow:


Screenshot (219).png
Screenshot (220).png
Screenshot (221).png
Screenshot (222).png
Screenshot (223).png
Screenshot (224).png
Screenshot (225).png
Screenshot (226).png
Screenshot (227).png
Screenshot (228).png
 
Superb. Thank you so much for this.

With Blender I only know what I know. And I don't know very much.

Thanks again.
 
I'm playing with this again. Thanks to the guide above I can animate just fine.

What I still can't solve is the model flickering in and out of existence the longer it follows the path in the sim. It's fine for the first sections of the path but then the disappearing starts and doesn't stop.

I thought originally it might be down to the the length of the path, but shortening it doesn't make much difference.

I then thought it might be down to size/ visibility but huge things do the same thing as small things.

Has anyone come across this and is there a simple cure or should I forget the idea?

These aren't simobjects. They're standard objects with the path created in Blender.
 
Strange, I had the same problems with my boats at first but in my case it could be solved by increasing the object´s size (in my case I just added a 50x50 m plane a few metres below the boat and assigned an invisible material to it. I think the problem is that MSFS tends to fade out objects at a certain distance from the user aircraft, and the sim counts the distance starting from the origin of the object, not the actual position of the mesh. So let´s say you´ve got a 10 m boat that travels along a path that leads it 1000 m away from its original position. Let´s assume the sim fades out a 10 m object once it is 500 m away from the user. So after the user followed the boat for 500 m, it will fade out even if it is just a few metres away from the user because its ORIGIN is now 500 m away. I think the only ways to solve this is to either increase the size of the object or to move the origin of the object somewhere to the the middle of its path (which OTOH makes it much harder to place exactly).
 
So after the user followed the boat for 500 m, it will fade out even if it is just a few metres away from the user because its ORIGIN is now 500 m away.

Ah. That is a very good point about the origin. I hadn't considered that.

But this is for an aircraft carrier which is visible from much, much further away than the size of its animation path when it's non animated.

It starts disappearing no more than about 10km from the origin with animation, and the path is a loop that is no more than 15 km from the origin at any point.

I'm not sure what it is about the path that is doing this but I will experiment with the origin. I think I tried an invsible box with a smaller boat and that made zero difference.
 
Ah. That is a very good point about the origin. I hadn't considered that.

But this is for an aircraft carrier which is visible from much, much further away than the size of its animation path when it's non animated.

It starts disappearing no more than about 10km from the origin with animation, and the path is a loop that is no more than 15 km from the origin at any point.

I'm not sure what it is about the path that is doing this but I will experiment with the origin. I think I tried an invsible box with a smaller boat and that made zero difference.
Create a box 100x100m and assign an "Invisible" material to it. That should solve your issue.
 
Create a box 100x100m and assign an "Invisible" material to it. That should solve your issue.

This is two ships combined as one model with a length of 350 metres and a width about the same, but it's still doing it. I will go extra, extra large and see if that works, but it doesn't seem to when animated yet.
 
This is two ships combined as one model with a length of 350 metres and a width about the same, but it's still doing it. I will go extra, extra large and see if that works, but it doesn't seem to when animated yet.
Maybe it can be done with a simobject instead so that the center moves with the object itself?
 
Maybe it can be done with a simobject instead so that the center moves with the object itself?

No doubt a simobject would work better, not that I know very much about them, but this is a moving aircraft carrier that I'll put out as a junk/ joke project because even if it stops disappearing it'll still be borderline useless.

As far as I know you can't add a solid surface to a simobject.

I'll combine the box/ origin thing and see if it works. Thanks for the ideas.
 
Hi all,
Please, Does anyone know if it is possible to keep the vehicle snap to ground during an animation with long path?, the ground is not flat and has different altitudes on the way, i tryed to draw a path on blender with correct altitudes (got on the msfs editor) but on the sim the vehicle fly or under the ground :(, could you help me, thank you
 
Last edited:
Hi all,
Just a short question, I used mamus worldscript recipe (mission file) to animate my ground traffic (please find his excellent tutorial on youtube) Unfortunately I can not find any hint in the mission part of the SDK how to remove the endless loop and have a time based animation instead. Lookin forward to any sugestion. Thanks in advance.
 
Back
Top