I am wondering if Facer allows you to create conditional statements that run on? For instance (IF = x, Then A, IF not (IF = y, Then B, If Not (IF = Z, Then c, IF not D))). What is the max number of conditional statements that can be made? I am wanting to create an animation using the operator for a smooth second hand with the Transparency field.
$(#DWFSS#>0&&#DWFSS#<=60)?100:0$
This formula works to change the transparency of an image from 100 to 0 when the rotational value of the second hand is within the range inputted. In the above example the rotation would need to be between 0-60 to show up. If not, then it is 0 and effectively disappears. Using 60 points for image, you would need 6 images to cover the 60 second rotation.
In trying to create an animation however, the animation would be extremely jerky. To give a smoother ‘frame rate’ you would either need to add many images and create shorter time ranges. Or my thought was to reuse the same image, but shell more conditionals within the field.
For instance I have 8 images that I want to repeat each second. That would need 60 conditionals with this field. Here is the 1st image’s conditional statement:
$(#DWFSS#>0&&#DWFSS#<=0.75)?100:(#DWFSS#>6&&#DWFSS#<=6.75)?100:(#DWFSS#>12&&#DWFSS#<=12.75)?100:(#DWFSS#>18&&#DWFSS#<=18.75)?100:(#DWFSS#>24&&#DWFSS#<=24.75)?100:(#DWFSS#>30&&#DWFSS#<=30.75)?100:(#DWFSS#>36&&#DWFSS#<=36.75)?100:(#DWFSS#>42&&#DWFSS#<=42.75)?100:(#DWFSS#>48&&#DWFSS#<=48.75)?100:(#DWFSS#>54&&#DWFSS#<=54.75)?100:(#DWFSS#>60&&#DWFSS#<=60.75)?100:(#DWFSS#>66&&#DWFSS#<=66.75)?100:(#DWFSS#>72&&#DWFSS#<=72.75)?100:(#DWFSS#>78&&#DWFSS#<=78.75)?100:(#DWFSS#>84&&#DWFSS#<=84.75)?100:(#DWFSS#>90&&#DWFSS#<=90.75)?100:(#DWFSS#>96&&#DWFSS#<=96.75)?100:(#DWFSS#>102&&#DWFSS#<=102.75)?100:(#DWFSS#>108&&#DWFSS#<=108.75)?100:(#DWFSS#>114&&#DWFSS#<=114.75)?100:(#DWFSS#>120&&#DWFSS#<=120.75)?100:(#DWFSS#>126&&#DWFSS#<=126.75)?100:(#DWFSS#>132&&#DWFSS#<=132.75)?100:(#DWFSS#>138&&#DWFSS#<=138.75)?100:(#DWFSS#>144&&#DWFSS#<=144.75)?100:(#DWFSS#>150&&#DWFSS#<=150.75)?100:(#DWFSS#>156&&#DWFSS#<=156.75)?100:(#DWFSS#>162&&#DWFSS#<=162.75)?100:(#DWFSS#>168&&#DWFSS#<=168.75)?100:(#DWFSS#>174&&#DWFSS#<=174.75)?100:(#DWFSS#>180&&#DWFSS#<=180.75)?100:(#DWFSS#>186&&#DWFSS#<=186.75)?100:(#DWFSS#>192&&#DWFSS#<=192.75)?100:(#DWFSS#>198&&#DWFSS#<=198.75)?100:(#DWFSS#>204&&#DWFSS#<=204.75)?100:(#DWFSS#>210&&#DWFSS#<=210.75)?100:(#DWFSS#>216&&#DWFSS#<=216.75)?100:(#DWFSS#>222&&#DWFSS#<=222.75)?100:(#DWFSS#>228&&#DWFSS#<=228.75)?100:(#DWFSS#>234&&#DWFSS#<=234.75)?100:(#DWFSS#>240&&#DWFSS#<=240.75)?100:(#DWFSS#>246&&#DWFSS#<=246.75)?100:(#DWFSS#>252&&#DWFSS#<=252.75)?100:(#DWFSS#>258&&#DWFSS#<=258.75)?100:(#DWFSS#>264&&#DWFSS#<=264.75)?100:(#DWFSS#>270&&#DWFSS#<=270.75)?100:(#DWFSS#>276&&#DWFSS#<=276.75)?100:(#DWFSS#>282&&#DWFSS#<=282.75)?100:(#DWFSS#>288&&#DWFSS#<=288.75)?100:(#DWFSS#>294&&#DWFSS#<=294.75)?100:(#DWFSS#>300&&#DWFSS#<=300.75)?100:(#DWFSS#>306&&#DWFSS#<=306.75)?100:(#DWFSS#>312&&#DWFSS#<=312.75)?100:(#DWFSS#>318&&#DWFSS#<=318.75)?100:(#DWFSS#>324&&#DWFSS#<=324.75)?100:(#DWFSS#>330&&#DWFSS#<=330.75)?100:(#DWFSS#>336&&#DWFSS#<=336.75)?100:(#DWFSS#>342&&#DWFSS#<=342.75)?100:(#DWFSS#>348&&#DWFSS#<=348.75)?100:(#DWFSS#>354&&#DWFSS#<=354.75)?100:0
Will the statement work by adding onto the expression? My basic understanding of the conditional statement is as follows:
$ “IF = x” ? “Than = a” : “If Not = b” $
To shell another conditional in the “If Not” portion, do I need to add a parenthesis?
Originally I tried simply duplicating my 8 images. I created 8 copies and set time ranges of 0-6 “degrees”. This created 48 images. However, since the smooth rotation needs 360 degrees to complete a full rotation this essentially created a ‘frame rate’ of 1 frame every 7.5 seconds.
Some Maths:
(360 degress per 1 minute) = (6 degrees per 1 Second)
(8 Frames per second) = (0.75 degrees per 1 Frame)
360 degrees = 480 frames
480 frames / 8 images = Each image needs to display 60 times per minute
Here you have some things I found out the hard way:
Facer doesn’t approve conditional statements that run on (conditionals within conditionals).
Facer doesn’t approve of more than 2 logical statements with 1 boolean operator inside of one conditional.
Both above things can actually sometimes work in the editor and on few watches, but they won’t work on all watches.
If you want to have an animation of 8 images repeating each second (1 image for 125 milliseconds), you will need to use math, not logic.
First of let’s get current parts of a second: (#Dsm#-#Ds#)
this will give you number running from 0 to 0.999
Now to conditions: $(#Dsm#-#Ds#)>(x*0.125)&&(#Dsm#-#Ds#)<=((x+1)*0.125)?100:0$
where under x you put the number of your frame (starting from 0 and going to 7).
Thank you. For some reason my brain was thinking that the #Dsm tag was a decimal of the minute itself. i.e. 08:35:09 would produce 35.09x. This helps tremendously.
I did play around with some more math and figure out some of the easier time ranges for frame rates:
Frame/Sec Ms/Frame
1 1.0000
2 0.5000
4 0.2500
5 0.2000
8 0.1250
10 0.1000
16 0.0625
20 0.0500
25 0.0400
Multiples of 4 and 5 tend to work the best. If just depends on how smooth the animation needs to be. I wonder too where the limitation of the watch and software comes in. At what point is the rendering of the image too slow for the calculations?
Hey @Mellin I hit this roadblock again today. I am trying to complicate my animations a little more now that I feel confident with using the 2 methods you helped me figure out. I tried combining the Transparency condition statement you list here with a square wave, but the limit of 1 Boolean operator is stopping me short. Have you devised any ways around this?
My idea is to take two separate animation sequences and have them infinitely loop. Normally I can do this with the Dsm-Ds condition, but the animations are limited to 1 second due to the nature of the calculation. I figured I could stretch this to 2 seconds by using the squarewave (i.e. alternating on/off).
On
$(squareWave(#Dsm#,100,2,50))&&(#Dsm#-#Ds#)>(00.5)&&(#Dsm#-#Ds#)<=((0+1)0.5)?100:0$
$(squareWave(#Dsm#,100,2,50))&&(#Dsm#-#Ds#)>(10.5)&&(#Dsm#-#Ds#)<=((1+1)0.5)?100:0$
Off
$(squareWave(#Dsm#,100,2,50)-1)&&(#Dsm#-#Ds#)>(00.5)&&(#Dsm#-#Ds#)<=((0+1)0.5)?100:0$
$(squareWave(#Dsm#,100,2,50)-1)&&(#Dsm#-#Ds#)>(1*0.5)&&(#Dsm#-#Ds#)<=((1+1)*0.5)?100:0$
As you can see there are 2 Booleans here that break the face.
Do you think it would be possible to nest the conditional statement with the Boolean inside the Expression for the squarewave itself? Basically using the #Dsm#-#Ds# calculation inserted in the amplitude field.
When you write you can see “</>” symbol on the tool bar.
That allows you to show all symbols, like “*”.
And no, that won’t work.
Condition must be outside everything.
You could try to create outside and then doplicate square wave, jostling with one amplitude being 1 an the other 0.
The animation is 4 frames.The first two play for the first second, then the next two play for the second sec. This repeats continuously. I synced it to my watch and the animation repeats cleanly. This can work. Now I just need to test with 15 frames instead of 2 per second.