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

SDK Wanting easy guide to simple animation

Messages
1,125
Even though I've been doing this for a long time now, and I have created my own simple animations for previous sims (SODE is great!), I have a few objects which I'd like to rotate to the wind in MSFS. I've studied some of the existing windsock/flag releases, and while I have been able to tweak the SDK sample windsock to my satisfaction, I have no idea how it actually works, or how to even rotate a simple weather vane. I'm hoping that someone can give a beginner's guide, so I can actually understand each step of the process:)
 
well, the question is what you mean with "simple" animations :)

There are a few good tutorials how to do a simple animation. But i wouldnt call a flag or something "simple". Do you really mean simple? I could look around but ive seen some here, like one that animates a plate based on wind, for example.

If its really about simple animations, this would be maybe for you, if youve not seen it already.


If you want to do that based on wind, there was a topic here in the forum where this was discussed. Basically one has to do a modelbehaviour file to start the animation.
Ive not done that part to connect the both but i could show you how to "do things based on wind" or give you a working example. The animation part you see in the video. Not sure how much that helps so far. Ive seen this discussed here though, im nearly sure.
 
Yes, the animation is not the issue, it's just getting it -- in fact anything -- to rotate to the wind. I have an animated flag, and I don't really need it to react to wind strength, just rotate. But to simply things, I'd just like to start with a weather vane:)
In my current project there is a vane on top of one hangar, I wouldn't rely on it when there are plenty of working windsocks there, but it does add character!
 
Code:
<?xml version="1.0" ?>



	<ModelInfo guid="{6918f4d1-4f24-493a-c275-96884fb620b5}" version="1.1">

		<LODS>

			<LOD MinSize="0" ModelFile="LIDT_METEO.gltf"/>

		</LODS>




<Animation guid="b8d2b2a4-a3dc-4ebf-8fe9-6bc593360ac1" length="360" name="winddirection" type="Sim" typeParam="AutoPlay" typeParam2="winddirection"/>

		<PartInfo>

			<Name>winddirection</Name>

			<AnimLength>360</AnimLength>

			<Animation>

				<Parameter>

					<Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>

				</Parameter>

			</Animation>

		</PartInfo>

	</ModelInfo>

Above the code you need for an animated vane (really, any object reacting to Wind direction)


In Blender, add your object, give the mesh the name "winddirection"
Go to animation
Change animation lenght to 360 Frames
Go to frame 0, insert Key frame type rotation
Go to frame 360, rotate your object 360 degress over the Z axis
Add another keyframe type rotation
Change interpolation mode to linear
Change the animation name to "winddirection"
Push down the animation to nlaEditor
Export your object

Should work,

You can take a look at working examples
Here:


The simbojects "lidt_meteo" contains wheather vane and working anemometer

If you Need the blender source, glad to share

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
That looks like just what I need! I'll take a look tomorrow morning, and let you know how I get on.
Thanks for the offer of the blender file, but I use 3DS Max. Luckily your steps make sense to me using Max:)
 
Code:
<?xml version="1.0" ?>



    <ModelInfo guid="{6918f4d1-4f24-493a-c275-96884fb620b5}" version="1.1">

        <LODS>

            <LOD MinSize="0" ModelFile="LIDT_METEO.gltf"/>

        </LODS>




<Animation guid="b8d2b2a4-a3dc-4ebf-8fe9-6bc593360ac1" length="360" name="winddirection" type="Sim" typeParam="AutoPlay" typeParam2="winddirection"/>

        <PartInfo>

            <Name>winddirection</Name>

            <AnimLength>360</AnimLength>

            <Animation>

                <Parameter>

                    <Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>

                </Parameter>

            </Animation>

        </PartInfo>

    </ModelInfo>

Above the code you need for an animated vane (really, any object reacting to Wind direction)


In Blender, add your object, give the mesh the name "winddirection"
Go to animation
Change animation lenght to 360 Frames
Go to frame 0, insert Key frame type rotation
Go to frame 360, rotate your object 360 degress over the Z axis
Add another keyframe type rotation
Change interpolation mode to linear
Change the animation name to "winddirection"
Push down the animation to nlaEditor
Export your object

Should work,

You can take a look at working examples
Here:


The simbojects "lidt_meteo" contains wheather vane and working anemometer

If you Need the blender source, glad to share

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
Hello,

I am trying to create an object that reacts to the wind. Would you mind sharing the blende source with me? Thank you
 
Code:
<?xml version="1.0" ?>



    <ModelInfo guid="{6918f4d1-4f24-493a-c275-96884fb620b5}" version="1.1">

        <LODS>

            <LOD MinSize="0" ModelFile="LIDT_METEO.gltf"/>

        </LODS>




<Animation guid="b8d2b2a4-a3dc-4ebf-8fe9-6bc593360ac1" length="360" name="winddirection" type="Sim" typeParam="AutoPlay" typeParam2="winddirection"/>

        <PartInfo>

            <Name>winddirection</Name>

            <AnimLength>360</AnimLength>

            <Animation>

                <Parameter>

                    <Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>

                </Parameter>

            </Animation>

        </PartInfo>

    </ModelInfo>

Above the code you need for an animated vane (really, any object reacting to Wind direction)


In Blender, add your object, give the mesh the name "winddirection"
Go to animation
Change animation lenght to 360 Frames
Go to frame 0, insert Key frame type rotation
Go to frame 360, rotate your object 360 degress over the Z axis
Add another keyframe type rotation
Change interpolation mode to linear
Change the animation name to "winddirection"
Push down the animation to nlaEditor
Export your object

Should work,

You can take a look at working examples
Here:


The simbojects "lidt_meteo" contains wheather vane and working anemometer

If you Need the blender source, glad to share

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Hi.. Not having success yet.. but will continue..
I created the SimObject file as described and placed and changed the files from SDK.
I tried both, putting an empty and linking the tetrahedral to the empty, and simply doing a 360 rotation on Z on the tetrahedral. I thought that the former was better as I could name the empty - "winddirection", whereas, I was not sure if the name for the NLA needed to be the same as the object name.

I do the animation and it works fine, although I am not sure if one should do it 0-360 or 0 to 359 or 1-360? Which is the correct way in which the coding for the wind will identify?

Another minor point.
I took a look at your airport and was impressed.
Loved your airport (LIDT) and the way your weather vane works. Perhaps someone has already mentioned it, but it appears that the weather vane is backward. :) The arrow, in a weather vane and tetrahedral, should point to where the wind is coming from and the feather should point toward where the wind is going. So, if the wind is coming from 270 degrees the arrow will point to 270 degrees and the tail will be at 90 degrees. (the opposite of the windsock) Perhaps using the same coding as the windsock is slightly incorrect and needs to be adjusted or perhaps just making the model point the opposite way in Blender.

Appreciate everything you do.
Thanks
 
Last edited:
Back
Top