For this assignment, I decided to project onto my clay tree model since it looked like a decent surface to project onto and an interesting shape. I found a shader on GLSL Sandbox that reminded me of outer space. After playing around with the shader a bit, I realized that I could change the overall color scheme to be more red, blue, or black. I also happened to find a glowing blue ball on GLSL Sandbox; it then immediately occurred to me that I could use this blue ball or orb as an abstract looking alien. From there, I decided to try to project the outer space background onto the tree and make another red alien. The position of each alien would change the color of the tree. So if there are no aliens in the scene, then the tree would be black:
If only a red alien comes into the scene, then the tree would turn redder and redder as the alien got closer to the tree:
If only a blue alien comes into the scene, then the tree would turn bluer and bluer as the alien got closer to the tree:
Finally, if both aliens come into the scene, then the tree would turn purple overall:
I struggled a lot when it came to implementing this project. First, projection mapping onto the tree was much more difficult than I thought it would be. I initially used Aaron’s method of taking a photograph first and cutting my input according to the shape of the tree in the photograph. I was very careful about trying to the photograph of the tree from the same angle that the projector would project onto the tree. So before taking the photograph, I projected a green rectangle onto the tree to see which parts of the tree get illuminated easily. However, after I cut the input and tried projecting this shape onto the tree, it ended up being very different from the actual tree. So I repeated the process a few times. I came to a point where I just directly cut the shape according to what I physically saw on the tree instead of using the photograph. This proved much easier to get the mapping right and this worked well for the trunk and the thicker bottom branches near the trunk. It got very confusing very quickly when I got to the finer branches, which is also where I kept tripping up earlier when using the photograph technique. Maybe this was because the tree was very round and so the light kept moving in weird ways because the branches in the shape looked very peculiar and bizarre compared to reality. There came a point where I decided to stop trying and made a mental note to choose a fatter object next time.
After projecting the shader onto the tree, I realized that you couldn’t see the shader that well on the tree. I then tried to project a huge rectangle instead and this looked nice. So the tree must have been a much too thin object. My tree was standing on a box, and seeing the shader underneath the tree gave a very nice effect, especially if you think about it metaphorically as the foundation of the tree. So I decided to project some roots onto the tree.
For the inputs, I used the mouse position to control how red the tree is. I also used the mouse to change the location of the red alien. To make the tree blue or not, I toggled between the “a” and “s” keys to add a blue tint. The mouse would simultaneously control how blue or purple the tree is accordingly. I also used keys 1-5 to change the x-position of the blue alien and keys 6-9 to change the y-position of the red alien. Ideally if I had more time, I would use serial communication with Arduino to make more intuitive input controls.