Watchmaker Wiki

The ultimate watch maker for Android Wear!

User Tools

Site Tools


tips:batterymeters

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tips:batterymeters [2015/01/21 21:28] – [Rotation] jt3tips:batterymeters [2015/01/22 05:01] (current) jt3
Line 55: Line 55:
 This is where things tend to get tricky.  You want to simulate LED sections lighting up, but you want to ensure that the ENTIRE segment lights up (or extinguishes) at once, or you ruin the effect.  Luckily, it may sound like a challenge, but it’s really pretty simple. This is where things tend to get tricky.  You want to simulate LED sections lighting up, but you want to ensure that the ENTIRE segment lights up (or extinguishes) at once, or you ruin the effect.  Luckily, it may sound like a challenge, but it’s really pretty simple.
  
-{{:tips:segmented1.png?200 |Segmented}}Here, rotation won’t work, because a smoothly rotating circle would slowly cut into a segment, and we want to light it up (or extinguishit all at once, so you’ll need to add a circle object, go into its shader section, and create a “Segment Between” shader.  There are two types of shaders.  One that hides, and one that reveals.  Which one you use is up to you, and probably depends on the graphic you’re using to simulate the LED effect, and the color of the shader.  To turn a REVEAL shader into a HIDE shader (or vice versa), all you need to do is swap the Opacity In Range and Opacity Out of Range values.  Or, you can swap the Start and End values, whichever works for you.  Keep in mind though that shaders always move clockwise.  The end value should be higher than the start value.+{{:tips:segmented1.png?200 |Segmented}}Here, rotation won’t work, because a smoothly rotating circle would slowly cut into a segment, and we want to light it up (or extinguish itall at once, so you’ll need to add a circle object, go into its shader section, and create a “Segment Between” shader.  There are two types of shaders.  One that hides, and one that reveals.  Which one you use is up to you, and probably depends on the graphic you’re using to simulate the LED effect, and the color of the shader.  To turn a REVEAL shader into a HIDE shader (or vice versa), all you need to do is swap the Opacity In Range and Opacity Out of Range values.  Or, you can swap the Start and End values, whichever works for you.  Keep in mind though that shaders always move clockwise.  The end value should be higher than the start value.
  
 For these examples, we’re going to duplicate the “watch on one side/battery on the other” approach, where 100% is at 12:00 and 0% is at 6:00.  We’re also going to assume that EACH side has 20 equal segments (LEDs) to be lit.  Red HIDE shaders will be shown in the pictures to illustrate what we're doing, but normally, they'd be the same color as your background (HIDE Shader), or the desired color (REVEAL Shader).  For these examples, we’re going to duplicate the “watch on one side/battery on the other” approach, where 100% is at 12:00 and 0% is at 6:00.  We’re also going to assume that EACH side has 20 equal segments (LEDs) to be lit.  Red HIDE shaders will be shown in the pictures to illustrate what we're doing, but normally, they'd be the same color as your background (HIDE Shader), or the desired color (REVEAL Shader). 
tips/batterymeters.txt · Last modified: 2015/01/22 05:01 by jt3