• 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 Blender cloth simulation baked to bones

Messages
85
Country
france
Hi guys,

I have been tring for weeks to achieve some animation on flags.
I have followed a tutorial that trfsd gave us (thanks to him !)
However, this is the best I can have today (I have the Default_State)

Can someone help me ? I'm totally blocked !

Of course, I will gladly pay beers or coffee :)

1633281042774.png




EDIT: Seems there is an issue with the script 1 and 2. I did it manually and it's all ok now
 

Attachments

  • Creating an animated flag.pdf
    438.4 KB · Views: 137
  • step_8.zip
    409.6 KB · Views: 123
Last edited:
Messages
10
Country
ca-quebec
I have added US state flags to bring the total number of flags in the library to 300. More importantly, with some suggestions from @Photosbykev and a little reading here on the forums, I worked out the specific steps to create a "repaint" of a flag model, and wrote up the instructions in a tutorial document that is included in the download. So if you can't find the flag you need in the 300 that are already in the library, you can create your own artwork and repaint one of the existing flag models in the library. Have fun.
I'm going to try today cuz I couldn't find a Canadian Flag.. :)
 

Rotornut44

Resource contributor
Messages
537
Country
us-florida
@trfsd
I'm following your tutorial, but am trying to adapt it for a windsock, whereas everything seems to be written for a flag. However, I'm getting stuck on baking the cloth simulation with the bones.

I have everything set up exactly as described in your tutorial, the only difference is I have been doing everything the scripts do manually, because they haven't been working correctly. After I get the animation start and end that I want in the timeline and do the "Pose>Animation>Bake Action process, I can see keyframes generated in Nonlinear Animation. I then proceed to rename the Action Strip, drop down the NLA track and rename it to match.

If I hover over the NLA track and hit tab, I can see keyframes. They keyframes do not appear on my Dope sheet or Action editor until I do this.

The bones and mesh are not affected by the animation in any way. It's almost as if they are not linked, however as far as I'm aware, they are.

Any ideas?
 

Rotornut44

Resource contributor
Messages
537
Country
us-florida
Small update. I was able to figure out how to get the cloth simulation to bake to the bones.. kinda. I forgot to add a track to Bone Constraint. However, now I'm greeted with this jumbled twisted mess:


whatamess.PNG


Any ideas? This is what the simulation looks like:
normal_sock_sim.PNG
 
Messages
127
Country
czechrepublic
trfsd I put one of your windsocks to my scenery. The simple one, put ui on top of my pole. Its okay in the developer mode, but whe I export the scenery and load it in the sim, it just moves a bit lower. Is it normal or any limitation? I have this problem with the default windsock also, it doesnt keep scale.

Thank you
 
Messages
144
trfsd I put one of your windsocks to my scenery. The simple one, put ui on top of my pole. Its okay in the developer mode, but whe I export the scenery and load it in the sim, it just moves a bit lower. Is it normal or any limitation? I have this problem with the default windsock also, it doesnt keep scale.

Thank you
Have a look at the FAQ at https://flightsim.to/file/14024/windy-things#pills-faq. You cannot scale Simobjects.
 
Messages
19
Country
germany
Hey there,

with the help of the first posts in this thread of @Mikea.at I've managed it to successfully import my first animation to MSFS :) Thanks for that!
As a next step, i want to create a separate animation depending on the current windspeed. The xml stuff is totally clear for me. But i have no idea which are the steps in @Mikea.at instructions, that have to be adjusted (or redone for each animation).
Can please someone give me a hint? :) I'm new to NLA and DopeSheet in Blender. So, the more details, the better.

PS: I'm working without the py script
 
Last edited:
Messages
9
Country
denmark
So I have a question regarding the tutorial on creating my own custom animated flag. I am following @trfsd 's tutorial on this and have gotten to the third section, where I have added an armature (a bit off the cloth-plane as per the instructions in here) and thereafter bones and ensured to snap them to the vertices created by the "00" Python script. I now have to rotate both the armature (and bones) and the plane 90 degrees from the XZ-axis to the Y axis, but when I do this, the plane with the "flag_cloth", which had the transforms applied and therefore was able to rotate around the flag pole evenly, now seems to use the armature as a pivot-point, thus rotating unevenly (ref. the pictures).

untitled.png


untitled2.PNG


What can I do about this? If I simply alter the "coordinates" in the object properties, the armature will not be snapped to the vertices in the plane with the "flag_cloth".
Do I need to redo the whole alignment?

Thanks in advance. This is really a steep learning curve to me, and having no pictures on a "step by step" isn't my thing 😅

/VALROK
 
Messages
9
Country
denmark
I rotated the plane with the armature to face the positive Y-axis and then "realigned" them both roughly. I don't know if that is going to cause issues at some point, but I am at a loss - as mentioned, this is a steep learning curve to me.

I now face an issue under the section 7 of the tutorial made by @trfsd , AFAIK with help from @Mikea.at and @karlo922 , with creating the wind speed animation. My issue is, when I create the wind effect under the new collection with the "flag_cloth"-plane, the cloth "slides" down the flag pole no matter the wind speed and then "rips off" it, when starting the animation at wind speed of 100+. The bones seem to animate fine and stay in place though. I need the cloth to stay in place and animate in the wind.

Video of the bug:

My project is linked below, if anyone needs to look through it for bugs:
https://we.tl/t-hzWqrPNGCh

I sincerely hope someone can assist me in this issue.

Thanks in advance!

/VALROK
 
Messages
19
Country
germany
I rotated the plane with the armature to face the positive Y-axis and then "realigned" them both roughly. I don't know if that is going to cause issues at some point, but I am at a loss - as mentioned, this is a steep learning curve to me.

I now face an issue under the section 7 of the tutorial made by @trfsd , AFAIK with help from @Mikea.at and @karlo922 , with creating the wind speed animation. My issue is, when I create the wind effect under the new collection with the "flag_cloth"-plane, the cloth "slides" down the flag pole no matter the wind speed and then "rips off" it, when starting the animation at wind speed of 100+. The bones seem to animate fine and stay in place though. I need the cloth to stay in place and animate in the wind.

Video of the bug:

My project is linked below, if anyone needs to look through it for bugs:
https://we.tl/t-hzWqrPNGCh

I sincerely hope someone can assist me in this issue.

Thanks in advance!

/VALROK
Looks like you forgot to set the the "Pin Group" inside your Cloth settings. You can find it under "Cloth Modifier --> Shape --> Pin Group".
 
Messages
9
Country
denmark
Looks like you forgot to set the the "Pin Group" inside your Cloth settings. You can find it under "Cloth Modifier --> Shape --> Pin Group".
Thanks for your answer. This appeared to be the issue regarding the plane "sliding" off the pole. It got me a bit further into animating the flag.

I've gotten to section 7 in the tutorial, under:
"Set the Timeline back to frame 0.
If you are going to repeat this step to make another animation with a different set of Cloth and/or Wind settings, then select all bones and run the “01” script while still in Pose Mode."

I have baked the first animation with the middle intensity of the wind ("1200"). In order to create a somewhat "perfect loop", I selected frame 63 as the starting frame and frame 481 as the ending frame (as seen on the timeline below):
untitled.png

Now.. When I move the action ("Wind_1200") onto its own NLA track, and then move its left edge to start at frame 0, the animation doesn't activate until the needle passes frame 63. How do I go about "setting the timeline back to frame 0", as the tutorial (attached) states and so the animation will start, when starting the playback?

I want to recreate the settings in the tutorial, so I am sure the flag will behave differently in different wind conditions and utilize MSFS winds.

Project file: https://we.tl/t-gbd0HTbm5S
 

Attachments

  • Creating an animated flag.pdf
    438.4 KB · Views: 53
Last edited:
Messages
19
Country
germany
At least I've managed to add several NLAs to the armature of the windsock and bind them to the wind velocity :) But the rest is awful! No idea where the strange distortions come from and why the windsock is rotated this way


Here is a screenshot from what i exported:
1645047964091.png
 
Last edited:
Messages
372
Country
austria
To fix the distortion, search for the default_state animation. This fixes the distortion.
 
Messages
9
Country
denmark
At least I've managed to add several NLAs to the armature of the windsock and bind them to the wind velocity :) But the rest is awful! No idea where the strange distortions come from and why the windsock is rotated this way

Perhaps you could enlighten me on how I can move the animation to frame 0 then? 😅 As mentioned, when I drag the animation to start at frame 0, the animation won't start until the playback reaches its starting frame (63).
 
Messages
19
Country
germany
To fix the distortion, search for the default_state animation. This fixes the distortion.
Thanks! Somehow i missed that :) @Mikea.at maybe add this to the wonderful step by step guide at the beginning of this thread?

So my exported file with animations looks now like:
1645109023199.png


Also the xml file was adjusted to contain the "Default_State":
XML:
...
<AnimGraph>
   <DefaultState name="Default_State" />
   <BlendTreeState name="Default_State">
   <Animations> ....

But the result is still aweful 👼
1645108971781.png
 
Messages
19
Country
germany
Perhaps you could enlighten me on how I can move the animation to frame 0 then? 😅 As mentioned, when I drag the animation to start at frame 0, the animation won't start until the playback reaches its starting frame (63).
Sorry, i don't wanna give any tip that goes beyond using blender as I'm myself far away from using it safe in combination with msfs sdk ;)
 

Rotornut44

Resource contributor
Messages
537
Country
us-florida
@sasquotschi Have you tried to apply scale/transforms in blender? Select all in object mode with "A", then Ctrl-A, apply all transforms.
 
Messages
9
Country
denmark
Sorry, i don't wanna give any tip that goes beyond using blender as I'm myself far away from using it safe in combination with msfs sdk ;)
It is actually still "only" within Blender. I haven't reached a point where I can export any of the project, sadly.

It should be simple, yet it's one of the more complex steps in this project -.-
 
Top