-
Notifications
You must be signed in to change notification settings - Fork 1
Visualizations
When the visualizations begin, the avatar will walk to the top of the hill, and three replicas will appear. The original avatar is called Displayer, and the three avatars that will perform the visualizations are called Performers. The performer in the center will be directly controlled by the user; the other two are "presets" that reflect a relatively more healthy and a more unhealthy lifestyle. The performers can perform three visualizations:Activity, Prius, and Stats. There is also a Time Progress Manager to control the time and path selection. Additionally, there are the Visualizers to help with Activity and Prius visualizations.
Activity simulates the character's motion ability. The performers will be running on the street. A Blend Tree is used to control the character's animation from running to walking. When the character is in really bad shape, they will be unable to even walk, and will have to stay in a wheelchair.
We will also simulate motion by setting up different Props and making them move backwards. The kind of props are random, and their speed will reflect the running speed of the avatar.
There are three organs -- heart, liver, kidney -- for visualization. These displays do not extend Visualizer; they extend Organ Display and are managed by PriusVisualizer.
The organs will surround the avatar and will have a circular status bar around them, indicating their health levels. We apply a Billboard effect on the organs and status bars so they will always face the user.
Below are the animations for the organs:
Heart: pumping animation. The slower the heart pumps, the healthier the character is.
Liver: the stacking of bumps on the liver, causing fatty liver. This is also achieved with blend shapes.
Kidney: the stacking of bumps on the kidney, causing diabetes. This is also achieved with blend shapes.
There is a hidden "Internals" visualization within the Prius visualization. When the user approaches (move their device closer to) the displayer on the top of the hill, the avatar will fade out, and the internals view will pop out.
The internals view is meant to demonstrate how the Bodylogical simulator works: it collects the avatar's current lifestyle, calculates the health data, and then outputs the resulting lifestyle. The different "blocks" represent different organs. You can see the biometrics on the blocks themselves, with the lines as "connections". There will be sparkles traveling among the different metrics, representing data flow and calculation done inside the simulator.
We used to have a ribbon chart visualization (https://youtu.be/qqq2l5SmZmE?t=135), but it looked messy in 3D space, so we decided to scrap it. Instead, we will create a path on the street, using the colors to indicate the health status of the performer.
This manager includes two functionalities: toggling time and toggling path/choice. They are put together because in an earlier version these two come together, but now that they are separated, they can be separated into two scripts.
Time is used in Activity and Prius, to simulate how the character would be like in the future. The main method is UpdateYear(), while the "music player" uses TimePlayPause() and TimeStop() which just wraps the original method. The Slider interactable will give a value of 0 to 1; the value first goes through the adapter to be converted to a year value, and then sent to the method. Updating the year in one visualization will affect the other as well.
To achieve a fluid year progression, UpdateYear accepts a float instead of an int. It will calculate the score of two nearest integer values and Lerp them to get an intermediate value (for example, given the index 4.3, the script will calculate the score at index 4 and index 5, and then lerp to get the score of index 4.3), which is used to update the visualizations. Although the slider handle moves each frame, the score is recalculated once a second to avoid consuming too much resource.
Path is used in Line Chart. There will be a panel floating to the right of the switcher showing the lifestyles of each path. The main method is UpdatePath(). Updating the path will affect Activity and Prius as well.