• 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 Help needed - train to follow path and turn

Messages
25
Country
finland
Hi there. I am making this new TrainMod to the MSFS2020. Just thinking possibilites at the moment. This is what i can do now:
- make simple 3d train model without textures, only colours used
- export real world railroads from OSM database to blender with OSM addon
- make path over the real world path in blender
- make trains to follow that path with edited speed


This is early alpha with glitches:

This is what i want to do, but dont know how:
- make train to turn like real one. So the cart´s turn one by one. I did try with armature (bone) structure with help of couple of youtube tutorials, but still no luck.
- the cart´s will turn with keyframe method, but i have to turn every single cart in correct posessions. It is like making playdough animation.

Here is zip file contaning: https://drive.google.com/file/d/1QAfPVc3k8OlvHkvtibJrftrJMz5VZ20c/view?usp=sharing
- basic 3d model i use
- that model with bone stucture
- that bone model with follow path, but carts dont turn. I will turn as a straight train still.

Hope someone can help me to make this happen. I will do explained pdf for everyone to make trains in scenery, step by step.
 
Last edited:
Train with follow path


Should work

Better to parent every wagon to an empty, and bake the animation to them

Remember that animations add stress the Sim, and a baked animation stress It more.

( In my animations i used to do simple keyframes rather than baking when possible, the result is smoother, check che cable cars here if you like:

About the idea of doing that extensively with OSM, i also had that in the past and have discarded It

Main reason Is elevation problem, the elevation in the Sim Is not the same of the imported data , your trains will likely dive into the mountains or floating mid air

The other reason Is , as you have already noticed, OSM accuracy and consistency with aerials

Because of this, manual correction Is always needed, hence no way to automate the process, and the idea of doing a global addon for trains, with this method, was discarded





Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Train with follow path


Should work

Better to parent every wagon to an empty, and bake the animation to them

Remember that animations add stress the Sim, and a baked animation stress It more.

( In my animations i used to do simple keyframes rather than baking when possible, the result is smoother, check che cable cars here if you like:

About the idea of doing that extensively with OSM, i also had that in the past and have discarded It

Main reason Is elevation problem, the elevation in the Sim Is not the same of the imported data , your trains will likely dive into the mountains or floating mid air

The other reason Is , as you have already noticed, OSM accuracy and consistency with aerials

Because of this, manual correction Is always needed, hence no way to automate the process, and the idea of doing a global addon for trains, with this method, was discarded





Inviato dal mio Mi 9 Lite utilizzando Tapatalk
Yes i agree about the elevation data. Thats why i am making only 1-2km long paths and teffaform railroads to be flat so trains arent ghosting under the ground. My first thery was use google 3d data with renderdoc and edit follow path waypoints also in Z-axel. But i didnt have succes to have renderdoc working.

I dont get that parent to the empty. I was watching one tutorial, but that woman was so bad to make tutorial videos. So i will make 5x empty insiden of 5 wagon and parent those? And bake animations to empty instead of wagons?

Those bone carts did work with keyframes, but it was like making playdough animation. Cant do that, limited time i have. With cablecars i should work, because they are going straight line.

We will see, how much i will cost fps when it finished. My plan is make two versions:
- trains only near landing paths with Helsinki and Malmi airports.
- trains all over the Helsinki Metropolitan area.

Users can choose what to install.
 
I dont get that parent to the empty. I was watching one tutorial, but that woman was so bad to make tutorial videos. So i will make 5x empty insiden of 5 wagon and parent those? And bake animations to empty instead of wagons?

Those bone carts did work with keyframes, but it was like making playdough animation. Cant do that, limited time i have. With cablecars i should work, because they are going straight line.

We will see, how much i will cost fps when it finished. My plan is make two versions:
- trains only near landing paths with Helsinki and Malmi airports.
- trains all over the Helsinki Metropolitan area.

Users can choose what to install.


Ahh ok got It, when you talked about OSM was thinking about some global mod


Basically yeah, select a wagon, edit mode, select the bottom vertex of the head, shift+s, cursor to selected, object mode, add empty, parent the wagon to the empty (empty Is the parent and wagon Will be the child)
Than add the follow Path constraints to the empty, animate path and bake

(Asobo use empty for all the animation as we can see in the aircraft tutorial,.wich Is Extremely interesting even for scenery devs)

Was in the idea of making a follow Path tutorial, subject should have been a tractor or snow plower, maybe i can add a wagon behind it to simulate a train


(Btw, the cable cars paths have curves too at each pylon )


Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Last edited:
My skills are just not for this kind a hard blender coding. Didnt work at all. I will continue with straight models.
 
You could simply make each section of the train a separate model and animate them to work together. It will be a lot more fiddly but will get the effect you want.
 
Last edited:
You could simply make each section of the train a separate model. It will be a lot more fiddly but will get the effect you want.
Do you mean, that i will make every wagon as a separete model, follow path to every wagon and place them in line, and after that make that to every 5 trains in 2km length of trail... sounds that it will make lots of time. But i think about it, at least try it.
 
Do you mean, that i will make every wagon as a separete model, follow path to every wagon and place them in line, and after that make that to every 5 trains in 2km length of trail... sounds that it will make lots of time. But i think about it, at least try it.
Yes.

It will be very boring and will require a lot of adjustment but it should work fine.
 
No luck. Not with my skills.

I did
- one NurbsPath (path)
- 5 objects (5 wagons)
- every wagon attached to that one path

-) they still turn as a one single line.

Here is image what is the problem, that orange circle. I dont have skills to match my wagon over that orange circle. I move location of wagon, that orange spot is moving also. So when i place the wagon to the path, that orange line is one wagon ahead and wagon wont turn right. It is like drifting. And with 5 wagons, they are using that orange spot... all of them. There sould be 5 orange spots, right?
problem.jpg
 
Ahh ok got It, when you talked about OSM was thinking about some global mod


Basically yeah, select a wagon, edit mode, select the bottom vertex of the head, shift+s, cursor to selected, object mode, add empty, parent the wagon to the empty (empty Is the parent and wagon Will be the child)
Than add the follow Path constraints to the empty, animate path and bake

(Asobo use empty for all the animation as we can see in the aircraft tutorial,.wich Is Extremely interesting even for scenery devs)

Was in the idea of making a follow Path tutorial, subject should have been a tractor or snow plower, maybe i can add a wagon behind it to simulate a train


(Btw, the cable cars paths have curves too at each pylon )


Inviato dal mio Mi 9 Lite utilizzando Tapatalk
I did find your video:
I am little stuck. Synching trains to match bing routes is hard and slow, because my lenght of paths are 2-3km and there are corners on the way. And there is glitches with my models, other part Helsinki their are stuttering and other parts arent. But maeby i will try to do this.
 
1- This looks very promising: A TRAIN-simulator inside MSFS2020 (flight) simulator.

2 - K.I.S.S. - Keep It Stupid Simple @ first by reducing (train / scenery) complexity;

First get the basics right, make it work with just 1 train wagon (for example the locomotive) and see how that goes.
Why? At first get this done and nail it straight down into an art-form/an animated science until you can dream this first

3 - Once you have passed passed that "single-wagon-animation station", and everything trains 100% fluently,
Only then you should increase train-complexity and see how it goes with only 2 wagons perfectly following each-other

fsd_830m_finisch_frieght_train.jpg

4 - Then scale all the way up, to any possible number of wagons you want to build a train with (for example this 830m long freight train)
-https://railcolornews.com/2020/03/3...-train-vr-debuts-an-830-m-long-freight-train/

5 - IDEA (for future development): is it technically possible to make those trains drive-able (as in Dovetail Games Trainsimulator?)
-https://live.dovetailgames.com/live/train-simulator

By for example adding AFCAD-type-of-(AI)train-tracks into your MSFS2020 scenery?
 
No luck. Not with my skills.
1 - May I then suggest to first amp up your Blender (basic and animation) skills? Look on the GoogleTube for mechanical animations like the ones below:
TIP: "Character animations" are useless in this scenario, use mechanical animations
-https://www.youtube.com/results?search_query=blender+2.8+mechanical+animation
-https://www.youtube.com/results?search_query=blender+2.8+mechanical+rigging

I did
- one NurbsPath (path)
- 5 objects (5 wagons)
- every wagon attached to that one path
-) they still turn as a one single line.

fsd_blender_train_error.jpg

2 - If they "turn as one", then - perhaps for Blender - they ARE still "one" (3D object model)
See posting above, Start with only 1 wagon and get it right, then later add more complexity / wagons

Here is image what is the problem, that orange circle. I dont have skills to match my wagon over that orange circle. I move location of wagon, that orange spot is moving also.
3 - The orange spot is the (displaced) Origin of your 3d model, so its keep connected at all time.

So when I place the wagon to the path, that orange line is one wagon ahead and wagon wont turn right. It is like drifting.
4 - Look at image above: You need to reset the Origin of train wagon back to the heart of the 3d volume shape

5 - And with 5 wagons, they are using that orange spot... all of them. There should be 5 orange spots, right?
Nope! It seems to me that you have created only 1 train-model, and then cut it up into 5 different pieces
BUT those 5 (visually loose) pieces are still (3d object-technically) connected to the same original Origin you started with.
This is the why behind the fact that you still have 1 origin.


TIP: Get your Blender Basics right first, this will help you to understand what goes wrong here.

EDIT: Start reading over here in the Blender online manual: (On what object orgins are and how to set them right)
-https://docs.blender.org/manual/en/latest/scene_layout/object/index.html
-[URL]https://docs.blender.org/manual/en/latest/scene_layout/object/origin.html[/url]
-https://docs.blender.org/manual/en/...individual_origins.html?highlight=origin{/url]
 
Last edited:
fsd_train_wagons_origins.jpg

1 - Just a quick example of you should have seen:
- LEFT : 2D or 3D viewport - 3 separate objects, from which its Origin (that 3 Arrow thingy, with the Red, Green, Blue arrows) is in the center of its 3D volume/shape.
- RIGHT: Inside the Outliner - 3 separate objects, one for each individual and separate train-wagon.

2 - Why is having a correct 3D Origin location important? That is the (only centre) point which gets calculated and animated by Blender:
So you have to make sure it the Origin of any 3D shape is located in exactly the right spot first (for example: the centre or the bottom of the 3D shape)
before you start thinking about along which "animation-pathways" (aka the Bing provided train tracks) you want to object to move that origin.
 
Last edited:
Back
Top