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

MSFS20 Analog Clock

Unfortunately that just makes it point to the wrong time, as now it take 2 hours to move around the face
 
Unfortunately that just makes it point to the wrong time, as now it take 2 hours to move around the face

First thing first, we need to understand the code we are using before making modification,

Code:
 (E:LOCAL TIME, minutes) flr 60 %
This means, take the Local time in minutes (they are from the midnight!!)
Divide It by 60 and take the modulo (%)
take the integer part of It (flr)
Onece you have the result, display that particular frame of the animation So you have a model with 360 degrees rotation with 60 Frames, each frame represent a rotation of 6 degrees ( 360/60)

But you want a smaller rotation to get It buttery smoooth

so i tried to work out a solution using a 3600 degree animation with this code:
Code:
(E:LOCAL TIME , seconds) INT (E:LOCAL TIME , seconds) 3600 / 3600 * -

that should work, but it doesn't, and if a guru of RPN can spot where the error is, really appreciated

BUT

the solution is simpler:

use this code in you .xml, change only the guid and the gltf name

Code:
<?xml version="1.0" ?>



    <ModelInfo version="1.1" guid="{2b520599-a7ca-422b-68b3-cf47060b03f1}">

<LODS>
<LOD MinSize="0" ModelFile="mamu-clock-asobo.gltf"></LOD>
</LODS>

    <Behaviors>
        <Include Path="Asobo\Common.xml"/>
        <Component ID="Clock">
            <UseTemplate Name="ASOBO_INSTRUMENT_Needle_Current_Time_Clock_Template">
                <HOURS>True</HOURS>
                <MINUTES>True</MINUTES>
                <SECONDS>False</SECONDS>
                <USE_TIME_ADJUSTMENT_KNOB>False</USE_TIME_ADJUSTMENT_KNOB>
            </UseTemplate>
        </Component>
    </Behaviors>
</ModelInfo>

in your model, give the hours handle this name: INSTRUMENT_Needle_Clock_Hours
and the minutes handle, this name: INSTRUMENT_Needle_Clock_Minutes

animate booth with a 360 degree rotation (with nla as usual)

and presto, your clock will be suuuuper smoooth!

thanks ASOBO!

full project with source attached!
 

Attachments

Nice. @mamu Is it ok to use the code and the hands only from your clock test in my scenery (freeware)? I got it working and the hands nicely placed in the two clocks on the terminal building for EFHF that I am working on. I give proper credits in the readme.
 
Last edited:
Yeah no problem! Use It as much as you like, i'm only using Asobo's code template in the latest example, and the blender "art" was Just fun to make!


Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
First thing first, we need to understand the code we are using before making modification,

Code:
 (E:LOCAL TIME, minutes) flr 60 %
This means, take the Local time in minutes (they are from the midnight!!)
Divide It by 60 and take the modulo (%)
take the integer part of It (flr)
Onece you have the result, display that particular frame of the animation So you have a model with 360 degrees rotation with 60 Frames, each frame represent a rotation of 6 degrees ( 360/60)

But you want a smaller rotation to get It buttery smoooth

so i tried to work out a solution using a 3600 degree animation with this code:
Code:
(E:LOCAL TIME , seconds) INT (E:LOCAL TIME , seconds) 3600 / 3600 * -

that should work, but it doesn't, and if a guru of RPN can spot where the error is, really appreciated

BUT

the solution is simpler:

use this code in you .xml, change only the guid and the gltf name

Code:
<?xml version="1.0" ?>



    <ModelInfo version="1.1" guid="{2b520599-a7ca-422b-68b3-cf47060b03f1}">

<LODS>
<LOD MinSize="0" ModelFile="mamu-clock-asobo.gltf"></LOD>
</LODS>

    <Behaviors>
        <Include Path="Asobo\Common.xml"/>
        <Component ID="Clock">
            <UseTemplate Name="ASOBO_INSTRUMENT_Needle_Current_Time_Clock_Template">
                <HOURS>True</HOURS>
                <MINUTES>True</MINUTES>
                <SECONDS>False</SECONDS>
                <USE_TIME_ADJUSTMENT_KNOB>False</USE_TIME_ADJUSTMENT_KNOB>
            </UseTemplate>
        </Component>
    </Behaviors>
</ModelInfo>

in your model, give the hours handle this name: INSTRUMENT_Needle_Clock_Hours
and the minutes handle, this name: INSTRUMENT_Needle_Clock_Minutes

animate booth with a 360 degree rotation (with nla as usual)

and presto, your clock will be suuuuper smoooth!

thanks ASOBO!

full project with source attached!
Fantastic work, I have been playing with trying to get seconds to work however I have had no luck. Any suggestions?
 
Can you tell how you are implementing seconds?
Share what have you tried so far, some source code, otherwise It Is pretty hard to tell where the problem Is



Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Can you tell how you are implementing seconds?
Share what have you tried so far, some source code, otherwise It Is pretty hard to tell where the problem Is



Inviato dal mio Mi 9 Lite utilizzando Tapatalk
Hi Mamu,

The code that I have been attempting to use is what you listed above just changing seconds from False to True and having the Animation set to INSTRUMENT_Needle_Clock_Seconds.

Aside from that have not tried anything over the top :)
 
ehm...did you add the seconds handle in the Blender model along with its animation?

i have updated the source, here you go
 

Attachments

First thing first, we need to understand the code we are using before making modification,

Code:
 (E:LOCAL TIME, minutes) flr 60 %
This means, take the Local time in minutes (they are from the midnight!!)
Divide It by 60 and take the modulo (%)
take the integer part of It (flr)
Onece you have the result, display that particular frame of the animation So you have a model with 360 degrees rotation with 60 Frames, each frame represent a rotation of 6 degrees ( 360/60)

But you want a smaller rotation to get It buttery smoooth

so i tried to work out a solution using a 3600 degree animation with this code:
Code:
(E:LOCAL TIME , seconds) INT (E:LOCAL TIME , seconds) 3600 / 3600 * -

that should work, but it doesn't, and if a guru of RPN can spot where the error is, really appreciated

BUT

the solution is simpler:

use this code in you .xml, change only the guid and the gltf name

Code:
<?xml version="1.0" ?>



    <ModelInfo version="1.1" guid="{2b520599-a7ca-422b-68b3-cf47060b03f1}">

<LODS>
<LOD MinSize="0" ModelFile="mamu-clock-asobo.gltf"></LOD>
</LODS>

    <Behaviors>
        <Include Path="Asobo\Common.xml"/>
        <Component ID="Clock">
            <UseTemplate Name="ASOBO_INSTRUMENT_Needle_Current_Time_Clock_Template">
                <HOURS>True</HOURS>
                <MINUTES>True</MINUTES>
                <SECONDS>False</SECONDS>
                <USE_TIME_ADJUSTMENT_KNOB>False</USE_TIME_ADJUSTMENT_KNOB>
            </UseTemplate>
        </Component>
    </Behaviors>
</ModelInfo>

in your model, give the hours handle this name: INSTRUMENT_Needle_Clock_Hours
and the minutes handle, this name: INSTRUMENT_Needle_Clock_Minutes

animate booth with a 360 degree rotation (with nla as usual)

and presto, your clock will be suuuuper smoooth!

thanks ASOBO!

full project with source attached!
Hello, MaMu.

I know I'm three years late, but I found this thread because I want to add a clock to my project. Modeling in Blend is no problem for me, but animation is.

It is true that the clock has a double dial, since it is placed inside the terminal for passenger information. And I have taken into account that the turn of one is opposite to that of the other.

I think I followed all the steps to make the watch, but I seem to have missed something. When I import the clock as a SimObject, the object appears in its entirety, but the animation does not work.

Can you take a look at the attached folder? Thank you and Happy New Year to all.
 

Attachments

2 small issues.

1st. Your animations aren't linear, this won't stop it from working, but it won't tell the correct time.

2nd. Your animation names are INSTRUMENT_Needle_Clock_HoursA/B and INSTRUMENT_Needle_Clock_MinutesA/B. They need to be, "INSTRUMENT_Needle_Clock_Hours" for the two hours hand animations (they can both have the same name), and "INSTRUMENT_Needle_Clock_Minutes" for the two minutes hands.
 
2 small issues.

1st. Your animations aren't linear, this won't stop it from working, but it won't tell the correct time.

2nd. Your animation names are INSTRUMENT_Needle_Clock_HoursA/B and INSTRUMENT_Needle_Clock_MinutesA/B. They need to be, "INSTRUMENT_Needle_Clock_Hours" for the two hours hand animations (they can both have the same name), and "INSTRUMENT_Needle_Clock_Minutes" for the two minutes hands.
Thank you, KCGB for your appreciation.

As I do not know very well how the non -linear animation works, I have edited Mamu's Blend file, just modifying the hands and sphere and without touching the animations. While his watch works perfectly exported to Simobject, when I export mine, worked on Mamu's, as I said, only the minute works, keeping the hands of the hours and seconds stop. I have compared and verified the properties of both watches and I do not see any difference, except for those already said (sphere, box, dimensions and positions in the "x" axes and, perhaps, "y" ─ although this I do not remember having modified it─), respecting the "Z" turn axis.

Nor do I think the problem is in .xml files. Although I have observed that the version of its .xml file is 1.0, and mine is the same vews, adding encoding="utf-8". In addition, Mamu's .xml file contains the line:
<Lod Minsize = "0" Modelfile = "mamu-clock-Asobo.gltf"> </ lod>
And in mine writes:
<Lod minize = "0" modelfile = "mafr_reloj.gltf"/>
As you can see, in mine line the chain has been suppressed </ lod>.
I have tried adding to me .xml this chain, but the compilation does not change anything.

Attached compressed file .zip to examine it. While I will try to learn something about non -linear animation.

Greetings
 

Attachments

Hello friends.

Finally I have been able to solve the operation of the clock. Thanks to Mamu and KCGB for their advice and didactic videos of the first. I will leave some images of the project (Lebz Airport of Badajoz-Talavera de la Reina) in which it is installed. Forgive the image quality of the video, but the forum does not let you upload too large files. Although I believe that this project is very bulky (253 MB, compressed), I could not resist reproducing some elements of the airport in the minimum detail. I also have to give thanks to the website cgtrader.com from which I have downloaded some 3D models for the terminal bar-restaurant. Especially the beer tap and the coffee maker, the latter of under license Creative Commons 2.5. http://creativecommons.org/licenses/by/2.5/es/, and whose authorship is from Scopia Visual Interfaces Systems, S.L. (http://www.scopia.es). It has been almost two months of development, but I am satisfied with work. The project still lacks to develop military units, but I will do this at another time.

Happy New Year 2025 !!
 

Attachments

Back
Top