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

FSXA How to Animated a Train....by skin and bone.

jtanabodee

Resource contributor
Messages
3,924
Country
thailand
Hi,
I have done animated KLIA express in this video.
KLIA Express to the airport to the Kuala Lumpur International Airport


It was quite good until I found in the video it had a gap when it turn on the track.

So I thought I would redo it as skin and bone animation so there would be no gap between bogies.
So I did it again and capture the whole process for the tutorial. Since I did it so many times and I often forgot the process here and there.

The main principle is each bogie has its own path but they start and stop and different place. The first bogie has early starting point but end further than other bogie. I used to animate the train with link the bogie one after the other like the real train. But it is difficult since I have to animate every bogies at certain frames along the course of the first bogie.

The steps are here:
A. Working on the track
1. You need to make a Gmax reference plane according to this tutorial. It is essential to all the model to be built by this plane so it will match the real coordinate of the round world in FSX. Please take a look at this tutorial http://www.fsdeveloper.com/forum/attachments/gmaxreferenceplane-pdf.13462/
2. Draw the line to fit the track in Gmax reference plane and name the line to be Track. It will be used later time, so you need to clone the line by copy for further use. Then name it as Line01. Choose the color of the line that clearly visible such as yellow.

Train01_zpsdd61d78f.JPG


3. Make template for the track (in the picture is Track_template) make sure it is bigger than your train. Then use Sweep (3dsmax) or Loft (Gmax) to make track. Make sure that the track is wider than your train. That red object is my train. Click on Gen mapping to map texture along the length. I preserve the entire right side of my texture to be the train track. So the drawcall should be minimized.

Train02_zps77218155.JPG


3.Unwrap the mapping and make it fit to the texture in horizontal.

Train03_zps80cfbb44.JPG


Then stretch the mapping along the length to make texture repeated along the length until you satisfy with the resolution along the length.

Train04_zpscaf5d861.JPG


4.Move the Line01 that you just copied earlier to the height of the Track. Then make copies of your line to be line 01,02,03,04 to fit the number of bogies in the train. Each line will be use to animate each bogie.

Now you are done with your track. The reason you need to make track since the animation will disappear when it is far from the center if there is no other objects around. If you animate only the train, it will be disappear when it get far from the center. The track will keep the train visible all the time.

NEXT, you need to work on the train:
KliaExpress_zps673be4fe (1).JPG
 
Last edited:
B. Working on the train
Now you need to work on your train.


1. You need to attach all the bogies of the train together all the vertices should be weld to be the single vertex at each bogie if you make them separately. If you attach all the bogies together, it is now to do ResetX form to make it a new thing. If you don't do it, there might be a problem when exporting
You had better save the train somewhere else to be a template if you do something wrong you can merge the train and do it again.

2.Draw bone on the top view using 2.5 snapping to the mid point. So when I draw the bone it will stay on the ground. Make bone for each bogie as figure.

Train05_zps767659b4.JPG


Your train will look like this.

Train06_zps0d86c326.JPG


3. Change your train into skin and add bones to the skin. The vertices will automatically assign to the bone. when the train turns on the tract the side of the train will stretch a bit but no one notice that on the running train.

Train07_zpsb151e164.JPG


4.Leave you skin train there. From now on, you need to animate the bone, not the skin. Set up your time frame to your need. It depends on the length of the tract and how fast you like.
5. Choose each bone and get to the animation tap, click on Prameters and scroll to the top of the panel and click on Assign Controller, using path constrain.

Train08_zps43b4dff4.JPG


and add path by choosing the line 01, 02 03 04 according to each bogie. So bone 01 should use line 01 progressively.

Train09_zps46d36c66.JPG


Check on Follow, Constant velocity and check out for loop.

Train10_zps202dca90.JPG


Then you go to perspective view. Your train will look like a chunk of bogie! OMG.
Do not panic. Since all the lines begin in the same place. All we need is to adjust the beginning of those lines according to the starting point of each bogie.

Train11_zps0427ba46.JPG


You might need the original train by side to adjust for the next step. Merge it from the original file and place it along the side of Bone IK train.

Train12_zpsb97a8d48.JPG



6. Choose the Line01 Then choose the first vertex of the line. Move it along the tract until it reach the level of the first bogie as original train. The train will stretch along the line. The choose the Line 02 and do the same way, move the first vertex to the level of the second bogie on original train.....do it again with Line 03 and 04. Now the starting points of each bogies are in the right places.
Train13_zpsf7189f57.JPG


7. OMG, the train still looks ugly...

Train14_zps65c6151a.JPG


Please continue reading the part B in the next thread. The pictures are out of the limit.
 
Last edited:
Part B: (continue)
It is because the orientation of the bone is not right. Just adjust it a bit. You need to put angle snap to 90 degree and choose each bone and rotate.
This pic I rotate the first bone 90 degree to the left, here comes my first bogie.

Train15_zps5c4945f3.JPG


Then the second bone 180 degree.

Train16_zps9eb7af38.JPG


Then the third bone 90 degree (can't remember exactly, you need to try on yourself).

Train17_zpsc8e8005d.JPG


Then the last bone. Voila!

Train18_zpsc6ff2029.JPG


Now you can let your train go. Love this moment, it moves along the line nicely.
Let it go to the end and you will see a chunk of the bogies again.

Train19_zps1af3f131.JPG


Use the same method as the beginning. Move your original train to the last scene and adjust vertex of the LINE 01, 02, 03, 04 according to the resting site of each bogie.

Train20_zps6bd5f58b (1).JPG


C. Working on exporting the model
Now you ready to export.
1. Choose each bone and choose Trajectory. Put number of the frame in and sample should be depends on the length of the track. If it short can be 30 if it is long should be more than 50. But too many frame can have problem when exporting. Do this for each bone until you are done.

Train21_zpsc74491d7.JPG


2. Tag the bone with Animation manager, choose Ambient and put number of frame in then choose another bone and update selection and click on create. The animation will be tagged for each bone. Don't forget to check Skin on your material setting.
If you have problem with animation tag, please check this out.
http://fsdeveloper.com/forum/showthread.php?t=20241&highlight=export animation

3. Choose object to export and check on Export animation and Export Skin too.

Train22_zpsbf7e1974.JPG

If you use 3dsmax you will get Xanim and X file you need to use Xtomdl.exe to compile animation. Please take a look at the method http://www.fsdeveloper.com/forum/threads/compile-by-using-short-cut.428983/#post-661807

Try it and see how fun it is.
 
Last edited:
Wow, thanks for that tutorial, very useful.

We took that train last time we were in KL, great rendition, by the way :-)

Cheers,
Mark
 
Nicely done sir! BTW, just for the sake of clarity, the word is "track." A "tract" is a pamphlet or booklet one gives away. :duck:
 
Sorry Bill, I might confuse with these two words, track and tract. I corrected that.
One other thing I forgot to mention, there is no need to do Earth Curvature correction in MCX at all. The animation works nicely on the right position in FSX world.
 
Last edited:
One other thing, you need to get rid the shadow. Since MCX cannot correct the curvature of the earth in Bone-Skin animation, no shadow will make an illusion to the train and the tract to be on the ground. Actually it float a bit.
 
Thanks. Looks like you missed three of them though, unless you can't find those.
 
I got them all. I went through the link and download the pictures. Then I attached the pictures to the thread. From now on, there should be no problem.
Thanks to the thread that we can attach pictures.
 
Back
Top