Optimize your watch face design
optimize your watch face design objective learn how to optimize watch face designs created in watch face studio by minimizing memory usage and reducing the on pixel ratio overview starting from watch face studio wfs version 1 6, watch face developers can now utilize the memory usage plugin during development to monitor the memory consumption of their watch faces this tool ensures that projects adhere to google's defined memory requirements another valuable feature of wfs is the aod always-on display analyzer, which evaluates the contribution of each component to the on pixel ratio opr the opr indicates the number of pixels that remain lit in aod mode since a higher opr results in more lit pixels, it directly impacts battery life the aod analyzer helps identify which layers, colors, or visual elements consume the most power, enabling developers to optimize designs for better energy efficiency both tools are essential for enhancing overall performance and user experience excessive memory usage can lead to lag and instability, while a high opr accelerates battery drain by understanding and balancing these metrics, developers can create visually dynamic and appealing watch faces while ensuring they remain optimized for power consumption and system efficiency set up your environment you will need the following watch face studio version 1 9 5 or higher memory usage plugin galaxy watch or smartwatch running on wear os 5 or higher adobe photoshop or any photo editing software noteto add the memory usage plugin to wfs, refer to the plugin installation guide sample project here is a sample project for this code lab download it and start your learning experience! optimize watch face sample project 1 1 mb start your project to load the sample project in watch face studio click open project in watch face studio locate the downloaded sample project and click open the sample project includes a design with high memory usage and opr check watch face’s initial memory usage and run aod analyzer click the diagnosis button to check the memory usage of the watch face while the diagnosis result indicates that the current memory usage of the watch face is significantly below the memory budget, which is 100 mb for normal mode and 10 mb for always-on mode see wo-p8 in performance and functionality requirements , it still consumes a considerable amount of memory this is notable given its simple design and lack of complex graphics next, go to the run pane and click the preview watch face icon in the preview watch face window, toggle the always-on state to see the watch face in ambient mode the current opr of the watch face is 59 7% it is recommended that your design uses no more than 15% of the available pixels in always-on states see wo-p7 in performance and functionality requirements click analyze to open the aod analyzer, a tool that checks each watch face component and color-codes how much each component contributes to the opr the aod analyzer indicates that the watch face design contains pixel-intensive components, which increase the opr adjusting these components to stay within the 15% opr limit for both aod mode and normal mode can improve power efficiency and battery life adjust colors and sizes of components using dark colors in your watch face reduces power consumption, which applies to both always-on and normal modes additionally, higher-resolution bitmap assets consume more memory in the sample project, you can find very bright-colored and unnecessarily high-resolution images with extra transparent pixels that can be optimized go to the layer list and hide the gif_halfcircle layer temporarily to view the components behind it click on any empty space in the layer list to view the canvas color of the watch face currently, the color is set to #fbf5f5ff off-white , which is a very light color and can significantly increase the opr change the canvas color to #000000ff black you can also select other dark colors that you prefer next, select the image_squaregradient layer this image is unnecessarily high-resolution, with only a portion of it displayed on the screen you need to crop images like this first using photo editing software before importing them into the studio an optimized version of this image is ready for you to add go to add component > preset image select the image_halfcircletop png file from optimized resources folder included in the sample project drag the newly added image layer and place it above the image_squaregradient layer then, delete the image_squaregradient layer select the image_halfcircletop layer and, in the placement properties, choose align top next, select the image_circle layer by hiding the layer on top of it, you can see that half of the image is covered but still takes up space and affects performance as it is partially rendered additionally, the image has extra transparent pixels that are unnecessary crop this image or, from the optimized resources folder, add the image_halfcirclebottom png file adjust it placement like below drag the image_halfcirclebottom layer above the image_circle layer then, delete the image_circle layer you can combine images with the same purpose using any photo editing software, as this consumes less memory, particularly when working with high-quality complex graphics such as logos, illustrations, and textures from the optimized resources folder, add the image_backgroundcombined png file and align it as shown below drag the newly added image layer above the image_halfcircletop layer, and then delete both the image_halfcircletop and image_halfcirclebottom layers noteyou can optimize your images while preserving the bright colors of your watch face in normal mode by simply adding a dark version of your resources in the always-on tab this approach can still significantly reduce the opr while maintaining your color preferences utilize shapes whenever possible shapes are vector-based elements in wfs, defined by mathematical properties such as color, size, and position not pixel data like images they are lightweight, scale perfectly without pixelation, and have minimal impact on memory and storage additionally, shapes are fully adjustable in wfs, allowing you to easily tweak or animate them directly to further optimize the watch face, you can replace simple images in the sample project with shapes select image_outlinecircle this image is a plain white circle outline, which can be replicated using a shape go to add component > shape > ellipse rename the ellipse component to ellipse_outline and adjust its properties as follows delete the image_outlinecircle layer and drag the ellipse_outline layer on top of the image_center layer next, select the image_center layer this is an imported gradient image that consumes a significant amount of memory to improve the efficiency of the design, you can replace it with a shape filled with gradients add a component by selecting shapes > ellipse rename the newly added shape component to ellipse_center open the fill color properties of ellipse_center there are three available gradient types linear, radial, and angular choose radial and adjust the color stops and colors as follows drag the ellipse_center layer above the image_center layer then, delete the image_center layer unhide the gif_halfcircle layer and rerun diagnosis and aod analyzer to see how much the watch face has improved limit constantly updating complications and components having too many complications and components, especially those that update every second, can impact the overall performance and efficiency of a watch face when multiple components update simultaneously, the watch performs more background tasks to keep everything current this can lead to higher power consumption, increased memory usage, and slower interface responsiveness to ensure a smooth, energy-efficient, and visually clear user experience, it is generally advisable to keep the number of complications below eight and remove any unnecessary components temporarily hide the gif_halfcircle again select complication_wordclock, complication_unreadnotification, and complication_dayofweek, along with their background components ellipse_left, ellipse_right, and ellipse_top right-click on these layers and choose delete it is still possible for users to customize and set these complications in any quadrant edge complication slot, as these complications are designed to be editable directly on the device delete the progressbar_seconds and digital_clock unnecessary components that serve a similar purpose as other existing components, such as analogclock 1, can be removed to streamline the design and improve efficiency next, delete the ellipse_bottom_copy layer instead of hiding components using a tag expression, it is more effective to delete them, as components hidden in this manner are still partially rendered and can impact performance improve animated components animation can greatly enhance the overall aesthetic of a watch face when done thoughtfully smooth and well-timed animations can make the design feel more dynamic, premium, and engaging, adding a sense of liveliness that static designs often lack when incorporating animations, it's essential to use them purposefully for example, in the sample project, the component ellipse_bottom is set to blink every second while this adds visual interest, it also updates continuously, requiring the watch face to refresh each second this can lead to higher battery consumption without necessarily enhancing the user experience to optimize this, consider adding specific conditions for when the animation should occur in the ellipse_bottom fill opacity property, click on tags and change the tag expression to blink only every second when the heart rate is not normal i e , less than 60 or greater than 100 [hr]<60 + [hr]>100 ? [sec]%2==0 ?-100 0 0 unhide gif_halfcircle this component is a half-circle with a wipe animation that reveals the components underneath when the watch face is turned on it is a gif file while this file type is supported by wfs, it is still recommended to import webp animations, as they are smaller in file size, lighter to render, offer better image quality, and consume less power you can add the webp file from the optimized resources folder by going to add component > animation > animated gif/webp add the webp_halfcircle and position it as shown below drag the webp_halfcircle layer below the ellipse_center layer and delete the gif_halfcircle layer set the trigger property noteif possible, consider using tag expressions to animate your components this approach allows you to achieve visually appealing effects without putting unnecessary strain on the watch's memory and battery additionally, components with similar purposes, such as the hour hand and its shadow, should be grouped together, and a tag expression should be applied to the group for cohesive animation check the memory usage of the optimized watch face and rerun the aod analyzer run the diagnosis and aod analyzer to see how much the watch face improved you can reduce the opr further by hiding layers in always-on tab, as shown below notesince the second hand components sec_simple and sec_shadow_simple does not update in aod, it is recommended to hide it test the watch face to test your watch face on a smartwatch, you need to connect your watch to the same network as your computer in watch face studio, select run on device select the connected watch you want to test with if your watch is not detected automatically, click scan devices to detect your device or enter its ip address manually by clicking the + button the watch face launches upon successful installation you're done! congratulations! you have successfully achieved the goal of this code lab now, you can optimize a watch face using watch face studio! if you’re having trouble, you may download this file optimize watch face complete project 418 1 kb to learn more, visit watch face studio performance tips