In this post I'd like to share about one of my projects involving doodles and bringing them to live with Unity. We prepare doodle papers and some crayons and let children color them. After they're done, we scan the images and they appear on the screen. The screen is projected on walls using projectors.
Doodles come alive on the screen
Project flow
I utilized document scanners readily available such as the following.
A document scanner
The scanner has many helpful features, such as cropping and rotating the scanned images so they are nice and straight even if the paper is slightly rotated or not aligned properly.
The scanned images are stored in a server and a Unity application polls the server for new images every few seconds. For the server I initially used AWS S3 for image storage and later on we switched to a local image server with Node JS.
Attaching 2D Texture to a 3D Model
I no longer have access to the actual doodle papers but they look like any other doodle template.
A sample of what the doodle paper looks like
After coloring the paper and scanned, the Unity application retrieves the images as PNG files and converts them into Texture2D objects. These textures are then applied to a 3D model with predetermined UV mapping. As a result, we get a 3D model of the fish (and other doodle objects such as trains, airplanes, etc) with the coloring as done on paper.
Differentiating Doodle Types
Since we had several types of doodles to choose from, fish, airplanes, UFO, divers, etc we need a way to separate the scanned images by their types. For this, we utilized QR codes printed on the doodle papers. Each QR code correspond to a doodle type and a small scanner application sorts out the types before sending them to the image server.
Challenges and possible extensions
There is limited space to show the doodle objects and it gets crowded really fast. If you have too many objects on screen they start to collide with each other and become very hard to control/animate. I had to make sure only a certain amount of the latest scanned doodles are active on the screen. And we cannot just make the older doodles disappear so I had to move them away from the viewport before turning them inactive.
Another challenge is that the installation does not have any scene changes like in games. So the app has to be very stable, and performance has to be high. We were running the installations for about 12 hours every day so making sure the installation is stable and runs without bugs was very challenging.
Another part that can be improved is the interactivity of the installation. It was mainly displaying 3D models on screen from paper doodles, but we could add more diverse interactions by adding touch support and various events (such as a shark appearing and eating all the doodle fishes every now and then). This could be something to explore in future installations.
Comments
Post a Comment