In this eleventh chapter of the Smartwatch Design Fundamentals book, let’s get into designing what are called “Parallax” watch faces with gyroscopic or gyro-based watch face components, called “gyroscopes,” which was a recent feature added in V.1.5.2. These are used on watch faces that are customized, that is, those which use components dragged out of the GWD Components (Left Pane) ➤ Complications (Bottom Icon) ➤ Effects (Pop-out Menu) ➤ Gyro Effects (Autobahn | Cube | Gyro_Effect | Leveler | Light_Effect | Sub-Menus).
In this chapter, you will learn what the Properties ➤ Gyro Effect dialog is and where it can be implemented in your watch face design components.
In the first part of this chapter, we’ll outline the several different types of gyro effects which you can implement in the Gyro Effect dialog.
We will then show you how to add basic gyro animation (a spin) of the black vector illustration background pinwheel we created by using Creative Commons Zero, open source Inkscape, and GIMP 2.10.10.
We will then look at how components that have been added can be modified so that you know that you can create custom Gyro Effects compliments such as the Compliment ➤ Gyro Effect ➤ Light Effect.
Applying Gyro Effects to Components
There are seven categories of gyroscopic effects, ranging from rotation to scale (called Dimension) to movement (called Pivot Point X and Y) to translucence (called Opacity). Each set of fields (text inputs/readouts) takes to and from values which will interpolate based on X or Y or XY gyro sensor movement of the smartwatch. This determines how the watch face design component (Watch Hand, Image, Index, Complication, etc.) will behave when it is controlled by the gyroscope sensor in the smartwatch using these 15 data fields in the Gyro Effect control panel, which we will be exploring in detail in this chapter to see how you can use it to apply these 3D special effects. Note that this is a very advanced area of interfacing your watch face design with one of the most advanced sensors in the smartwatch, and therefore the only real way to master it is through repeated entry of data values in the Gyro Effect dialog and testing (and tweaking) the results on the Run emulator as well as on real smartwatch devices.
Range (-Degrees to +Degrees)
This determines the range of movement (rotation) from degrees to degrees as well as the number of times (which is why there are three data fields in this first or topmost section of the Gyro Effects dialog).
Dimension X (Scale 0% to 100%)
The second section of the Gyro Effects dialog determines the X Dimension (Scale) of the component, from 0.0 (0%) to 1.0 (100%).
Dimension Y (Scale 0% to 100%)
The third section of the Gyro Effects dialog determines the Y Dimension (Scale) of the component, from 0.0 (0%) to 1.0 (100%).
Inner Pivot X (0 pixels to 0 pixels)
The next two sections of the Gyro Effects dialog determine the X Pivot (Movement) of the component, from 0 (pixels) to N (total number of pixels of movement).
Inner Pivot Y (0 pixels to 0 pixels)
The fifth section of the Gyro Effects dialog determines the Y Pivot (Movement) of the component, from 0 (pixels) to N (total number of pixels of movement).
Rotate (Degrees to Degrees)
The fourth section of the Gyro Effects dialog determines the Rotation (to and from) of the component, from 0 (pixels) to 360 (degrees of rotation). This is used to rotate a watch face component around its pivot point (center)
Opacity (0% to 100%)
The fifth section of the Gyro Effects dialog determines the Opacity (translucency) of the component, from 0 (opaque) to 100% (solid). This is to fade the component in and out of view, as you will see later on in this chapter when we apply a light reflection to the watch face design using a Component ➤ Complication ➤ Effect ➤ Light Effect menu.
Adding a Watch Face Gyro Rotation
Let’s start out by launching the Galaxy Watch Face Designer software package so we can use the New Project dialog that appears on start-up to open the project we created in Chapter 10 and make the background pinwheel rotate using the Gyro Effect dialog Rotate setting.
A Warning dialog will appear, advising that Tizen 2.3.2 watches or higher are required to use the Gyroscope feature and that it may not work on older Samsung smartwatches. Click OK to acknowledge this Warning dialog, and it will vanish, and we will continue to set Rotation values for the Gyro Effect. As you can see (encircled in red) in Figure 11-1, there is a button to the left of the Gyro Effects section title that can be clicked to enable the Gyro Effect.
Notice that the default Gyro Effect rotation Range is set from -90 degrees to +90 degrees from zero degrees in the dialog. This should be fine for our background pinwheel to spin around behind the Steps % Complication we added in Chapter 10. Let’s get the Gyro Effect and the Steps % Complication working together in the same watch face design now!
You can look ahead to Figure 11-2.
Next, let’s add a Components ➤ Complication ➤ (Gyro) Effects ➤ Light_Effect layer for the compliment and set the watch face effect that puts a ray of light reflection complication on top of the watch face, so that it looks more three dimensional, rotating from 15% to 100%, with Opacity from 25% (we’ll use 51% to see it better) to 50%. To do this, we will go through the steps shown in the next section of the chapter, seen in Figures 11-7 through 11-11.
Adding a Gyro Effect Complication
The Light Beam Effect image is rotated by the Properties ➤ Gyro Effect ➤ Rotate by -15 degrees, and Properties ➤ Gyro Effect ➤ Opacity is changed by -25% in the Y dimension, as the smartwatch user rotates their wrist in both directions.
You can see the results of these settings in the Run (emulator) in the GWD, which is now working with Gyro Effect.
To see this Light Reflection image better in the Run (emulator), I also upped the Properties ➤ Appearance ➤ Opacity to 51% (Figure 11-7), so that this Light Reflection image compositing could be seen better against your Chapter 8 watch face design when it was being run in the emulator.
I did the screenshot with the watch face compositing Layer setup (image at 51% Opacity is seen encircled in red) and placed it right next to the Run (emulator) so that you could see the effect of pulling the Gyro Y Slider to the 79% position. The Light Reflection image on top of the watch face design compositing stack rotates and fades as expected.
I also tested the watch face design Steps % Complication, which we added in Chapter 10, to make sure all of these complex features we have added since Chapter 8 are working together, as one seamless (complex) watch face design.
This watch face design includes Battery Power % Conditions, Hour Numbers Hide/Show Time Conditions, a Steps % Complication, and the Light_Effect Gyroscopic Effect Complication, all working at the same time together. Try it for yourself in the Run (emulator) and see! Even the pinwheel rotates under the Steps % Complication we added!
Pretty cool that you can utilize all of these cutting-edge features together in one watch face design.
If you have turned a layer (view or eye icon) off, as I have in Figure 11-11 on the lower left (the white X on White Vector Illustration layer), you will not see that layer rendered in the Run (emulator) test pane, so you have the maximum flexibility in testing and building your watch face designs.
As you can see in the Run (emulator), everything composites and executes as expected in the Galaxy Watch Designer. The Hour, Minute, and Seconds hands are rotating and appearing correctly based on the Time (Tab), and the Steps & Compliment and Gyro Effects are working correctly based on the settings in the Data Tab. You may want to increase Opacity in Light_Effect, to see it better!
Next, since we don’t have the time or page bandwidth to create all new digital image assets using GIMP as we did in Chapter 7, let’s use the Samples Projects included with Galaxy Watch Designer to look at how to create “Tubular” and “Perspective” isometric 3D effects using Gyroscopic sensors in the smartwatch using 2D images supplied with the software. This work process will let us examine how the Gyro Effect works and learn more about it and get more experience using it without using up too many pages (and figures) within this chapter.
Looking at the Sample Watch Faces
Test the Vacation Gyro Sample using the Run icon to launch the emulator in Galaxy Watch Designer. As you can see, there are layers for the AM indicator, as well as Hour and Minute text overlayed at the top of the compositing layer pipeline, shadows under that, and a floating person PNG32 (Alpha) under that, and a PNG24 Pool Line Deformed Grid under that (to indicate wave turbulence) and a shadow layer PNG32 under that, and a blue water background color under that.
As seen in Figure 11-15, the Gyro Effects setting for the AM indicator is -137 pixels and -301 pixels, so the white text is moving relative to the shadows, to create the drop-shadowing offset which can be seen in the Run (emulator) icon. You can look at the other layers in the watch face composite and look at GDW’s Properties ➤ Gyro Effect pane to see which layers are Gyro positioned relative to each other in order to learn about how the Gyroscope effects are implemented for this watch face design.
As far as digital image compositing goes, the PNG32 image files include transparency (the inner tube and shadow). There is a Resource Preview pane on the far right of the Galaxy Watch Designer where you can see the image layer, file name (file type), resolution, and data footprint simply by clicking the layer name and the asset will be shown above along with its corresponding data. You can use this feature as well when you are dissecting sample files to see how they have been constructed. Be sure to do this using all of the GWD tools, as this is what we are learning in this section of the chapter. The Image 5 layer shown selected in Figure 11-16 contains the deformed grid which shows the watch face viewer that there is turbulence in the water (pool) that the inner tube is floating on. This is what is moving the inner tube and the shadow around relative to each other. Each layer plays a role in making the effect look more real, moving by using the Gyro Effect.
Fixing a Sample Watch Gyro Face
Click the Background Image (bg) Layer and the Run Icon (emulator) to test the Sample Project, and see how it works by using the Gyro X and Gyro Y Sliders under the Data Tab.
This is because any values entered in the XY Tab are applied as if they are entered in both the X and Y tabs, and this is where entering Gyro values can get very tricky for some advanced projects.
If you want the values applied to both X and Y Tabs equally, enter them in the XY Tab and not in the X and Y tabs. That is, only enter values in one of the three tabs, X (X Only), Y (Y Only), or XY (X and Y Both), for each section of the Gyro Effects Tab.
In this way, advanced special effects can be created using the various sections of the Gyro Effects dialog, using these three different X, Y, and XY tabs, individually. You can only use one section of each tab at a time, so if you want to do something in X and Y, use the XY Tab!
Both images use the PNG32 alpha channel, so that they can be composited “over” the background image, which is probably a PNG24, and this shows you how this special effect be composited in real time using multiple images within multiple layers inside of the Galaxy Watch Designer.
The gyroscope sensor then attaches itself to each image individually, and moves each image individually, and the effect is then created within the composite, combined with the Z-order layering and alpha channel transparency.
This is why I included the advanced topics on GIMP 2.10 and digital image compositing in this book, because they are necessary to create advanced watch face designs, as you can see looking at these Samples Projects in the Galaxy Watch Designer. This work process is an important one to master for watch face designers!
I have clicked the white X in the bg or Background image layer, so that you can see (and test) the foot (left and right) images (layers), as can be seen in Figure 11-19.
The Gyro Effect XY Tab setting is at -180 X pixels and -186 Y pixels. When you test this watch face, the edge of the left foot graphic is showing as seen in Figure 11-21. This represents a mistake at Gyro X Slider 90 degrees and Gyro Y Slider -90 degrees, as is shown in the Run (emulator) pane in Figure 11-20.
This mistake does not show up in Figure 11-19, as the Gyro Slider X and Y settings are at 32 and -46, respectively, placing the two foot images (intact) in the watch face’s field of view.
However, the left foot has been positioned further inside the watch face due to the 90,-90 Gyro X, Y settings, so let’s fix this mistake.
As an exercise, and to learn more about Gyro Effect settings, try and adjust the Inner Pivot X and Y settings in the Gyro XY Tab, in order to fix this problem, which can be seen in the Run (emulator) Test pane in Figure 11-20.
The fix for this positioning problem turns out to be a relatively simple one. What I did was to drag the right foot image out of the way, as the right foot image overlaps the left foot image, all the way outside of the preview circle, and then I grabbed the left foot image and pulled it downward about the same amount as it protruded into the circle (watch face) which is what showed the mistake in the first place.
This is exactly what we were trying to achieve – we have fixed the Sample Fly in the sky watch face design to be perfect! Great job!
As you can see in the GWD Run (emulator) testing pane, seen in Figure 11-21, the two feet are now showing correctly within the watch face design, at X 90 degrees (Slider) and Y -90 degrees (Slider).
In Figure 11-22, both feet are visible more underneath the edge of the background, and protrude into the watch face less, thus fixing this problem, which becomes apparent when the Gyro X Slider is set at 90 degrees and when the Gyro Y Slider is at -90 degrees, as can be seen in Figures 11-20 and 11-21.
Thus, the mistake in this Sample “Fly in the sky” watch face design has now been fixed, and the Fly in the sky 2 watch face project has been saved, using File ➤ Save As, so you can reference it along with the other couple dozen .GWD files included with this book.
In the next chapter, we’ll take a look at how to add weather data into your watch face design, by using a Weather API from an open-source provider, much as we have been doing with everything else (CC0 or Creative Commons Zero, GIMP 2.10.8, InkScape, Tizen, etc.) within this book, so that everything is readily accessible to the readers and developers.
Summary
In this chapter, we looked at how to incorporate the gyroscope sensor output into your watch face design, using the Gyro Effect section of the Properties pane in the Galaxy Watch Designer. Gyroscopic effects can be added in any watch face component which includes this sub-section in its Properties pane. We went over the sub-sections of the Gyro Effect in the first section of the chapter, including Range, Dimension X, Dimension Y, Inner Pivot X, Inner Pivot Y, Rotate, and Opacity. Next, we looked at how to add Gyroscopic data to a watch face component.
We also looked at how to learn more Gyro Effect features using the watch face design samples which are included with Galaxy Watch Designer, in order to learn new Galaxy Watch Designer features.