Advertisement
Celesmeh

Untitled

Oct 1st, 2014
1,553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. [Tutorial] Creating an animated watch face
  2.  
  3. by u/Goodminton
  4.  
  5. I've seen this discussed a few times around here, and there were a few people that had the right idea, but the execution wasn't quite perfect. I'll do my best to give an explanation of a method I've found to work fairly well and can be expanded to many different situations.
  6.  
  7. As you may or may not know, Facer watch variables (#Ds#, #Dm#, etc etc) can be used in equations to define the opacity, width, height, x, and y of any object. With the right equations, we can use this to our advantage to create animations.
  8. Scenario: We have a set of 4 images that we want to cycle through, one every second, on the watch face to create an animation.
  9. To accomplish this, we must use the Opacity property of each image so that the opacity is 0 on 3 of the frames, and 100 on the fourth. This will make each image appear for only the second where the opacity is set to 100, and disappear for the other 3 frames.
  10. Something like this:
  11.  
  12. Frame # 1 2 3 4
  13. Image1 100 0 0 0
  14. Image2 0 100 0 0
  15. Image3 0 0 100 0
  16. Image4 0 0 0 100
  17.  
  18. To make an equation that does this which facer can use, we can use conditionals as well as the modulus (%) operator.
  19.  
  20. Image 1 Opacity: $(#Ds# % 4) = 0.0 ? 100 : 0$
  21. Image 2 Opacity: $(#Ds# % 4) = 1.0 ? 100 : 0$
  22. Image 3 Opacity: $(#Ds# % 4) = 2.0 ? 100 : 0$
  23. Image 4 Opacity: $(#Ds# % 4) = 3.0 ? 100 : 0$
  24.  
  25. In general form:
  26.  
  27. $(#Ds# % totalFrames) = frameNumber.0 ? 100 : 0$
  28. Be very careful about parenthesis and dollar signs when entering equations into Facer. Facer is very picky about that. Also, it's important to add the .0 to the end of the frameNumber for some reason.
  29. I used this method to create an animated pikachu sprite watch face, which can be found here and anyone is free to play around with. Also remember that this isn't limited to just using #Ds#. You can use any of the variables and properties to create interesting effects.
  30.  
  31. Anyways, hope this helps somebody, happy animating!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement