- Messages
- 233
- Country
Is that possible to do? Some kind of blender aimation with a script? Does SDK support anything like that and is there any documentation or tutorials on how to do that?
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.
It makes sense, actually I assumed just that, however I don't know how to do this either and could not find any documentation or tutorial about how to do that. Even just the flag animation creation/export is not working for me so far. Flag pole wind alignment I don't even know how to approach... Any advice?Hi,
A flag is composée by two éléments: the flag and his support.
It's the support that you should anim to turn with the wind and it's also the parent of the flag which has it's proprer animation.
<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo version="1.1" guid="{XXXGUID}">
<LODS>
<LOD MinSize="0" ModelFile="ModelName.gltf"/>
</LODS>
<Animation name="AnimationName" guid="XXXGUID" length="360" type="Sim" typeParam2="AnimationName" typeParam="AutoPlay"/>
<PartInfo>
<Name>AnimationName</Name>
<AnimLength>360</AnimLength>
<Animation>
<Parameter>
<Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>
</Parameter>
</Animation>
</PartInfo>
</ModelInfo>
<?xml version="1.0" ?>
<ModelInfo guid="{a152500f-f08e-481b-f2cb-ff01c04e0ef2}" version="1.1">
<LODS>
<LOD MinSize="0" ModelFile="CNC3_Flag-Canada.gltf"/>
</LODS>
<Animation guid="a152500f-f08e-481b-f2cb-ff01c04e0ef2" length="360" name="AnimationFlag" type="Sim" typeParam="AutoPlay" typeParam2="AnimationFlag"/>
<PartInfo>
<Name>AnimationFlag</Name>
<AnimLength>360</AnimLength>
<Animation>
<Parameter>
<Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>
</Parameter>
</Animation>
</PartInfo>
</ModelInfo>
I changed the animation guid to a different value but the flag still does not animate...You need different Guid for Animation and Model.
<?xml version="1.0" ?>
<ModelInfo guid="{a152500f-f08e-481b-f2cb-ff01c04e0ef2}" version="1.1">
<LODS>
<LOD MinSize="0" ModelFile="CNC3_Flag-Canada.gltf"/>
</LODS>
<Animation guid="a152500f-f08e-481b-f2cb-af01c04e0efa" length="360" name="AnimationFlag" type="Sim" typeParam="AutoPlay" typeParam2="AnimationFlag"/>
<PartInfo>
<Name>AnimationFlag</Name>
<AnimLength>360</AnimLength>
<Animation>
<Parameter>
<Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>
</Parameter>
</Animation>
</PartInfo>
</ModelInfo>
<?xml version="1.0" ?>
<ModelInfo guid="{57494dc9-64f5-49d9-b307-411b9fe16954}" version="1.1">
<Animation guid="11a27969-811d-4fba-8eb2-bbfc2d6e0d0f" name="wind" type="Standard" typeParam="Autoplay,Random"/>
</ModelInfo>
<?xml version="1.0" ?>
<ModelInfo guid="{57494dc9-64f5-49d9-b307-411b9fe16954}" version="1.1">
<Animation guid="11a27969-811d-4fba-8eb2-bbfc2d6e0d0f" length="360" name="wind" type="Sim" typeParam="AutoPlay" typeParam2="wind"/>
<PartInfo>
<Name>wind</Name>
<AnimLength>360</AnimLength>
<Animation>
<Parameter>
<Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>
</Parameter>
</Animation>
</PartInfo>
</ModelInfo>
Are you sure it works in MSFS 2020? Seems to be the way it worked in MSX. It didn't work for me... Does it actually work for you in MSFS2020?then turn the flag around 360 degrees with 360 frames.
That works for me. However, I also manage not to create an animation with bones. The problem is always that it totally distorts my model.
SimObjects
+- misc
+- Model_Name
+- model
| +- Model_Name.bin
| +- Model_Name.gltf
| +- Model_Name.xml
| +- model.CFG
+- sim.cfg
Packages/scenery-name
as well as in PackageSources
. The content of model.cfg
and sim.cfg
has been adopted from the EDLP scenery. The model itself works fine when exported as usual into an ArtProj.No, it's the first time I hear about the simobject folder. This is new to me. I wish there was a clear tutorial on how to do this. I was saving this into the regular PackageSources\modelLib\CNC3Model\ where all my models are saved for this scenery. What should I do to get it into the simobject folder, and what should be config files? I'm using Blender2MSFS.Yes 100% in sim.
Do you have the model in the simobject folder?
In the simobject folder of the paderborn freeware scenery you can see how it works.
PackageDefinitions/project-name.xml
file: <AssetGroup Name="SimObjects">
<Type>SimObject</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir>PackageSources\SimObjects\misc\Model_Name</AssetDir>
<OutputDir>SimObjects\misc\Model_Name</OutputDir>
</AssetGroup>
SimObjects
in your PackageSources
folder, within that folder create a folder named misc
, and within that folder, create a folder named Model_Name
.Model_Name
, create an additional folder model
(literally) and if your model has textures, also create a folder named texture
.Model_Name
folder, create a file named sim.cfg
with the following content:[VERSION]
Major=1
Minor=0
[fltsim.0]
title=Model_Name
model=
texture=
[General]
category=StaticObject
Model_Name
folder. If your model has textures, remember to copy them to the texture
folder.Model_Name
, create a file named model.cfg
with the following content:[models]
normal=Model_Name.xml
SimObjects
folder created above directly to the created package. Then it looks exactly the same as in the EDLP scenery, but this was unsuccessful as well.texture
folder need to be present in the Model_Name
folder even when the model has no textures at all. Furthermore, the texture
folder need to contain a file named "texture.CFG" with the following content:[fltsim]
fallback.1=..\..\..\..\scenery\global\scenery\TEXTURE
Thanks. I will try to follow this and see if it works for me. The difficult part is also baking in the cloth weaving animation in blender - I can't make it work on export so far. So there would be one animation with flag weaving in the wind, and the other one for the wind angle. Noth sure how to make both work at the same time... I will try though.I guess I figured it out
It seems like that thetexture
folder need to be present in theModel_Name
folder even when the model has no textures at all. Furthermore, thetexture
folder need to contain a file named "texture.CFG" with the following content:
XML:[fltsim] fallback.1=..\..\..\..\scenery\global\scenery\TEXTURE
Please let me know of this works for you as well!
<Animation name="EDLP_Windsock_Speed_00" guid="65EEB9F1-259C-44CE-954D-69C2420B3431" type="Standard"/>
<Animation name="EDLP_Windsock_Speed_05" guid="4D419C72-7949-4C72-A81F-03BB969ED86D" type="Standard"/>
<Animation name="EDLP_Windsock_Speed_10" guid="1FB42441-63DD-4EBC-9241-3393D378B869" type="Standard"/>
<Animation name="EDLP_Windsock_Speed_15" guid="C1800E30-EF34-444D-93FC-6D5ABE2AAA92" type="Standard"/>
<Animation name="EDLP_Windsock_Speed_20" guid="6C39D52C-E70F-4054-8E9C-1A55EC704574" type="Standard"/>
<Animation name="EDLP_Windsock_Speed_25" guid="64C096E1-67C1-4204-B262-E8425AC8B8F8" type="Standard"/>
<AnimGraph>
<DefaultState name="EDLP_Windsock_Blend"/>
<BlendTreeState name="EDLP_Windsock_Blend">
<Animations>
<Animation guid="65EEB9F1-259C-44CE-954D-69C2420B3431" loop ="True" speed="1" threshold="0"/>
<Animation guid="4D419C72-7949-4C72-A81F-03BB969ED86D" loop ="True" speed="1" threshold="5"/>
<Animation guid="1FB42441-63DD-4EBC-9241-3393D378B869" loop ="True" speed="1" threshold="10"/>
<Animation guid="C1800E30-EF34-444D-93FC-6D5ABE2AAA92" loop ="True" speed="1" threshold="15"/>
<Animation guid="6C39D52C-E70F-4054-8E9C-1A55EC704574" loop ="True" speed="1" threshold="20"/>
<Animation guid="64C096E1-67C1-4204-B262-E8425AC8B8F8" loop ="True" speed="1" threshold="25"/>
</Animations>
<Value>(A:AMBIENT WIND VELOCITY, KNOTS)</Value>
</BlendTreeState>
</AnimGraph>
I tried just the weaving for now. I managed to convert it to keyframes by exporting cloth simulation object to .mdd and reimporting. So no modifier is present now, instead there are tons of keyframes, which is good. But when I start it with the ame command that worked before it still doesn't work:Maybe you can work with multiple objects in Blender and set a parent relation? I.e., you have the root of the bunting that has no weaving animation but has a wind direction animation. In addition, you have the rest of the bunting with the weaving animation as well as a parent relation to the root. When the root rotates, all child elements will rotate as well.
I need to figure out that issue as well because I want to create a windsock next.
<?xml version="1.0" ?>
<ModelInfo guid="{a152500f-f08e-481b-f2cb-ff01c04e0ef3}" version="1.1">
<LODS>
<LOD MinSize="0" ModelFile="CNC3_Flag-Canada.gltf"/>
</LODS>
<Animation guid="11a27969-811d-4fba-8eb2-bbfc2d6e0d0f" name="weave" type="Standard" typeParam="Autoplay,Random"/>
</ModelInfo>