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

Christian Bahr

Resource contributor
Messages
892
Country
germany
Hi!
A small step forward in my current project ... a clock as a SimObject ....


If you are interested, here is the code:
<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo version="1.1" guid="{59589256-fb71-4d94-99d8-953dc12312be}">

<LODS>
<LOD MinSize="0" ModelFile="edle_analog_uhr.gltf"></LOD>
</LODS>

<Animation name="mh_tower_stunde" guid="e8fc23f9-02fa-47ad-8ad0-491a299a3247" typeParam2="mh_tower_stunde" length="120" type="Sim" typeParam="AutoPlay" />
<Animation name="mh_tower_minute" guid="b1febb79-6e28-4c49-a9d9-2ac42fa7b251" typeParam2="mh_tower_minute" length="60" type="Sim" typeParam="AutoPlay" />

<PartInfo>
<Name>mh_tower_stunde</Name>
<AnimLength>120</AnimLength>
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, hour) 12 % 10 *
</Code>
</Parameter>
</Animation>
</PartInfo>

<PartInfo>
<Name>mh_tower_minute</Name>
<AnimLength>60</AnimLength>
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, minutes) flr 60 %
</Code>
</Parameter>
</Animation>
</PartInfo>
</ModelInfo>

I fished the formulas for calculating the hours and minutes out of the forum somewhere, many thanks to the author of these formulas!!!
 
Messages
23
Country
switzerland
Problems with calculation and XML-file:

Dear community
I am now testing my animated object and I have two questions:

1/
My animation in blender is 780 frames long, how shall I have to define the duration in the parameters? Here is my idea, will this work:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<Animation name="Ghost" guid="b753bd00-1108-4b21-bed0-09b8df6091bd" typeParam2="Ghost" length="780" type="Sim" typeParam="AutoPlay"/>

<PartInfo>
<Name>Ghost</Name>
<AnimLength>780</AnimLength>
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, seconds) flr 780 %
</Code>
</Parameter>
</Animation>
</PartInfo>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2/ SDK compiling is producing an error I do not understand, I have used the same code logic as Christian Bahr, but an error while compiling states a parsing error:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ModelInfoLoader
File: bfd_ghost.xml
Error parsing XML: expected element name

Error encountered here:
ter> </Animation> </PartInfo> </ModelInfo>
Failed to load container file info for container[0]: 'G:\FlightSimulator\DEVELOPEMENT_FOLDERS\BushFlyingDelight Adventures Kodiak\PackageSources\SimObjects\misc\bfd_ghost\'
AssetBuilder | Could not find a valid simobject in 'G:\FlightSimulator\DEVELOPEMENT_FOLDERS\BushFlyingDelight Adventures Kodiak\PackageSources\SimObjects\misc\bfd_ghost\'. Does it have one of [aircraft.cfg / sim.cfg / container.cfg] and does it reference the correct model folder(s)?
PackageBuilder | Failed to spawn lister for asset group bfd_ghost (type SimObject)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

It is really hard to learn XML, but I really want to insert Animated SimObject in my scenery, thank you for any kind of help.

Here the complete xml:

<?xml version="1.0" encoding="utf-8" ?>

<ModelInfo guid="{9bc1882c-244c-4637-d3a7-3511e62e7bd4}" version="1.1"/>

<LODS>
<LOD MinSize="0" ModelFile="bfd_ghost.gltf"/>
</LODS>

<Animation name="Ghost" guid="b753bd00-1108-4b21-bed0-09b8df6091bd" typeParam2="Ghost" length="780" type="Sim" typeParam="AutoPlay"/>

<PartInfo>
<Name>Ghost</Name>
<AnimLength>780</AnimLength>
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, seconds) flr 780 %
</Code>
</Parameter>
</Animation>
</PartInfo>

</ModelInfo>

<ModelBehaviors>
<Include Path="Asobo\Misc\SimObjects.xml"/>
<Component ID="Ghost" Node="Ghost">
<Visibility>
<Parameter>
<Code>(E:LOCAL TIME, Seconds) 0 &gt;= (E:LOCAL TIME, Seconds) 13 &lt;= and if{ 1 } els{ 0 }</Code>
</Parameter>
</Visibility>
</Component>

</ModelBehaviors>
 

Lagaffe

Resource contributor
Messages
679
Country
france
Hi,
I have encountred many time this message, it is a problem in ours declarations in sim.cfg / model.cfg /object.xml
It can be the node name which is incorrect or a bad spelling of a parameter.
Verifing thèses 3 files generaly permit to solve the problem.
 
Messages
11
Country
russia
Hello! I'm working on a scenery and have a question: Is it possible to make an electronic clock? :)
 
Messages
405
Country
italy
Hello! I'm working on a scenery and have a question: Is it possible to make an electronic clock? :)
It Is possible, i've made One, if you go into the tower you can see a "Digital Clock" in action


The object Is made of 6 different cylinders with a Number onto each face, it's Just a simple rotation animation

You can take a look at the code in the Simobjects


Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Messages
11
Country
russia
It Is possible, i've made One, if you go into the tower you can see a "Digital Clock" in action


The object Is made of 6 different cylinders with a Number onto each face, it's Just a simple rotation animation

You can take a look at the code in the Simobjects
Thank you! And what is 'flr' in "<code>"? what "formula language" is used?
 
Messages
405
Country
italy
flr means "round to nearest integer downward"

for example, time is 22h.34m.52s, aim for the red digit
Code:
<Animation guid="fcfbd7d3-ee64-4ab8-9f81-2e7c13814b3c" length="360" name="hours1" type="Sim" typeParam="AutoPlay" typeParam2="hours1"/>
<PartInfo>
            <Name>hours1</Name>
            <AnimLength>360</AnimLength>
            <Animation>
                <Parameter>
                    <Code> (E:ZULU TIME, hours) 10 / flr 120 * </Code>
                </Parameter>
            </Animation>
</PartInfo>

this one means
take zulu time hours (22)
divide(/) by 10 (2.2)
floor the result flr(2,2) = 2
multiply(*) that by 120 = 240
the animation is a 360 degree rotation and 360 frames (AnimLenght)

in the end, i'm gonna rotate part hours1 by 240 degrees (this part in blender is a pyramid...3 faces with numbers, got it?)

more info:


reverse polish notation


 
Messages
11
Country
russia
this one means
take zulu time hours (22)
divide(/) by 10 (2.2)
floor the result flr(2,2) = 2
multiply(*) that by 120 = 240
the animation is a 360 degree rotation and 360 frames (AnimLenght)

in the end, i'm gonna rotate part hours1 by 240 degrees (this part in blender is a pyramid...3 faces with numbers, got it?)
Wow, thank you!
I got it :) However, the rotation of the cylinders is not correct in my case. I also use Blender, I have 4 cylinders (two hours and two minutes): the first cylinder has three faces: 0, 120 and 240 degrees, but it doesn't rotate at all when I change the time. The other three cylinders rotate, but show incorrect values. While trying to figure out what I'm doing wrong.
 
Messages
11
Country
russia
Hi all. I do not know why it is showing the wrong time. How to print values of variables? :(
 
Messages
11
Country
russia
I solved the problem - in blender the animation length was not 360, all animations were different. Thanks to all.
 
Messages
1
Country
unitedkingdom
Is this an animated blender model exported into the modellib of an airport or simplescenery project , just as you would with any simple animated autoplay odject
Ah, its a simobject. Never been into this side of things before.
 
Last edited:
Messages
19
Country
denmark
Hi!
A small step forward in my current project ... a clock as a SimObject ....


If you are interested, here is the code:


I fished the formulas for calculating the hours and minutes out of the forum somewhere, many thanks to the author of these formulas!!!
Hi, im trying to make a working clock. In the xml, you shared, there is 2 animations. 1 for hours and 1 for minutes, right? So how do i make them, do the hour have to one round or how :)
Im hoppng to hearing from you, cheers :)
 

Christian Bahr

Resource contributor
Messages
892
Country
germany
Hi.

The clock hands have a different animation. The animation of the minute hand needs 60 frames for a 360° rotation. The animation of the hour hand needs 120 frames for a 360° rotation:

mfs_3dsm_analog_clock.jpg
 
Messages
19
Country
denmark
Hi.

The clock hands have a different animation. The animation of the minute hand needs 60 frames for a 360° rotation. The animation of the hour hand needs 120 frames for a 360° rotation:

View attachment 77558
Thanks :), i have made the animation and exportet it to msfs2020 and edited the xml file: But it doesnt work ingame, i cant see the clock moving. I dont really know whats causing the problem. I have worked with animation in msfs before, so i dont think i exported it wrong from blender.

<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo version="1.1" guid="{96167e83-4ef4-48a7-ea59-37afc31ece54}">

<LODS>
<LOD MinSize="0" ModelFile="Aalborg Cathedral.gltf"></LOD>
</LODS>

<Animation name="Hour" guid="96167e83-4ef4-48a7-ea59-37afc31ece54" typeParam2="Hour" length="120" type="Sim" typeParam="AutoPlay" />
<Animation name="Minute" guid="108f192a-d16e-4ad0-9188-4d18b3bd880f" typeParam2="Minute" length="60" type="Sim" typeParam="AutoPlay" />

<PartInfo>
<Name>Hour</Name>
<AnimLength>120</AnimLength>
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, hour) 12 % 10 *
</Code>
</Parameter>
</Animation>
</PartInfo>

<PartInfo>
<Name>Minute</Name>
<AnimLength>60</AnimLength>
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, minutes) flr 60 %
</Code>
</Parameter>
</Animation>
</PartInfo>
</ModelInfo>
 
Messages
19
Country
denmark
I think i know whats wrong, i have exported it as scenery object, but you used SimObject. But how can i make it a simobject instead of a scenery object? I added a asset as a simobject in the project, but when i export the model to that location it cant find it ingame :)
 
Last edited:
Messages
21
Country
newzealand
Thank you for sharing this! I've managed to use it in my scenery but i'm finding that on a really big clock the animation jumps for the minute hand are a bit more obvious, is it possible to smooth animations between keyframes?

you can see the jumps in this
 
Last edited:
Messages
19
Country
denmark
Thank you for sharing this! I've managed to use it in my scenery but i'm finding that on a really big clock the animation jumps for the minute hand are a bit more obvious, is it possible to smooth animations between keyframes?

you can see the jumps in this
You can maybe try to make the animation of the minutes 120 frames instead of 60 and edit the xml to that. Dont know if it will work, but its worth trying :)
 

Attachments

  • Udklip.PNG
    Udklip.PNG
    37.6 KB · Views: 55
Top