This is one of the installations I developed for a digital entertainment theme park. It is an interactive digital sandbox with normal white sand and I used a projector and depth sensor to project topological colors and virtual objects depending on the height and shape of the sand. I also used QR markers on 3D printed objects to interact with the virtual content.
Overview of installation
A sandbox of 2 x 1.5 meters with projected content
As shown in the image, depending on the height of the sand, the projected colors change from deep water, shallow water, beach, green grass, dark green forest, rocky mountains and finally snowy mountains. These are the 7 different height levels defined by the system. In addition to the topological colors, it also has fishes and boats in the waters, lava coming out of a crater and other interactive elements.
The sand depth is detected real time and projection updated
Fish cannot go on land
Hardware setup
- Sandbox made of wood. But this can be anything as long as it can contain sand.
- Projector. Make sure the projection covers the sandbox entirely and some more. It is better to find a projector with a projection area somewhat larger than the area of the sandbox. This is because due to the height, the projected area will shrink a little.
- Depth sensor. There are several readily available such as the Kinect, or Intel's Realsense depth sensors. In this particular setup I used the Kinect. A little word of caution though, Asus Xtion's accuracy and resolution was not good enough to differentiate the height levels.
- RGB Imager. Ideally this is integrated into the depth sensor, so the transformation is known. Since I used the Kinect, this is already part of the setup.
- AR markers. For this setup I used hard cardboard material cut with laser cutter.
- 3D printed objects shaped like magic wands to interact with the content.
- Computer. To run the detection and rendering of the contents.
- HDMI cable to connect the computer and projector.
- Lens polarizer to reduce glare and reflection from projector light. Since the room is dark and the projector emits the strongest light, the reflection from the sand surface "blinds" the RGB imager and causes the AR markers detection to fail. Something like this.
- 3D printed attachment to attach the lens polarizer to the Kinect.
Software setup
- Unity to develop the contents
- OpenCV (Aruco) for AR marker detection and positioning (calibration)
- OS. I used Windows 10 in this installation
- (Optional) Jenkins, CMake, vcpkg, and other CI and package managers
3D printed objects and AR markers
A 3D printed magnifying glass with AR markers to zoom in on virtual animals.
The AR marker is detected by the RGB camera and after aligning it's position to the virtual content, it determines if there are animals in the vicinity of the magnifying glass. If there are, those animals will be zoomed in.
Another use of the marker is to implement a kind of treasure hunt where there are hidden treasures or characters that players can find, such as in the video below.
Or we can use several markers and realize different effects and interactions.
Lens polarizer
As mentioned, due to the room being dark and the projector the strongest light source around, the reflected light from the sand surface is enough to blind the RGB camera such that the image is just one big white image. Unfortunately, the Kinect does not have a mechanism to adjust the aperture with code so I had to attach an adjustable lens polarizer to adjust the amount of light coming through to the imager.
A lens polarizer adjusts the amount of light
The lens polarizer attached to the Kinect
It's a little hard to see but the lens polarizer is attached to the Kinect using a 3D printed attachment. The attachment was designed on Autodesk Fusion 360 with careful measurements of the Kinect's outer casing. Adjusting the dial on the polarizer allowed the imager to capture better images and detect the AR markers accordingly.
Volcano detection
On snowy mountains, if players dig out a small hole, that will become a crater and lava will spew out. The algorithm to detect a crater is simply checking for points that is at the bottom of a concave shaped area.
Crater detection process
For every depth point, check it's surrounding neighbors and if it is the lowest/deepest point, define it as the crater. This simple algorithm proved reliable enough in my testing.
Gallery
Here are a few extra images of some users painstakingly adjusting the sand height to resemble shapes such as fish bone and a house.
Creative players forms a fish bone
Comments
Post a Comment