Jacob Russ
For my final project for CPE 471, I decided to make a robot that dances to the song Mr. Roboto by STYX. The user is free to walk around the robot if they wish, but the purpose of this project is to watch as a bystander. The robot has three distinct dances at its disposal and performs each of them once over the course of the one minute video that I recorded. Between each of the dances, the robot will reset its position before moving to the next dance.
As for as shading goes, I used a basic Phong shader with some tweaks to the data being sent from the CPU. In order to simulate an indoors club like environment, I used the background color as a means of lighting. The background alternates colors to the beat of the song and the color of the background is used as ambient lighting for both the robot and the ground. This allows the robot and the ground to glow in accordance to the lighting above which makes for a more believable look. The robot itself consists of a hierarchical model that I created myself using only cube and sphere shapes. Each arm consists of three joints that the dances utilize. The dances also make use of a hip joint in which the torso is based upon. For the body movements, the hip is rotated which in turn rotates the torso along with everything attached to it.
Most of the difficulties that I encountered revolved around my model hierarchy. When trying to implement the first dance, many times I would run a new movement function only to discover that another part of the hierarchy was out of place. My robot's hierarchy ended up being around 500-600 lines of code so finding where the issue was ended up being a lot more difficult than I had imagined. Another issue with the hierarchy was that of the robot's hips. Through trial and error along with some help from the TA, I was able to reach a conclusion that utilizing two hip joints is very difficult to implement. To get around this, I actual created an invisible singular hip joint that sits at the same location as the two hip joints that can be seen on the robot model. This allowed for correct movements while also giving off the appearance of the torso being based on the two hip joints that are seen. Other minor difficulties were with the dance transitions. In order to tackle this problem, I chose to reset the robot in between each dance which helped ease the transitions while also giving the model an even more robotic feel.
First dance where the robot turns left and right followed by leaning forward while simultaneously moving his arms and hands.
This dance is achieved through several movement functions. The first function turns the robot left or right a certain amount and pauses once it reaches the leftmost and rightmost positions. During the pause a function is called that causes the robot to take a bow. Another function is called simultaneously to wave the arms and rotate the hands. Once the arm movements are completed, the robot ceases to bow and then turns to the other direction. This dance is repeated several times.
Second dance where the robot employs the popular dance of keeping both upper arms parallel with ground while alternating moving one of the forearms.
This dance goes into effect after the robot's position is reset from the first dance. With the position reset, the robot straightens its shoulders to be parallel with the ground and then moves its forearms to be perpendicular to the ground. Once the arms are perpendicular, on are begins to swivel back in forth to simulate the popular arm movement robot dance. After several swivels, the arm then rotates up and around 360 degrees and points to the other arm. The other arm begins its swivel dance once the previous arm points at it.
Third and final dance where the robot moves left and right to the beat of the song while waving his arms.
This dance also starts after the robot repositions itself. Once ready, the robot raises its arms and then begins moving its torso and arms left and right to achieve a waving dance. The trick to this dance is that the motion is synchronized with the portion of the song that is set to. In order to achieve this, the timing of the dance was set up to flow with the alternating lighting of the scene which is set specifically to the drum beat of the song. This last dance uses the drum beat along with the rhythm of the lyrics to achieve its back and forth timing.